Initiate a Payment
When integrating with Codapay's API, ensure you adhere to the following standards:
Use HTTPS protocol.
Support for TLS 1.2 or higher is mandatory.
Codapay’s API can interact with RESTful web services, providing flexibility for your integration needs.
Initiating a Transaction:
Codapay offers two primary interfaces to manage payment transactions:
The Init() Interface: This is the primary interface partners use to transmit the purchase order details from partner's website to Codapay. It's essential for starting the payment process.
The InquiryPaymentResult() Interface: While optional, partners can use this interface to query the status of a transaction, providing them with the flexibility to track payments post-initiation.
Details on the Init() Method:
Purpose: The Init() method is designed to be called by partner's web application, where it sends the purchase information directly to Codapay's system.
Response: Upon calling this method, Codapay will return a response that includes either a success or an error message, along with additional relevant information to assist in the transaction process.
Request Message
Name | Type | Length | Description |
---|---|---|---|
apiKey | String | 256 | API key assigned by Coda. (Mandatory) |
orderId | String | 64 | Merchant assigned unique transaction identifier.(Mandatory) |
country | Numeric | N/A | ISO 3166 based country code. (Mandatory) Refer to Country and Currency Codes |
currency | Numeric | N/A | ISO 4217 based country code. (Mandatory) Refer to Country and Currency Codes |
payType | Numeric | N/A | Payment type i.e., Carrier Billing is 1. (Mandatory) |
items | ItemInfo | N/A | See Item info table. (Mandatory) |
profile | Map | N/A | See Other details in Profile Fields in the request table for more details. (Mandatory) |
Parameters that Require Special Attention
item > names (Mandatory)
names > Must use English alphabets
profile > user_id (Mandatory)
Response Message: InitResult Type
Name | Type | Length | Description |
---|---|---|---|
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 |
txnId | Numeric | N/A | Unique payment transaction identifier. This txnId must pass to our iframe URL. |
profile | Map | N/A | Additional transaction information. |
Sample JSON Response
Successful response code
Coda will return with resultCode=0 for successful order initiation.
Last updated