Skip to content

Initiate payment

POST
/v4/payments/
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.

Media typeapplication/json
object
amount
required
Any of:

Decimal amount encoded as a string

string
/^[0-9]+(\.[0-9]{1,4})?$/
currency
required

ISO 4217 currency code

string
>= 3 characters <= 3 characters
customer
object
documentNumber

Customer document number

string
>= 1 characters
documentType

Customer document type

string
>= 1 characters
email

Customer email address

string format: email
name

Customer full name

string
>= 1 characters
customerId

Customer identifier

string
>= 1 characters
description

Payment description

string
>= 1 characters
direction

Payment direction

string
Allowed values: payin payout
metadata

Arbitrary key/value metadata

object
idempotencyKey

Idempotency key override

string
>= 1 characters
returnUrl

Client return URL

string format: uri
webhookUrl

Webhook callback URL override

string format: uri
key
additional properties
any
method
required

Payment method key

string
>= 1 characters
paymentMethodId

Stored payment method id

string
>= 1 characters
paymentMethodTokenId

Tokenized payment method id

string
>= 1 characters
phoneNumber

Phone number for wallet payments

string
>= 1 characters
product

Product key

string
>= 1 characters
provider

Provider identifier override

string
>= 1 characters
storePaymentMethod

Store payment method for future use

boolean

Default Response

Media typeapplication/json
object
data
required
object
attemptId
required

Payment attempt identifier

string
id

Canonical payment identifier

string
nextAction

Provider next action payload

paymentId
required

Payment identifier

string
providerId

Provider identifier

string
providerPaymentId

Provider payment reference

string
status
required

Payment status

string
success
required
boolean

Example

{
"success": true
}

Default Response

Media typeapplication/json
Any of:
object
error
required

Error message

string
message
string

Example

{
"success": false
}

Default Response

Media typeapplication/json
Any of:
object
error
required

Error message

string
message
string

Example

{
"success": false
}

Default Response

Media typeapplication/json
Any of:
object
error
required

Error message

string
message
string

Example

{
"success": false
}

Default Response

Media typeapplication/json
Any of:
object
error
required

Error message

string
message
string

Example

{
"success": false
}

Default Response

Media typeapplication/json
Any of:
object
error
required

Error message

string
message
string

Example

{
"success": false
}

Default Response

Media typeapplication/json
Any of:
object
error
required

Error message

string
message
string

Example

{
"success": false
}