4. Notifying the retailer of a change in payment status. Payment Callback
When the user has made a payment, the Processing Service sends a request in the following format to the store's API url, which was specified at the time of creating the payment:
POST https://shop-website.com/api/change-order-status
{
"id":"3604d035-e6f5-40c1-b1e6-7869a5d2eaaa",
"shop_order_id":"208843-42-23-863",
"status":"paid",
"client_amount":"0.00634324",
"client_cryptocurrency":"ETH",
"client_amount_of_shipping":"0.001"
"currency":"USDT",
"amount":"7.3522860821376",
"description":"Order #208843-42-23-863",
"created_at":"2022-11-25T09:45:52.148010+00:00",
"expires":"2023-02-22T00:00:00+00:00",
"test":false,
}
Fields description
Field | Type | Required | Description |
---|---|---|---|
id | string | yes | payment identifier |
shop_order_id | string | yes | shop order id |
status | string | yes | payment status. Value options: "pending"- pending payment; "awaiting_payment_confirmation" - the transaction was found in the mempool, its confirmation in the blockchain network is pending; "paid" - payment made; "cancelled" - the payment is cancelled by the seller; "expired" - payment time has expired; |
client_amount | string | yes | total amount of received cryptocurrency |
client_cryptocurrency | string | yes | received cryptocurrency |
client_amount_of_shipping | string | yes | amount of shipping |
currency | string | yes | payed cryptocurrency |
amount | string | yes | amount of payed cryptocurrency |
description | string | yes | payment description, maximum 128 characters |
created_at | string | yes | payment creation date, RFC3339 format |
expires | string | yes | date when payment expires, RFC3339 format |
test | boolean | yes | flag for test order for API debugging |