Set up your client for EBANX credit card payments
This reference lists the client parameters, callback response fields, and prerequisites for rendering an EBANX credit card Payment Page that processes transactions in India.
Prerequisites
- Configure the EBANX payment gateway with the Merchant Country set to India, and create a Credit Card Payment Page that uses this gateway.
- Ensure that your server can generate the digital signature for the page. For one-time payments, include the account and payment details in the signed payload. For more information, see Payment Page signature for EBANX credit card payments.
Client parameters
In addition to the standard Payment Pages 2.0 parameters (tenantId, id, token, signature, and key), you can pass the following parameters to control the EBANX credit card flow.
| Parameter | Type | Description |
|---|---|---|
field_currency | String | Transaction currency. For EBANX in India, use INR. Required when an amount is authorized. |
field_accountId | String | ID of the Zuora customer account. Required to process a payment from the Payment Page. |
field_authorizationAmount | String | Amount to charge the customer. Required when you process a one-time payment (doPayment=true). |
doPayment | Boolean | Controls whether a payment is processed. Set to true to process a one-time payment for the authorized amount. Set to false or omit the parameter to create the credit card payment method without an immediate charge. |
param_gwOptions_IpAddress | String | Optional. IP address of the customer, sent to EBANX for risk screening. If this parameter is not provided and Auto-capture IP Address is activated on the gateway, Zuora sends the IP address automatically. |
param_gwOptions_deviceId | String | Optional. Device fingerprint or session identifier for the device of the customer, sent to EBANX for fraud screening. |
param_gwOptions_mandate_id | String | Optional. Mandate identifier from a previous customer-initiated transaction. Use this parameter to reference stored credentials for merchant-initiated (recurring) transactions. |
Example
The following example renders a credit card Payment Page and processes a one-time payment in INR:
var params = {
tenantId: "<tenantId>",
id: "<Credit Card Payment Page ID>",
token: "<token>",
signature: "<signature>",
key: "<key>",
style: "inline",
submitEnabled: "true",
locale: "en",
field_currency: "INR",
field_accountId: "<Zuora account ID>",
field_authorizationAmount: "100.00",
doPayment: true,
param_gwOptions_IpAddress: "203.0.113.10",
param_gwOptions_deviceId: "<device fingerprint>"
};
function callback(response) {
if (response.success) {
// response.refId is the ID of the credit card payment method created in Zuora.
} else {
// Handle the failure using response.errorCode and response.errorMessage.
}
}
Z.render(params, {}, callback);
To create the payment method without processing a payment, for example, to store a card for later recurring billing, omit doPayment or set it to false.
Callback response fields
After the customer enters the card details and completes 3D Secure 2.0 authentication, Zuora invokes your callback function with a response object that contains the following fields.
| Field | Description |
|---|---|
success | Indicates whether the credit card payment method was created. For one-time payments, also indicates whether the payment was processed successfully. |
refId | ID of the credit card payment method created in Zuora. |
errorCode, errorMessage | Returned when success is not true. Use these fields to display an appropriate message and to allow the customer to retry. |