SplitPay

Charges

Charge lifecycle, reversal and retries

Creating a charge

POST
/v1/charges

Authorization

bearer
AuthorizationBearer <token>

In: header

Header Parameters

Idempotency-Key*string

8 to 128 characters [A-Za-z0-9._:-], unique per operation

Match^[A-Za-z0-9._:-]{8,128}$

Request Body

application/json

TypeScript Definitions

Use the request body type in TypeScript.

Response Body

application/json

application/json

application/json

application/json

application/json

application/json

application/json

application/json

curl -X POST "https://example.com/v1/charges" \  -H "Idempotency-Key: string" \  -H "Content-Type: application/json" \  -d '{    "externalId": "order-777",    "cardId": "0192f3a0-5c1e-7b2a-9f4d-2b24b1f0c7a1",    "amount": 25000000,    "recipients": [      {        "recipientId": "0192f3a0-5c1e-7b2a-9f4d-2b24b1f0c7b2",        "share": 7000      },      {        "recipientId": "0192f3a0-5c1e-7b2a-9f4d-2b24b1f0c7b3",        "share": 3000      }    ]  }'
{  "success": true,  "meta": {    "requestId": "string",    "timestamp": "2019-08-24T14:15:22Z",    "processingTimeMs": 0  },  "data": {    "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",    "externalId": "string",    "cardId": "f16ba382-eb42-481a-b08f-c57bdc9aae24",    "status": "CREATED",    "amount": 0,    "fee": 0,    "feeBps": 0,    "recipients": [      {        "recipientId": "afdd332c-8290-47b9-aca2-368bf5f25a9d",        "share": 0,        "amount": 0      }    ],    "split": {      "status": "NOT_STARTED"    },    "fiscal": {      "status": "NOT_STARTED",      "receiptUrl": "string"    },    "failureReason": "string",    "createdAt": "2019-08-24T14:15:22Z",    "succeededAt": "2019-08-24T14:15:22Z"  }}

POST /v1/charges debits amount from the card and returns the result immediately:

statusMeaning
SUCCEEDEDThe money has been charged
FAILEDThe bank declined; the reason is in failureReason. The HTTP response is still 201
CREATEDThe outcome at the provider is unknown (connection failure). We reconcile it ourselves: do not retry with a different externalId
REVERSEDThe charge was reversed

externalId is your order number, unique per merchant. Repeating a request with the same externalId, card and amount returns the existing charge; with different parameters it returns 409.

After payment

GET
/v1/charges/{id}

Authorization

bearer
AuthorizationBearer <token>

In: header

Path Parameters

id*string
Formatuuid

Response Body

application/json

application/json

application/json

application/json

curl -X GET "https://example.com/v1/charges/497f6eca-6276-4993-bfeb-53cbbbba6f08"
{  "success": true,  "meta": {    "requestId": "string",    "timestamp": "2019-08-24T14:15:22Z",    "processingTimeMs": 0  },  "data": {    "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",    "externalId": "string",    "cardId": "f16ba382-eb42-481a-b08f-c57bdc9aae24",    "status": "CREATED",    "amount": 0,    "fee": 0,    "feeBps": 0,    "recipients": [      {        "recipientId": "afdd332c-8290-47b9-aca2-368bf5f25a9d",        "share": 0,        "amount": 0      }    ],    "split": {      "status": "NOT_STARTED"    },    "fiscal": {      "status": "NOT_STARTED",      "receiptUrl": "string"    },    "failureReason": "string",    "createdAt": "2019-08-24T14:15:22Z",    "succeededAt": "2019-08-24T14:15:22Z"  }}
GET
/v1/charges

Authorization

bearer
AuthorizationBearer <token>

In: header

Query Parameters

page?integer
Range1 <= value
Default1
limit?integer
Range1 <= value <= 100
Default20

Response Body

application/json

application/json

application/json

