Get payment status
GET
/api/payments/orders/{id}/status
const url = 'https://api.petanqueai.com/api/payments/orders/example/status';const options = {method: 'GET', headers: {'x-storefront-token': '<x-storefront-token>'}};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}curl --request GET \ --url https://api.petanqueai.com/api/payments/orders/example/status \ --header 'x-storefront-token: <x-storefront-token>'The outcome of the order’s latest payment: PENDING, SUCCEEDED, FAILED, CANCELLED or a refund state. This is the only reliable proof that money moved; poll it from your result page until it is no longer PENDING. On success orderDocumentNo holds the order code (SA-…) to show the shopper. data is null if no payment has been started.
Authorizations
Section titled “Authorizations”Parameters
Section titled “Parameters”Path Parameters
Section titled “Path Parameters”id
required
string