- xBillion
Create payment
POST
/api/v1/payments
Transactions
Request
Body Params application/json
amount
number
required
>= 0.01
currency
enum<string>
required
<= 3 characters
Allowed values:
USDEURGBPCNYRUBKZTCLP
Example:
USD
order_id
string
required
<= 255 characters
service
string
required
customer
object
required
name
string
optional
<= 255 characters
email
string
required
<= 255 characters
phone
string
optional
<= 30 characters
Example:
+11234567890
ip
string
required
<= 20 characters
return_urls
object
optional
fail
string
optional
<= 255 characters
success
string
optional
<= 255 characters
webhook_url
string
optional
<= 255 characters
Example
{
"amount": 0.01,
"currency": "USD",
"order_id": "string",
"service": "string",
"customer": {
"name": "string",
"email": "string",
"phone": "+11234567890",
"ip": "string"
},
"return_urls": {
"fail": "string",
"success": "string"
},
"webhook_url": "string"
}
Request samples
Shell
JavaScript
Java
Swift
Go
PHP
Python
HTTP
C
C#
Objective-C
Ruby
OCaml
Dart
R
Request Request Example
Shell
JavaScript
Java
Swift
curl --location --request POST 'https://prod.your-api-server.com/api/v1/payments' \
--header 'Content-Type: application/json' \
--data-raw ''
Responses
🟢200Payment creation result.
application/json
Body
id
string
optional
amount
object (CreatePayinResponseAmount)
optional
value
number
required
currency
string
required
fees
#/definitions/2717384optional
next
object (PayinResponseNext)
optional
action
enum<string>
required
Allowed values:
show_detailsredirect
redirect_url
string
optional
details
object
optional
status
string
optional
created_at
string
optional
Example
🟠400Bad request
🟠401Merchant is unauthorized.
🟠422Request for payment creation rejected by the payment system.
🔴500Internal error.