curl -X GET "https://example.com/v1/charges"
{  "success": true,  "meta": {    "requestId": "string",    "timestamp": "2019-08-24T14:15:22Z",    "processingTimeMs": 0,    "pagination": {      "page": 0,      "limit": 0,      "totalItems": 0,      "totalPages": 0    }  },  "data": [    {      "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",      "externalId": "string",      "cardId": "f16ba382-eb42-481a-b08f-c57bdc9aae24",      "status": "CREATED",      "amount": 0,      "fee": 0,      "feeBps": 0,      "recipients": [        {          "recipientId": "afdd332c-8290-47b9-aca2-368bf5f25a9d",          "share": 0,          "amount": 0        }      ],      "split": {        "status": "NOT_STARTED"      },      "fiscal": {        "status": "NOT_STARTED",        "receiptUrl": "string"      },      "failureReason": "string",      "createdAt": "2019-08-24T14:15:22Z",      "succeededAt": "2019-08-24T14:15:22Z"    }  ]}

The split and the receipt run in the background:

  • split.status: PENDING β†’ COMPLETED (usually within seconds). On failures it retries automatically, then becomes FAILED and is retried by support.
  • fiscal.status: COMPLETED after the split; the receipt link is in fiscal.receiptUrl.

Reversal

POST
/v1/charges/{id}/reverse

Authorization

bearer
AuthorizationBearer <token>

In: header

Path Parameters

id*string
Formatuuid

Response Body

application/json

application/json

application/json

application/json

application/json

application/json

curl -X POST "https://example.com/v1/charges/497f6eca-6276-4993-bfeb-53cbbbba6f08/reverse"
{  "success": true,  "meta": {    "requestId": "string",    "timestamp": "2019-08-24T14:15:22Z",    "processingTimeMs": 0  },  "data": {    "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",    "externalId": "string",    "cardId": "f16ba382-eb42-481a-b08f-c57bdc9aae24",    "status": "CREATED",    "amount": 0,    "fee": 0,    "feeBps": 0,    "recipients": [      {        "recipientId": "afdd332c-8290-47b9-aca2-368bf5f25a9d",        "share": 0,        "amount": 0      }    ],    "split": {      "status": "NOT_STARTED"    },    "fiscal": {      "status": "NOT_STARTED",      "receiptUrl": "string"    },    "failureReason": "string",    "createdAt": "2019-08-24T14:15:22Z",    "succeededAt": "2019-08-24T14:15:22Z"  }}

POST /v1/charges/{id}/reverse works only on the day of payment (Tashkent time) and before the split is done. After the split, refunds go through support.

Recipients

POST
/v1/recipients

Authorization

bearer
AuthorizationBearer <token>

In: header

Request Body

application/json

TypeScript Definitions

Use the request body type in TypeScript.

Response Body

application/json

application/json

application/json

application/json

application/json

curl -X POST "https://example.com/v1/recipients" \  -H "Content-Type: application/json" \  -d '{    "kind": "SELF_EMPLOYED",    "fullName": "string",    "pinfl": "string"  }'
{  "success": true,  "meta": {    "requestId": "string",    "timestamp": "2019-08-24T14:15:22Z",    "processingTimeMs": 0  },  "data": {    "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",    "kind": "SELF_EMPLOYED",    "fullName": "string",    "pinfl": "string",    "tin": "string",    "status": "PENDING_VERIFICATION",    "rejectionReason": "string",    "createdAt": "2019-08-24T14:15:22Z"  }}
GET
/v1/recipients

Authorization

bearer
AuthorizationBearer <token>

In: header

Query Parameters

page?integer
Range1 <= value
Default1
limit?integer
Range1 <= value <= 100
Default20

Response Body

application/json

application/json

application/json

curl -X GET "https://example.com/v1/recipients"
{  "success": true,  "meta": {    "requestId": "string",    "timestamp": "2019-08-24T14:15:22Z",    "processingTimeMs": 0,    "pagination": {      "page": 0,      "limit": 0,      "totalItems": 0,      "totalPages": 0    }  },  "data": [    {      "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",      "kind": "SELF_EMPLOYED",      "fullName": "string",      "pinfl": "string",      "tin": "string",      "status": "PENDING_VERIFICATION",      "rejectionReason": "string",      "createdAt": "2019-08-24T14:15:22Z"    }  ]}

Without the recipients field, the whole amount goes to the merchant's default recipient. Every recipient must be verified by the platform, otherwise the response is 422 with code -6004.

On this page