Verify Transaction Status
InquiryPaymentResult() method
Partners can invoke this method at any time, to inquire about the status of a transaction.
We strongly recommend partners use this method after receiving the purchase notification webhook to reconcile the information between the partner's system and Coda's.
Partners should never release the purchased item to the user until 100% sure the data is fully reconciled.
PaymentResult inquiryPaymentResult (InquiryPaymentRequest request)
Request Message
Name | Type | Length | Description |
---|---|---|---|
apiKey | String | 256 | API key assigned by Coda. |
txnId | Numeric | N/A | Unique payment transaction identifier. This value is set when Init() Method is invoked. |
needStatusFinal | String | N/A | "needStatusFinal": "true" Allows partners to retrieve the final status of a payment by providing the necessary parameters. |
Sample JSON Request
Response Message: PaymentResult Type
Name | Type | Length | Description |
---|---|---|---|
txnId | Numeric | N/A | Unique TxnId returned from Init() Method. |
orderId | Depends on the value that you send in your init request | 64 | Unique transaction identifier passed by Init() Method request message from partner. |
resultCode | Numeric | N/A | Success or Error code. Success = 0. Common Error Codes |
resultDesc | String | 512 | If the resultCode is an error, this value describes the error. Common Error Codes |
totalPrice | Float | N/A |
|
profile | Map | N/A | Additional transaction information. See below for an example. |
Sample Profile Type
Sample JSON Response
Profile Fields
Name | Type | Length | Description |
---|---|---|---|
PaymentType | Numeric | 3 | PaymentType selected by customer. This will be passed only in InquiryPaymentResult response. |
isStatusFinal | String | N/A | "true" means the transaction is updated to final status. "false" means the transaction is still in pending status. |
status | String | N/A | Status is "success" "pending" "failed", representing successful payment, pending payment, and failed transaction in different categories. If it is pending, please check again later.. |
Order Status Response Code
resultCode = 0 means the transaction was successful.
resultCode = 431 or 216 means the order is being paid, please check later or wait for the callback.
Using the new parameter "needStatusFinal": "true" to check the transaction's final status.
InquiryPaymentResult not support displaying USD prices
Total price parameter only in local currency.
Item info
Item represents an SKU. Code and Name should be unique and univocally represent the item. The name needs to be user-friendly, as it shows to end-users in the payment window.
Name | Type | Length | Description |
---|---|---|---|
code | String | 128 | Partner-managed item code. |
name | String | 128 | The name of the purchased item or top-up, e.g. “50 diamonds”. If purchases can be made for multiple games or services, include also the name of that, e.g. “Hero's Glory - 200 gold”. Note: Value must only contain English characters. |
price | Float | N/A | The price of the item (inclusive of any taxes) in the currency specified in the request message. |
type | Numeric | N/A | default = 1 |
Last updated