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

Card Payments

Card Payments Call Flow

Customers can complete their payments using a debit or credit card. The authorization process depends on the payment channel—for instance, entering card details directly on the Coda payment page with 3DS authentication or being redirected to the channel provider's page for verification.

Request Message

Parameters
Type
Length
Description

api_key

String

256

Mandatory API key provided by Coda. Refer to Getting started to find out how to get it.

project_id

String

10

*This field is only needed for v2.0 API

Mandatory

Project ID provided by Coda, unique for each title product. Refer to Getting started to find out how to get it.

order_id

String

64

Mandatory

Your unique identifier for the transaction

country

Number

N/A

Mandatory ISO 3166 based country code. Can refer to Country and Currency Codes

lang

String

2

Mandatory

2-character language code. See Language Tablefor options.

type

Number

1

1: Digital content, 2: Non-digital content

pay_type

Number

1

Mandatory

Card Payment use pay_type=6.

Refer Backend API for more details

pay_channel

Number

3

Mandatory Code for each payment channel.

email

String

128

Optional Only include this if email is required and not MSISDN.

merchant_name

String

128

Optional

The merchant name that will be displayed in an SMS message, if the partner wants to specify the partner name, please enter the name in this field.

The default value is empty.

items

ItemInfo

N/A

Mandatory

List of items being purchased by the users

items[].code

String

128

Mandatory

Code associated with the item on your side

items[].name

String

128

Mandatory Name of the item being purchased. Only supports latin characters.

items[].price

Number

N/A

Mandatory Price of the item inclusive of any taxes in the currency specified in the request.

profile

Map

N/A

Mandatory Refer Profile Info below for more details

Profile Info

Parameters
Type
Length
Description

name

String

128

Optional

Customer's Name.

user_id

String

128

Mandatory

Customer's user ID.

client_ip

String

15

Optional

Customer IP Address. (only support IPv4)

user_agent

String

512

Optional Customer's user agent data (details of browser and operating system).

email

String

Optional

The email address where the successful transaction receipt will be sent. Upon a successful payment, Coda will automatically deliver a digital receipt to this address. This feature is not enabled by default. To activate automated receipt delivery for your titles, please contact the payment enablement team at codapay_integration@coda.co.

Receipt example:

Sample Request

Response Message

Parameters
Type
Length
Description

txn_id

Number

N/A

Unique payment transaction identifier.

txn_timeout

Number

N/A

Transaction Timeout in Minutes.

result_code

Number

N/A

Success or Error code. Success = 0.

Error Code list please refer to Error Codes

result_desc

String

512

If the resultCode is an error, this value describes the error. Error Codes

total_price

Number

N/A

The total amount the user has paid for the transaction. This will always be in local currency.

pay_instructions

String

15

If this value is populated, the partner should display the instructions provided on screen to the customer.

profile

Object

N/A

Refer the Profile info below for more details

Profile Info

Parameters
Type
Length
Description

redirect_url

String

128

The payment gateway's redirect URL is returned only if the selected payment channel follows a redirect URL workflow.

merchantType

String

128

Please ignore this field.

user_id

String

128

Customer's user ID.

payment_code

Number

N/A

A code generated by payment channel.

Sample Response

Last updated

Was this helpful?