Initiate payment
const url = 'https://console.orangepill.cloud/v4/payments/';const options = { method: 'POST', headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'}, body: '{"amount":"example","currency":"example","customer":{"documentNumber":"example","documentType":"example","email":"hello@example.com","name":"example"},"customerId":"example","description":"example","direction":"payin","metadata":{"idempotencyKey":"example","returnUrl":"https://example.com","webhookUrl":"https://example.com"},"method":"example","paymentMethodId":"example","paymentMethodTokenId":"example","phoneNumber":"example","product":"example","provider":"example","storePaymentMethod":true}'};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}curl --request POST \ --url https://console.orangepill.cloud/v4/payments/ \ --header 'Authorization: Bearer <token>' \ --header 'Content-Type: application/json' \ --data '{ "amount": "example", "currency": "example", "customer": { "documentNumber": "example", "documentType": "example", "email": "hello@example.com", "name": "example" }, "customerId": "example", "description": "example", "direction": "payin", "metadata": { "idempotencyKey": "example", "returnUrl": "https://example.com", "webhookUrl": "https://example.com" }, "method": "example", "paymentMethodId": "example", "paymentMethodTokenId": "example", "phoneNumber": "example", "product": "example", "provider": "example", "storePaymentMethod": true }'Initiate a new payment for the authenticated tenant.
Authorizations
Section titled “Authorizations”Request Bodyrequired
Section titled “Request Bodyrequired”object
ISO 4217 currency code
object
Customer document number
Customer document type
Customer email address
Customer full name
Customer identifier
Payment description
Payment direction
Arbitrary key/value metadata
object
Idempotency key override
Client return URL
Webhook callback URL override
Payment method key
Stored payment method id
Tokenized payment method id
Phone number for wallet payments
Product key
Provider identifier override
Store payment method for future use
Responses
Section titled “Responses”Default Response
object
object
Payment attempt identifier
Canonical payment identifier
Provider next action payload
Payment identifier
Provider identifier
Provider payment reference
Payment status
Example
{ "success": true}Default Response
object
Error message
object
object
Machine-readable error code
Human-readable problem detail
Request path
object
HTTP status code
Short summary of the problem type
Problem type URI
object
object
Example
{ "success": false}Default Response
object
Error message
object
object
Machine-readable error code
Human-readable problem detail
Request path
object
HTTP status code
Short summary of the problem type
Problem type URI
object
object
Example
{ "success": false}Default Response
object
Error message
object
object
Machine-readable error code
Human-readable problem detail
Request path
object
HTTP status code
Short summary of the problem type
Problem type URI
object
object
Example
{ "success": false}Default Response
object
Error message
object
object
Machine-readable error code
Human-readable problem detail
Request path
object
HTTP status code
Short summary of the problem type
Problem type URI
object
object
Example
{ "success": false}Default Response
object
Error message
object
object
Machine-readable error code
Human-readable problem detail
Request path
object
HTTP status code
Short summary of the problem type
Problem type URI
object
object
Example
{ "success": false}default
Section titled “default”Default Response
object
Error message
object
object
Machine-readable error code
Human-readable problem detail
Request path
object
HTTP status code
Short summary of the problem type
Problem type URI
object
object
Example
{ "success": false}