Set up your client code for EBANX one-time payment flows
Configure your client code to integrate Payment Pages 2.0, specifying parameters for authorization and invoice processing.
Follow the instructions in Integrate Payment Pages 2.0. When rendering the Payment Page form, specify the following parameters in the Z.render function to support the use case of authorization amount processing or invoice processing .
|
Parameter |
Applicable use case |
Description |
|---|---|---|
|
doPayment |
Both |
Required Type: boolean Default: To support processing PIX payments in one-time payment flows, If it is |
|
storePaymentMethod |
Both |
Type: boolean Default: To support processing PIX payments in one-time payment flows, |
|
field_accountId |
Both |
Required The payment method will be created for the specified account. For more information about this parameter, see Client parameters for Payment Pages 2.0. |
|
authorizationAmount |
Authorization amount processing |
Required for authorization amount processing The amount of the one-time payment that will be sent to the gateway. For more information about this parameter, see Client parameters for Payment Pages 2.0. |
|
field_currency |
Authorization amount processing |
Required for authorization amount processing The currency of the one-time payment amount. For more information about this parameter, see Client parameters for Payment Pages 2.0. |
|
documents |
Invoice processing |
Required for invoice processing An array of invoices to be paid in this transaction, containing the following fields:
|
Here is an example for authorization amount processing.
var params = {
doPayment:"true",
storePaymentMethod:"false",
field_accountId:"testc0f87596f2f301759c29443622fa",
authorizationAmount:"99",
field_currency:"BRL"
};
Here is an example for invoice processing.
var params = {
doPayment:"true",
storePaymentMethod:"false",
field_accountId:"testc0f87596f2f301759c29443622fa",
documents:"[{\"type\": \"invoice\", \"ref\": \"INV0000001\"}, {\"type\": \"invoice\", \"ref\": \"INV0000002\"}]"
};
Step 5. Implement callback response
See Advanced Integration of Payment Pages 2.0 for more information.