Voucher (Cash Card)
The voucher payment method allows customers to redeem their voucher codes via Codapay at the Partner's website. Codapay registers completed payments in real-time, and partners are notified immediately. See Voucher details in the Profile fields in the request table for more details.
For voucher transactions, the voucher's value is confirmed only after it has been redeemed; Partners need to validate the net amount returned in Coda's API response and be able to handle the redemption of all available denominations.
Request Message
Parameters | Length | Description | Mandatory |
---|---|---|---|
api_key | 256 | Secret key assigned by Coda (unique to each country). | Yes |
order_id | 64 | Merchant-assigned unique transaction identifier. | Yes |
lang | 2 | 2-character language code. Language Table | Yes |
pay_type | 1 | Cash Card Channel use pay_type=4 | Yes |
pay_channel | 3 | Code for each payment channel | Yes |
merchant_name | 128 | If the partner wants to specify the partner's name, please enter the name in this field. The default value is empty. |
|
type | 1 | 1: digital content 2: non-digital content | Yes |
Item | N/A | ItemInfo array. See Item Info table below for more details. | Yes |
profile | N/A | Other details. See Other details in Profile field below for more details. | Yes |
Item Info
Item represents a 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.
Parameters | Length | Description | Mandatory |
---|---|---|---|
Code | 128 | Partner-managed item code. | Yes |
Name | 128 | The name of the purchased item or topup, 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”. | Yes |
Price | N/A | Non-formatted numeric value. For Indonesia, Chile, South Korea, Taiwan, and Vietnam currency, decimals are not supported. | Yes |
Type | N/A | Default=1 | Yes |
Other Details In Profile Field
Parameters | Length | Description | Mandatory |
---|---|---|---|
voucher_code | 20 | Voucher Code. | Yes |
voucher_pin | 20 | Voucher PIN. | Yes |
card_type | N/A | Default use "card_type":"0". |
|
Sample of Request
Response Message
Parameters | Length | Description |
---|---|---|
result_code | N/A | Success or Error code. Success = 0. Common Error Codes |
result_desc | 512 | If the resultCode is an error, this value describes the error. Common Error Codes |
txn_id | N/A | Unique payment transaction identifier. |
total_price | N/A | Net payment amount. Non-formatted numeric value. For Indonesia, Chile, South Korea, Taiwan, and Vietnam currency, decimals are not supported. |
txn_timeout | N/A | Transaction Timeout in Minutes. |
pay_instructions | 15 | If this value is populated, partner should display the instructions provided on screen to the customer. |
profile | N/A | user_id |
Sample of Response
Reference of USD Transactions
Please check out this guide to learn more about USD transactions.
Last updated