Cryptoacquiring: API Docs
  • CRYPTO ACQUIRING API
    • General
    • Glossary
    • API References
      • Authorization
      • Orders
      • Statuses
      • Currencies
      • Callbacks
Powered by GitBook
On this page
  1. CRYPTO ACQUIRING API
  2. API References

Callbacks

A list of callback notifications that merchant can connect to track certain events.

Order status notification

If merchant specifies the callback_url field, a POST request with order data will be sent to this url whenever the status of this order changes. An example of callback body with notification at the moment the order status changes:

{
  "products": [
    {
      "id": 0,
      "name": "string",
      "price": "861241",
      "count": 2147483647
    }
  ],
  "amount": "-07152594",
  "currency": "CARDUAH",
  "redirectUrl": "string",
  "domainUrl": "string",
  "lang": "en",
  "email": "[email protected]",
  "firstName": "string",
  "lastName": "string",
  "phoneNumber": "string",
  "status": "pending",
  "createdAt": "2023-11-02T15:48:27.504Z",
  "payedAt": "2023-11-02T15:48:27.505Z",
  "merchantOrderId": "string",
  "payUrl": "string",
  "callbackCreatedAt": "2023-11-02T15:48:27.504Z",
}

In response to successful callback processing, status 200 is expected.


Retry Policy for Sending Attempts

In cases where response with a status code of 200 is not received upon request submission, the system automatically initiates retry attempts. Retry mechanism is based on an exponential backoff strategy, with the maximum delay between attempts capped at 24 hours. The schedule for the time intervals between attempts is as follows:

  1. First attempt — after 1 minute

  2. Second attempt — after 2 minutes

  3. Third attempt — after 4 minutes

  4. Fourth attempt — after 8 minutes

  5. Fifth attempt — after 16 minutes

  6. Sixth attempt — after 32 minutes

  7. Seventh attempt — after 1 hour 4 minutes

  8. Eighth attempt — after 2 hours 8 minutes

  9. Ninth attempt — after 4 hours 16 minutes

  10. Tenth attempt — after 8 hours 32 minutes

After each unsuccessful attempt, the waiting time before the next attempt doubles, but does not exceed 24 hours. This ensures a balance between the need for timely processing of requests and avoiding excessive strain on the system in case of errors.

PreviousCurrencies

Last updated 1 year ago