xBillion API
Home
Home
  1. Payments
  • xBillion
    • Introduction
    • Authentication
    • Webhhoks
    • API
      • Payments
        • Get information
          GET
        • Create payment
          POST
  1. Payments

Create payment

POST
/api/v1/payments
Create payment transaction

Request

Body Params application/json

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 Code 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 '{
    "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"
}'

Responses

🟢200Payment creation result.
application/json
Body

Example
🟠400Bad request
🟠401Merchant is unauthorized.
🟠422Request for payment creation rejected by the payment system.
🔴500Internal error.
Previous
Get information
Built with