Get notified of a transaction status change
Receive notifications of transaction status changes as your user progresses through the payment flow.
During the payment flow, the transaction status will be one of the following:
Pending
Successful
Failed
You will be notified whenever a transaction is marked as 'Successful' or 'Failed' via the Transaction Completion Notification URL configured in the Publisher Portal.
Pre-requisite
The Transaction "Complete Notification URL" is configured in Publisher Portal. Refer to Set up payments for detailed instructions. Changes will take effect immediately.
Notification parameters
Notifications are sent to the configured transaction complete notification URL with the appended query parameters below.
TxnId
Always The transaction ID generated during the payment request initiation
OrderId
Always Your Order ID, passed during the payment request initiation
*OriginAmount
*Always (v2.0 only)
Original amount in OriginCurrency as provided in the initiation request
*OriginCurrency
*Always (v2.0 only) ISO 4217 alphabetic code (USD, IDR, etc). The original currency used in the initiation request to specify the item price. OriginCurrency can be different from PayCurrency.
*PayAmount
*Always (v2.0 only)
Final price in PayCurrency charged to the user. Note: TotalPrice always = PayAmount
*PayCurrency
*Always (v2.0 only) ISO 4217 alphabetic code (USD, IDR, etc). Currency used for the actual payment charged to the user.
*SubTotalPrice
*Always (v2.0 only)
The net amount of the transaction before taxes.
Calculated as: totalPrice / (1 + payTaxRate). This represents the base item price excluding local service or digital taxes.
*PayTaxRate
*Always (v2.0 only)
The tax percentage rate applied to the transaction (e.g., 0.08 for 8%). This value is dynamically determined based on the merchant configuration, regional tax laws, or the user’s specific location (Zip Code).
resultDesc
Always
The resultDesc parameter is designed to assist merchants in accurately analyzing and addressing the causes of transaction failures.
If the
resultCodeequals0, theresultDescwill return Success.If the
resultCodeindicates an error, theresultDescwill provide a detailed description of the error.
ResultCode
Always The ResultCode will help indicate the status of the transaction.
ResultCode = 0 means the transaction is successful.
ResultCode = 431, 481 or 216 means that the transaction is pending.
All other ResultCode values mean that the transaction Failed. You can find the full list of error codes and their explanation here.
TotalPrice
Always The total amount the user has paid for the transaction. This will always be in local currency.
PaymentType
Always The PaymentType the user attempted to pay with.
PaymentType is equal to the payment channel ID or 1 in case the payment channel is a Carrier Billing.
Checksum
Always The checksum helps verify that the message is sent by Codapay and has not been tampered with. Refer to the Security section for more information on how to use this value.
MnoId
Optional If the need_mno_id parameter was used during payment channel initiation, this parameter will contain the payment channel ID
USDPrice
Optional If a transaction is initiated in a country where USD is not the local currency, the Coda callback parameter (TotalPrice) will default display the user's local currency amount.
If you require adding the initial USDPrice to the callback, please configure it from the Publisher Portal. Refer to the USD pricing section for more details.
Expected Response
After sending the notification, Codapay expects an acknowledgment to confirm it has been received.
If your application processes the notification successfully, respond with 'ResultCode=0.' Otherwise, return an error code.
If no response is received, the notification will be re-sent 3 times at 5-minute intervals. If all attempts fail, an email alert will be triggered.
To subscribe to transaction notifications, go to the Publisher Portal.
Team > Manage Access > Tick "Transaction Notification" > Save Changes
Sample
Checking a transaction status
We highly recommend using the InquiryPaymentResult API call after receiving the purchase notification webhook. This will help reconcile the transaction status between your system and Coda's before releasing the purchased item.
Last updated
Was this helpful?