Get order details
After the payer successfully completes their payment or cancels the payment, they will be redirected to the redirectUrl
specified during the order creation.
To determine the status of the order, the shop can send a GET request to the Wagent API. This allows the merchant to check whether the order was successful and decide whether to accept the payment.
Endpoint:
GET /orders/
Successful Response:
If the order exists, the API will return the following response:
{
"message": "Order details",
"result": {
"_id": "66eae049ba9665dd2de8a367",
"amount": "1000",
"user": {
"name": "John Doe",
"methods": 1
},
"status": "completed",
"expiredTimestamp": 1726669773288,
"redirectUrl": "http://google.com",
"products": [
{
"name": "Hoodie",
"logo": "https://google.com/hoodie.jpg",
"count": 3,
"amount": 5
},
{
"name": "Macbook M1",
"logo": "https://www.apple.com/1.jpg",
"count": 1,
"amount": 999
}
],
"createdAt": "2024-09-18T14:14:33.292Z",
"updatedAt": "2024-09-22T15:28:40.804Z",
"token": [
{
"logo": "https://stellar.myfilebase.com/ipfs/QmNcfZxs8e9uVyhEa3xoPWCsj3ZogGirtixMEC9Km4Fjm2",
"symbol": "usdc",
"address": "CCW67TSZV3SSS2HXMBQ5JFGCKJNXKZM7UQUWUZPUTHXSTZLEO7SJMI75",
},
{
"logo": "https://s2.coinmarketcap.com/static/img/coins/64x64/512.png",
"symbol": "xlm",
"address": "CB64D3G7SM2RTH6JSGG34DDTFTQ5CFDKVDZJZSODMCX4NJ2HV2KN7OHT",
}
]
}
}
Last updated