Determine transaction status
Use this guide to determine the outcome of a payment when the customer redirect or IPN delivery doesn't go as expected.
Case 1: Customer redirected successfully
When the customer returns to your redirectUrl, Centrobill appends the following query parameters to the URL:
| Parameter | Description |
|---|---|
order_id | Gateway order ID (orderId) |
ustas | Gateway consumer ID (consumer.id) |
consumer_id | Gateway consumer ID (consumer.id) — included for backward compatibility |
is_approved | 1 — payment approved. 0 — payment failed or final status not yet available due to async processing on the payment provider's side |
cb_code | Transaction status code. 0000 indicates approval |
cb_transaction_id | Gateway transactionId |
Example redirect URL:
https://site.com/thank-you?order_id=2121111670&ustas=111193024&consumer_id=111193024&sh=
e5d111d8457ba68e872350981fbe611abe39c5ad&is_approved=1&cb_code=0&cb_transaction_id=511171812If is_approved=1, you can show the customer a confirmation page immediately. However, always confirm the final status via IPN before fulfilling the order — is_approved=1 is an early indicator, not the authoritative payment result.
If is_approved=0, the payment either failed or is still resolving asynchronously. Wait for the IPN callback before taking action.
Note
Centrobill always appends
order_idto the redirect URL. Use it to look up the order in the Feed API if needed.
Case 2: Customer not redirected, or IPN not received
If the customer wasn't redirected to your site, or if you haven't received an IPN, use the following approach:
-
Wait for the IPN. Centrobill retries IPN delivery up to 5 times if your server doesn't respond. See IPN reference for the full retry schedule.
-
Poll the Feed API. If the IPN still hasn't arrived after all retry attempts, query the Feed API directly using the most recent transaction or order ID known to your system.
Query the Feed API
The Feed API supports several query parameters for looking up transaction status:
| Parameter | Returns |
|---|---|
orderId | All transactions within a single order |
transactionId | Full details for a specific transaction |
lastTransactionId | All transactions from a specified transaction onwards |
prevTransactionId | All transactions within an order starting from a specified transaction |
Use orderId when you need to see the full payment history for an order (for example, an initial charge plus a rebill or refund). Use transactionId when you know the exact transaction you want to inspect.
