Create Transaction
For api endpoints refer here
Request
To initiate a transaction, generate a POST request to the given URL with the request body in the format below:
{
"amount": "220.0",
"key": "dummy-key-1234-5678-91011",
"paymentCurrencyAlpha3Code": "GBP",
"redirectionUrl": "https://client-frontend-transaction-completion-handler",
"paymentInstrumentType": "CARD",
"paymentInstrumentSubType": "DEBIT_CARD",
"billingCountryAlpha2Code": "GB",
"extraInfo": {
"firstName": "John",
"lastName": "Doe",
"emailId": "john.doe@example.com",
"customerUniqueId": 1234567890,
"phoneNumber": 1234567890,
"city": "cty value",
"zip": "123123",
"country": "US",
"state": "NY",
"address1": "please provide address line no 1",
"address2": "please provide address line no 2",
"billingAddress": {
"firstName": "John",
"lastName": "Doe",
"email": "john.doe@example.com",
"phone": "1234567890",
"city": "New York",
"address": "123 Main St",
"zip": "10001",
"state": "NY",
"country": "US"
},
"shippingAddress": {
"firstName": "John",
"lastName": "Doe",
"email": "john.doe@example.com",
"phone": "1234567890",
"city": "New York",
"address": "123 Main St",
"zip": "10001",
"state": "NY",
"country": "US"
}
},
}
Request Description
-
amount: The transaction amount. (required)
-
Create key: The webhook key. Generate this through the keys section by clicking "new key".
On successful submission copy the value under Api Key Column.
-
paymentCurrencyAlpha3Code: Currency code (ISO 4217) for the transaction. Currency Codes. (required)
-
redirectionUrl: URL to redirect after payment submission. (required)
-
paymentInstrumentType: Preferred instrument for the transaction. (required)
-
paymentInstrumentSubType: Preferred sub-instrument for the transaction.
-
extraInfo:
- firstName: Customer's first name. (required)
- lastName: Customer's last name. (required)
- emailId: Customer's email address. (required)
- customerUniqueId: Customer's unique Id. (required)
- phoneNumber: Customer's Phone Number. (required)
- city: Customer's address city. (required)
- zip: Customer's address zip code. (required)
- country: Customer's country alpha2. (required)
- state: Customer's state iso2. (required)
- address1: Customer's address line no 1. (required)
- address2: Customer's address line no 2. (required)
- billingAddress
- firstName: Customer's firstName. (required)
- lastName: Customer's lastName. (required)
- email: Customer's email. (required)
- phone: Customer's phoneNumber. (required)
- city: Customer's address city. (required)
- address: Customer's address. (required)
- zip: Customer's address zip. (required)
- state: Customer's address state. (required)
- country: Customer's address country. (required)
- shippingAddress
- firstName: Customer's firstName. (required)
- lastName: Customer's lastName. (required)
- email: Customer's email. (required)
- phone: Customer's phoneNumber. (required)
- city: Customer's address city. (required)
- address: Customer's address. (required)
- zip: Customer's address zip. (required)
- state: Customer's address state. (required)
- country: Customer's address country. (required)
billingCountryAlpha2Code: Alpha-2 code of the country from where the transaction has been initiated.
Response
On successful submission of the request, it should return a response in the format below with status code 200:
{
"transactionCode": "T01012024001",
"amount": 220.0,
"state": "INITIATED",
"currency": "GBP",
"instrument": "CARD",
"subInstrument": "DEBIT_CARD",
"redirectionUrl": "https://payment-page.html?data=eyJleHRyYUluZm8iOnsiZmlyc3RO"
}
Response Description
- transactionCode: The code of the newly created transaction.
- amount: The transaction amount.
- state: The state of the transaction.
- currency: Currency code of the transaction.
- instrument: Instrument selected for the transaction. For possible values, please refer to the Payment Instrument and Payment Sub Instrument compatibility table below.
- subInstrument: Sub-instrument selected for the transaction. For possible values, please refer to the Payment Instrument and Payment Sub Instrument compatibility table below.
- redirectionUrl: The URL to redirect to for receiving details of the payment device on receiving a response from the transaction API.