For the complete documentation index, see llms.txt. This page is also available as Markdown.

Payment Result Webhook Events

Payment Result having same callback contract as Get notified of a transaction status change.

// Sample for non-USD payments initiated
https://<your_webhook_url>?
  TxnId=7715121708032676249
  OrderId=365f5Z619951c1a4b8
  TotalPrice=1.00
  PaymentType=237
  ResultCode=0
  Checksum=6b6c5e0f835f9f1442726bed3aedc3c9
  PayTaxRate=8.00
  PayCurrency=MYR
  PayAmount=1.00
  OriginAmount=1.00
  OriginCurrency=MYR
  SubTotalPrice=0.93

// Sample for USD payments initiated
https://<your_webhook_url>?
  TxnId=7715122576202672831
  OrderId=365f5Z619951c1a4b8
  TotalPrice=1.17
  PaymentType=237
  ResultCode=0
  Checksum=10741fa6be7e6f2b189f029b3f8a0963
+ USDPrice=0.30
  PayTaxRate=8.00
  PayCurrency=MYR 
  PayAmount=1.17 
  OriginAmount=0.30
  OriginCurrency=USD 
  SubTotalPrice=1.08 

Matching the result to your charge

This notification does not include PaymentMethodId. Use OrderId (the orderId you sent in Token Charge) or TxnId to find the charge in your system.

The same verification, acknowledgement and retry rules apply as for the binding payment result: verify Checksum, respond with {"ResultCode": 0}, and process each TxnId only once.

Note: Inquiry may return orderId as a number (for example 1793604868432) even if you sent it as a string. Compare order ids as strings.

Specific Result Code for Recurring:

Result Code
Description
Suggestion

800

Payment method is not eligible for Merchant-Initiated Transactions (MIT).

Perform a Customer-Initiated Transaction (CIT) before attempting a Merchant-Initiated Transaction

801

Card is not eligible for Merchant-Initiated Transactions (MIT).

Prompt the customer to provide a card type that supports Merchant-Initiated Transactions

802

Re-authentication required. The cardholder or issuing bank revoked the standing mandate, or card details are expired.

Perform a Customer-Initiated Transaction (CIT) to re-authenticate the cardholder and establish a new mandate.

803

Recurring payment declined due to a transient processor or network issue.

Retry the Merchant-Initiated Transaction (MIT) later.

804

Recurring payment declined due to a closed account, stolen/lost card report, or fraud flag.

Stop all retry attempts. Prompt the customer to provide a new payment method.

Refer to overall result code list: https://docs.coda.co/codapay/error-codes

Retry allowed?

Result Code
Description
Retry this charge?
What to do

800

Payment method is not eligible for Merchant-Initiated Transactions (MIT).

No

Ask the customer to complete a Customer-Initiated Transaction (CIT) first.

801

Card is not eligible for MIT (for example, prepaid cards).

No

Ask the customer to use a different card.

802

Re-authentication required. The cardholder or bank revoked the mandate, or the card expired.

No

Ask the customer to complete a new CIT to set up a new mandate.

803

Declined because of a temporary processor or network issue.

Yes, later

Retry the MIT later with a new Idempotency-Key.

804

Declined because the account is closed, the card is lost or stolen, or it is flagged for fraud.

Never

Stop all retries. Ask the customer for a new payment method.

Last updated

Was this helpful?