Create Payment
POST
/payments
Creates a payment and returns links for available payment methods.
Headers
| Header | Required | Description |
|---|---|---|
X-API-Key | Yes | Your API key |
Idempotency-Key | No | Unique string to prevent duplicate payments |
Request Body
| Field | Type | Required | Description |
|---|---|---|---|
amount | string | Yes | Payment amount (e.g. "100.00") |
currency | string | Yes | Currency code (e.g. "EUR") |
method | string | No | Specific method (e.g. "X1", "X2-PG"). Omit for all available. |
callback_url | string | No | HTTPS URL for status webhooks |
Example — All Methods
Request
POST /api/v1/payments
X-API-Key: vx_a8f3e1b2c4d6...
Content-Type: application/json
{
"amount": "100.00",
"currency": "EUR",
"callback_url": "https://your-server.com/webhook"
}
Response — 201 Created
{
"payment_id": "vx_a1b2c3d4e5f6a1b2c3d4e5f6_1a2b3c4d",
"links": [
{
"method": "X1",
"url": "https://pay.example.com/abc123",
"status": "created"
},
{
"method": "X2-PG",
"url": "https://pay.example.com/def456",
"status": "created"
},
{
"method": "X2-TT",
"url": "https://pay.example.com/ghi789",
"status": "created"
}
]
}
Example — Specific Method
Request
POST /api/v1/payments
X-API-Key: vx_a8f3e1b2c4d6...
Content-Type: application/json
{
"amount": "50.00",
"currency": "EUR",
"method": "X2-PG"
}
Response — 201 Created
{
"payment_id": "vx_f6e5d4c3b2a1f6e5d4c3b2a1_4d3c2b1a",
"links": [
{
"method": "X2-PG",
"url": "https://pay.example.com/xyz789",
"status": "created"
}
]
}
Notes
Idempotency: If you send the same
Idempotency-Key twice, the second request returns the original payment without creating a duplicate.
Amount clamping: If the amount is below a method's minimum, it will be raised to the minimum. If above the maximum, it will be lowered to the maximum.
Partial success: If some methods fail (timeout after 30s), you still receive working links. Failed methods are marked with
"status": "failed".