Boleto
Overview
Boleto is a payment method that allows customers to perform purchases by using vouchers. Purchases are performed by using Payment Page and Gate. Download the logo in vector format here. |
Payment method type | Payments by using vouchers |
---|---|
Countries and regions | Brazil |
Payment currencies | BRL, USD |
Currency conversion | |
Purchases | |
Payouts | payout processing can be available depending on the payment processing provider, refer to your Monetix key account manager for more information |
COF-payments | |
Full refunds | |
Partial refunds | |
Chargebacks | |
Notes |
|
Onboarding and access fee | Refer to your key account manager at Monetix |
Interaction diagram
Payment processing by using the Boleto payment method requires merchant's web service, one of Monetix interfaces, and the Monetix payment platform, as well as provider's technical facilities and payment kiosks.
Operations support
Interfaces | Amounts | |||||
---|---|---|---|---|---|---|
Payment Page | l | Gate | Dashboard | Minimum | Maximum | |
Purchases | * | * |
* For the most recent amount limits, contact your Monetix Key Account Manager.
You can check the payment amount limits in your project by using Dashboard. To check your payment amount limits, go to Dashboard, select the Projects section and click the Payment methods tab.
Processing scenarios
In the Boleto method, a purchase operation is performed on Payment Page or in merchant web service, where a customer provides the necessary information and than gets a voucher. The customer finishes the purchase operation by using the voucher in one of the available payment kiosks. Refunds are performed with the notification to a customer about the funds crediting to the bank account.
The sections that follow provide detailed information about what you need to perform payments and how you can analyze the information on payments and operations.
Purchase by using Payment Page
General information
In the Boleto method, to perform a purchase by using Payment Page, the merchant web service should send a request with all the required parameters and signature to the Monetix URL and get the callback with the payment result from the payment platform. When opening Payment Page, you can have Payment Page opened with the Boleto method selected. For more information about preselecting payment methods, see in Preselecting payment methods.
The full sequence and particularities of the purchase process are provided below.
- A customer initiates a purchase on the merchant's web service.
- The web service sends the request for Payment Page opening to the specified Monetix URL.
- The request for opening is redirected to the payment platform.
- The payment platform performs the initial request processing that involves validation of the required parameters and signature.
- Requested Payment Page is generated into the Monetix payment platform as specified in the project settings and the request parameters.
- Payment Page is displayed to the customer.
- The customer selects the Boleto method.
- The payment form is displayed to the customer corresponding to the request.
- The customer enters personal data.
- The payment platform receives the purchase request for payment processing.
- The payment platform performs the internal purchase request processing and sends it to the Boleto service.
- The purchase request is processed on the Boleto service side.
- The Boleto service generates a voucher for payment in kiosks or the redirection to the Boleto service data and send it to the payment platform. Depending on the payment processing provider, the validity period of the payment voucher can either be 8 days (but a customer has 30 days to complete the payment by contacting to the bank) or 3 days.
- The voucher or redirection data is sent to the Payment Page.
- The voucher is displayed to the customer on Payment Page or on the Boleto side after redirection. The payment status
awaiting customer action
orawaiting redirect result
(depending on the payment processing provider) remains until the customer completes the payment. - The customer completes all the payment steps required in one of the payment kiosks using the received voucher.
- The payment is processed on the kiosks service side.
- The kiosks service sends the result notification to Boleto.
- The Boleto service sends the result notification to the payment platform.
- The payment platform sends a callback with the payment result to the web service.
- The customer receives the payment result from the web service.
The sections that follow discuss in more details of the request format and the Payment Page parameters to use in the Boleto payment method and provide the information on the format of callbacks with payment results. For the general information on how to use the API, see Payment Page API Description.
Request format
There are several things you need to consider when using the Boleto method:
- You must provide values for the basic minimum of parameters. Listed below are the parameters that are required for any payment method:
- customer_id—unique ID of the customer within your project
- customer_first_name—customer first name
- customer_last_name—customer last name
- customer_email—customer email address
- project_id—the project ID obtained from Monetix
- payment_id—payment ID unique within the project
- payment_currency—payment currency in ISO-4217 alpha-3 format
- payment_amount—payment amount in minor currency units without any decimal point or comma except for cases where the currency does not have any minor currency units. If the currency has no minor units (that is, the number of digits for minor currency units is zero), then you must set this parameter to the amount in the major currency units. For the information on whether the currency has any minor units, see Currency codes.
Depending on the payment processing provider, you may be required to specify an integer amount, refer to your Monetix key account manager for details.
- Additionally, the following customer data should be passed:
- customer_address—customer address
- customer_zip—customer post code
- identify_doc_number—number of the identity document, should content 11 or 14 digits.
- The currency of payment can be BRL or USD.
- After you specify all the parameters you need, you must create the signature for the request. For instructions on how to sign a payment request, see Signature generation and verification.
- If you need to have payment form displayed with the Boleto method selected, set the force_payment_method parameter to
boleto
. - If required, you can also add any other additional parameters Payment Page supports.
Here is an example of data from a request for Payment Page opening:
EPayWidget.run( { payment_id: 'X03936', payment_amount: 1000, payment_currency: 'BRL', project_id: 0, customer_id: '123', customer_first_name: 'Paul', customer_last_name: 'Marques', customer_email: 'paulmarques@example.com', customer_address: 'Avenida das Nações', customer_zip: '123456', identify_doc_number: '84887177100', signature: "kUi2x9dKHAVNU0FYldJrxh4yo+52Kt8KU+Y1Y4HASCQ9vySO\/RLCvhtT4DqtVUk...==" } )
For information about all parameters available in the Payment Page, see Payment Page invocation parameters.
Callback format
The Boleto method uses the standard format for callbacks to deliver purchase results. For more information, see Callbacks in Payment Page.
Here is an example of callback with an information about successful 100,00 USD
purchase made by the customer in the 842
project.
{
"project_id": 842,
"payment": {
"id": "EP8a3e-3e96",
"type": "purchase",
"status": "success",
"date": "2019-06-03T12:09:38+0000",
"method": "boleto",
"sum": {
"amount": 10000,
"currency": "USD"
},
"description": ""
},
"operation": {
"id": 1001313740,
"type": "sale",
"status": "success",
"date": "2019-06-03T12:09:38+0000",
"created_date": "2019-06-03T12:08:52+0000",
"request_id": "46b8b94eabf",
"sum_initial": {
"amount": 10000,
"currency": "USD"
},
"sum_converted": {
"amount": 10000,
"currency": "USD"
},
"provider": {
"id": 1414,
"payment_id": "9d7e3e16b6a5",
"auth_code": ""
},
"code": "0",
"message": "Success"
},
"signature": "hTnUho5lgWxu+wgKzmhLdjawVTrcq9KiR/u/xc3f53e5d8PwovSQGtyFSH7OBlJ8bQ=="
}
Here is an example of callback for a denied purchase rejected due to inappropriate payment currency in the request.
{
"project_id": 842,
"payment": {
"id": "EP2ea6-f489",
"type": "purchase",
"status": "decline",
"date": "2019-06-03T12:14:18+0000",
"method": "boleto",
"sum": {
"amount": 1000,
"currency": "EUR"
},
"description": ""
},
"operation": {
"id": 2001313740,
"type": "sale",
"status": "decline",
"date": "2019-06-03T12:14:18+0000",
"created_date": "2019-06-03T12:13:38+0000",
"request_id": "d5978bf20bae024",
"sum_initial": {
"amount": 1000,
"currency": "EUR"
},
"sum_converted": {
"amount": 1000,
"currency": "EUR"
},
"provider": {
"id": 1414,
"payment_id": "D-30006-7729dab9-3782-4c0a-8192-840622f63f08",
"auth_code": ""
},
"code": "20000",
"message": "General decline"
},
"signature": "eL+OigWVAgeT85JjOOUIkg5PyKCPYnwOE2o+T0lKYy+MkG9SCynp47KzdImN3tAy0kA=="
}
Related topics
The following topics might be useful when implementing payments through Payment Page:
Purchase by using Gate
General information
In the Boleto methods, when processing a purchase by using Gate, the merchant web service is required to do the following:
- Send a request with all the required parameters and signature to the Monetix URL.
- Get the callback with the data to redirect the customer to the Boleto service.
- Receive the callback with the payment result from the payment platform.
The following diagram provides the detailed picture of the payment processing procedure.
- A customer initiates a purchase through the Boleto method on the merchant's web service side.
- The web service sends the request for processing the purchase by using Gate to the specified Monetix URL.
- The payment platform receives the request for processing the purchase from Gate.
- The payment platform performs the initial request processing that includes validation of the required parameters and signature.
- The payment platform sends the response with request receipt confirmation and correctness check result to the web service. For more information, see Response structure.
- The payment platform performs the internal payment request processing and redirects the request to the Boleto service.
- The request is processed on the Boleto side.
- The Boleto service generates a voucher for payment in kiosks or the redirection to the Boleto service data and send it to the payment platform. Depending on the payment processing provider, the validity period of the payment voucher can either be 8 days (but a customer has 30 days to complete the payment by contacting to the bank) or 3 days.
- The voucher or redirection data is sent to the web service.
- The voucher is displayed to the customer on Payment Page or on the Boleto site after redirection. The payment status
awaiting customer action
orawaiting redirect result
(depending on the payment processing provider) remains until the customer completes the payment. - The customer completes all the payment steps required in one of the payment kiosks using the received voucher.
- The payment is processed on the kiosks service side.
- The kiosks service sends the result notification to Boleto.
- The Boleto service sends the result notification to the payment platform.
- The payment platform sends a callback with the payment result to the web service.
- The customer receives the payment result from the web service.
The sections that follow discuss in more details the request format and the Gate parameters to use in the Boleto payment method and provide the information about formats of the data for redirecting customers and the information about the format of callbacks with payment results. The general information about working with API see in the API Description section.
Request format
There are several things you must consider when using purchase requests in the Boleto method:- You perform purchase by sending the
/v2/payment/voucher/boleto/sale
request by using POST (HTTP) method. This is payments by using vouchers request group: /v2/payment/voucher/{payment_method}/sale - The following objects and parameters must be specified in the request:
- general—object with general request identification information:
- project_id—the project ID you obtained from Monetix
- payment_id—payment ID unique within the project
- signature—signature created after you specify all the required parameters. For more information about signature generation, see Signature generation and verification
- customer—object with customer information:
- id—the unique ID of the customer within your project
- ip_address—customer device IP
- first_name—customer first name
- last_name—customer last name
- email—customer email address
- address—customer address
- zip—customer post code
- identify— object with information about the document which establishes identity:
- doc_number—number of the identity document, should consist of 11 or 14 digits
- payment—object with purchase information:
- amount—purchase amount in minor currency units without any decimal point or comma except for cases where the currency does not have any minor currency units. If the currency has no minor units (that is, the number of digits for minor currency units is zero), then you must set this parameter to the amount in the major currency units. For the information on whether the currency has any minor units, see Currency codes.
Depending on the payment processing provider, you may be required to specify an integer amount, refer to your Monetix key account manager for details.
- currency—code of purchase currency in the ISO-4217 alpha-3 format
- amount—purchase amount in minor currency units without any decimal point or comma except for cases where the currency does not have any minor currency units. If the currency has no minor units (that is, the number of digits for minor currency units is zero), then you must set this parameter to the amount in the major currency units. For the information on whether the currency has any minor units, see Currency codes.
- return_url—object with the information where to redirect the customer to when the payment is completed:
- success—the URL to redirect the customer to after the payment is successfully completed
- general—object with general request identification information:
- The currency of payment can be BRL or USD.
- The following parameters with the return URLs are optional, but we strongly advise you to specify them in the request to provide your customer a better user experience. If you don't specify any parameters of the return_url object in the request, by default Gate will redirect the customer to the URL specified in your project in Monetix.
- return_url—object with the information where to redirect the customer to when the payment is completed or prematurely terminated by the customer:
- decline—the URL to redirect the customer to after the payment is declined.
- return—the URL to redirect the customer to when they prematurely terminate the payment. This URL is also used if the decline parameter is not specified in the request.
- return_url—object with the information where to redirect the customer to when the payment is completed or prematurely terminated by the customer:
- If required, you can also add any other additional parameters Gate supports.
Here is an example of data from a purchase request in the Boleto method.
{ "general": { "project_id": 580, "payment_id": "38202000002316", "signature": "h4ZxUifBNaLuvlYXyvBuqG/tRr67tWadwpXnBeF+iSR0K5OFdK0B9CjMCc2DbkDrk3qhLg==" }, "customer": { "id": "589256", "email": "johndoe@example.com", "first_name": "John", "last_name": "Doe", "address": "Main street,23", "zip": "123456", "identify": { "doc_number": "84887177100" }, "ip_address": "66.249.64.45" }, "payment": { "amount": 10000, "currency": "USD", "description": "38202000002316" }, "return_url": { "success": "https://example.com/success/", "decline": "https://example.com/decline/", "return": "https://example.com/return/" } }
Formats of the customer redirection data
After receiving and processing your purchase request, the payment platform sends a callback to your web service containing the data to redirect the customer to the Boleto service.
To redirect the customer, use the values of the following parameters in the redirect_data object:
- url—the URL to redirect the customer to
- body—the data to be sent in the request body
- method—the HTTP method to get an HTML page of the website (for example, POST or GET)
- encrypted—this is the service parameter. Ignore the data it contains.
Here is an example of a piece of callback containing the data to redirect the customer.
"redirect_data": { "method": "GET", "body": [], "encrypted": [], "url": "https://example.com/redirect" }
Callback format
The Boleto method uses the standard format for callbacks to deliver purchase results. For more information, see Callbacks in Gate.
The following is the example of a callback with an information about successful 100,00 USD
purchase made by a customer in the 842
project.
{
"project_id": 842,
"payment": {
"id": "EP8a3e-3e96",
"type": "purchase",
"status": "success",
"date": "2019-06-03T12:09:38+0000",
"method": "boleto",
"sum": {
"amount": 10000,
"currency": "USD"
},
"description": ""
},
"operation": {
"id": 1001313740,
"type": "sale",
"status": "success",
"date": "2019-06-03T12:09:38+0000",
"created_date": "2019-06-03T12:08:52+0000",
"request_id": "46b8b94eabf",
"sum_initial": {
"amount": 10000,
"currency": "USD"
},
"sum_converted": {
"amount": 10000,
"currency": "USD"
},
"provider": {
"id": 1414,
"payment_id": "9d7e3e16b6a5",
"auth_code": ""
},
"code": "0",
"message": "Success"
},
"signature": "hTnUho5lgWxu+wgKzmhLdjawVTrcq9KiR/u/xc3f5d8PwovSQGtyFSH7OBlJ8bQ=="
}
Here is an example of callback for a denied purchase rejected due to inappropriate payment currency in the request.
{
"project_id": 842,
"payment": {
"id": "EP2ea6-f489",
"type": "purchase",
"status": "decline",
"date": "2019-06-03T12:14:18+0000",
"method": "boleto",
"sum": {
"amount": 1000,
"currency": "EUR"
},
"description": ""
},
"operation": {
"id": 2001313740,
"type": "sale",
"status": "decline",
"date": "2019-06-03T12:14:18+0000",
"created_date": "2019-06-03T12:13:38+0000",
"request_id": "d5978bf20bae024",
"sum_initial": {
"amount": 1000,
"currency": "EUR"
},
"sum_converted": {
"amount": 1000,
"currency": "EUR"
},
"provider": {
"id": 1414,
"payment_id": "D-30006-7729dab9-3782-4c0a-8192-840622f63f08",
"auth_code": ""
},
"code": "20000",
"message": "General decline"
},
"signature": "eL+OigWVAgeT85JjOOUIkg5PyKCPYnwOT0lKYy+MkG9SCynp47KzdImN3tAy0kA=="
}
Related topics
The following topics might be useful when implementing payments through Payment Page:
Analysis of payments results
As with other payment methods Monetix offers, when using this method, you have several options to analyze the information about payments and operations.
You can load and analyze all the necessary information in Dashboard (dash-light.trxhost.com
), for instance you can use the analytic panels in the Analytics section for this purpose.
Also, you can export the information for further analysis by using third party analytical tools. The following options are available:
- Dashboard allows you to download reports in CSV format by using the tools in the Reports section. You can perform export as a one-time or regular download of data to your local computer.
- Data API allows you to have payment information exported in JSON format and delivered to a URL you specify. The payment information is exported by means of sending requests to the /operations/get endpoint.
If you have any further questions regarding payment data analysis, contact Monetix technical support.