Set up your client for EBANX UPI QR payments
This reference lists the client parameters that you pass to Z.render or Z.renderWithErrorHandler to control the EBANX UPI QR payment flow on Payment Pages 2.0.
Render the Payment Page
To render the Payment Page, call the Z.render function and pass the following:
- A
paramsobject that contains the page identity values returned by the signature API (tenantId,id,token,signature, andkey), together with the UPI QR client parameters that control the flow. - A prepopulated fields object. Because a UPI QR page does not collect any details from the customer, pass an empty object.
- A callback function that handles the response after the customer completes the payment.
var params = {
tenantId: "<tenantId>",
id: "<UPI QR Payment Page ID>",
token: "<token>",
signature: "<signature>",
key: "<key>",
style: "inline",
submitEnabled: "true",
locale: "en",
field_currency: "INR",
doPayment: true,
storePaymentMethod: false,
field_accountId: "<Zuora account ID>",
field_authorizationAmount: "100.00",
param_gwOptions_shopperName: "<customer name>",
param_gwOptions_shopperEmail: "customer@example.com",
param_gwOptions_phoneNumber: "+919999999999",
param_gwOptions_address: "<address line>",
param_gwOptions_street_number: "<street number>",
param_gwOptions_city: "<city>",
param_gwOptions_state: "<state>",
param_gwOptions_zipcode: "<postal code>"
};
function callback(response) {
if (response.success) {
// response.refId is the ID of the UPI QR payment method created in Zuora.
// Use it to look up the payment method or the resulting payment.
} else {
// Handle the failure using response.errorCode and response.errorMessage.
}
}
Z.render(params, {}, callback);
After the page is rendered, the QR code is displayed, the customer scans it with their UPI app and authorizes the payment, and Zuora invokes your callback function with the result. The QR code display and the payment confirmation are handled inside the rendered Payment Page.
To accept UPI QR payments on EBANX, render a Payment Page 2.0 in your client application by following the instructions in Integrate Payment Pages 2.0. When you call Z.render or Z.renderWithErrorHandler, pass the client parameters described in the following sections to control the UPI QR flow.
Client parameters
The following table describes the client parameters that you can pass for EBANX UPI QR payments:
Parameters | Type | Description |
|---|---|---|
field_currency |
String | Required when you authorize an amount. EBANX UPI QR supports only INR. |
doPayment |
Boolean | Specifies whether to process a payment. Set to true to process a one-time payment for the authorized amount. Set to false or omit the parameter to create the payment method without an immediate charge. |
storePaymentMethod |
Boolean | Specifies whether to store the UPI QR payment method for future recurring UPI Autopay payments. Set to true to store the payment method. Set to false to process the payment without storing it. |
param_gwOptions_UpiMandateEnabled |
Boolean | Must be set to true when you store a payment method (storePaymentMethod=true). When you enable this parameter, Zuora submits the enrollment to EBANX UPI Autopay, creates a tokenized UPI payment method, and links the resulting mandate so that Zuora can process recurring payments off-session. |
field_upiTimerWindow |
Integer | Optional. The number of minutes for which the QR code remains valid. The default value is 5 minutes. |
param_gwOptions_shopperName |
String | Optional. The customer name that Zuora sends to EBANX. |
param_gwOptions_shopperEmail |
String | Optional. The customer email address that Zuora sends to EBANX. If you do not provide this parameter, Zuora uses the bill-to contact email when available. |
param_gwOptions_phoneNumber |
String | Optional. The customer phone number that Zuora sends to EBANX. If you do not provide this parameter, Zuora uses the bill-to contact phone number when available. |
param_gwOptions_address |
String | Optional. The customer address that Zuora sends to EBANX. |
param_gwOptions_street_number |
String | Optional. The customer street number that Zuora sends to EBANX. |
param_gwOptions_city |
String | Optional. The customer city that Zuora sends to EBANX. |
param_gwOptions_state |
String | Optional. The customer state that Zuora sends to EBANX. |
param_gwOptions_zipcode |
String | Optional. The customer postal code that Zuora sends to EBANX. |
Parameters for orphan payment method creation
To create an orphan payment method for UPI Autopay without processing an initial payment, use the following client parameters:
Parameter | Type | Description |
|---|---|---|
storePaymentMethod |
Boolean | Required. Set to true to store the payment method. |
param_gwOptions_UpiMandateEnabled |
Boolean | Required. Set to true to create the UPI Autopay mandate. |
param_gwOptions_subscription_name |
String | Required. The subscription or mandate name that you send to EBANX. |
param_gwOptions_shopperName |
String | Required. The customer name that you send to EBANX. |
param_gwOptions_shopperEmail |
String | Required. The customer email address that you send to EBANX. |
param_gwOptions_phoneNumber |
String | Required. The customer phone number that you send to EBANX. |
param_gwOptions_address |
String | Required. The customer address that you send to EBANX. |
param_gwOptions_street_number |
String | Required. The customer street number or apartment information that you send to EBANX. |
param_gwOptions_city |
String | Required. The customer city that you send to EBANX. |
param_gwOptions_state |
String | Required. The customer state that you send to EBANX. |
param_gwOptions_zipcode |
String | Required. The customer postal code that you send to EBANX. |
Mandate parameters
When you store a payment method for UPI Autopay, you can optionally provide the mandate parameters described in the following table. If you do not provide them, Zuora applies the EBANX default values.
| Parameter | Type | Description |
|---|---|---|
param_gwOptions_frequency | String | Optional. The mandate debit frequency for UPI Autopay, for example, on demand. |
param_gwOptions_subscription_name | String | Required. The subscription or mandate name for the UPI Autopay enrollment. |
param_gwOptions_min_amount | String | Optional. The minimum amount, in INR, that can be debited under the mandate. |
param_gwOptions_max_amount | String | Optional. The maximum amount, in INR, that can be debited under the mandate. |
param_gwOptions_start_date | String | Optional. The date when the mandate becomes active. |
param_gwOptions_expiration_date | String | Optional. The date when the mandate expires. |
Parameter combinations
The combination of doPayment and storePaymentMethod determines the flow, as described in the following table:
doPayment | storePaymentMethod | Result |
|---|---|---|
true | false | Zuora processes a one-time payment only. Zuora does not store a payment method or create a mandate. |
true | true | Zuora charges the customer the authorized amount and stores a UPI Autopay payment method for future recurring payments. |
false | true | Zuora stores a UPI Autopay payment method for future recurring payments without charging the full amount. Zuora charges a small validation amount and automatically refunds it. |
storePaymentMethod is true, param_gwOptions_UpiMandateEnabled must also be true. Otherwise, Zuora rejects the request to store the payment method.