API ReferenceEndpointsMerchant hosted
Initiate a hosted card transaction
Encrypts card data and initiates the hosted card transaction. The response includes redirection data for 3DS verification and may include secured card details when tokenization is enabled.
Authorization
basicAuth signatureAuth AuthorizationBasic <token>
In: header
X-Signature<token>
In: header
Header Parameters
X-MERCHANT-BROWSER-FINGERPRINT*string
Merchant browser fingerprint header shown in the docs.
X-MERCHANT-USER-AGENT*string
User agent forwarded by the merchant.
X-MERCHANT-DOMAIN*string
Merchant domain origin.
Format
uriX-MERCHANT-IP*string
Merchant IP address.
Request Body
application/json
TypeScript Definitions
Use the request body type in TypeScript.
Response Body
application/json
application/json
application/json
application/json
application/json
application/json
curl -X POST "https://api.uat.gateway.ompay.com/nac/api/v1/merchant-host/transaction/initiate" \ -H "X-MERCHANT-BROWSER-FINGERPRINT: string" \ -H "X-MERCHANT-USER-AGENT: string" \ -H "X-MERCHANT-DOMAIN: http://example.com" \ -H "X-MERCHANT-IP: string" \ -H "Content-Type: application/json" \ -d '{ "orderId": "string", "encryptedCardDetails": "string", "paymentMethod": "card", "cardHolderName": "string", "redirectionUrl": "http://example.com", "paymentMode": "card", "skipCVVandOTP": true, "skipCVVOnlyFlag": true, "apiType": "hosted" }'{
"resCode": 0,
"status": "string",
"data": {
"paymentId": "string",
"orderId": "string",
"receiptId": "string",
"paymentStatus": "string",
"amount": 0,
"currency": "string",
"redirectionData": {
"method": "POST",
"formData": "string"
},
"securedCardDetails": {
"customerId": "string",
"digitalCardId": "string"
}
}
}{
"resCode": 0,
"status": "failure",
"errMessage": "string"
}{
"resCode": 0,
"status": "failure",
"errMessage": "string"
}{
"resCode": 0,
"status": "failure",
"errMessage": "string"
}{
"resCode": 0,
"status": "failure",
"errMessage": "string"
}{
"resCode": 0,
"status": "failure",
"errMessage": "string"
}