About PagBrasil
General information about payment methods via PagBrasil
The majority of online payments in Brazil are made using credit cards. In 75% of these payments, Brazilian customers pay by instalment. The merchant is credited the full amount while the bank earns fees on the instalment payments. Only a third of all credit cards in Brazil can be used for international eCommerce. The majority of local cards, even issued by Visa, MasterCard or Amex, require contracts with local partners for these cards to be accepted and to achieve a good exchange rate. Domestic Brazilian cards include Hipercard, Elo and Aura.
The Cash-in solution of Boleto Bancário is another widely used payment method in eCommerce. The merchant provides the buyer with a type of pro forma invoice which can be paid at cash machines, banks, post offices, retailers or via Internet banking. Purely online transfers like PagBrasilOTF are also expected by customers from merchants in Brazil.
Similar to Boleto Bancário, the new Cash-in solution called PEC Flash is available for e-commerce consumers, who do not own a bank account or credit card, to pay for their online orders at any lottery agency. PEC Flash is very easy to use and payment is confirmed in few minutes.
Card Scheme |
---|
VISA |
MasterCard |
AMEX |
DINERS |
Elo |
Aura |
Hipercard |
Process flow chart
PagBrasilOTF process flow
PagBrasil Boleto Bancário process flow
Paygate interface
Format Description a alphabetical as alphabetical with special characters n numeric an alphanumeric ans alphanumeric with special characters ns numeric with special characters bool boolean expression (true or false) 3 fixed length with 3 digits/characters ..3 variable length with maximum 3 digits/characters enum enumeration of allowed values dttm ISODateTime (YYYY-MM-DDThh:mm:ss) Abbreviation Description CND condition M mandatory O optional C conditional Notice: Please note that the names of parameters can be returned in upper or lower case.Definitions
Data formats
Abbreviations
Comment If a parameter is mandatory, then it must be present If a parameter is optional, then it can be present, but it is not required If a parameter is conditional, then there is a conditional rule which specifies whether it is mandatory or optional
Credit card payment with PagBrasil via form interface
Payments with PagBrasil are made via the standard Paygate form interface for credit card payments. In order to execute an SSL credit card payment with PagBrasil via a Paygate form, please use the following URL:
https://www.computop-paygate.com/payssl.aspx |
Notice: For security reasons, Computop Paygate rejects all payment requests with formatting errors. Therefore, please use the correct data type for each parameter. The following table describes the encrypted payment request parameters:
Parameters for credit card payments with PagBrasil
To adapt the layout of the SSL-page to your shop you can use the following unencrypted parameters to configure colours, fonts and images.
Layout parameters for Paygate forms for credit card payments with PagBrasil
The following table gives the result parameters which Computop Paygate transmits to URLSuccess or URLFailure and URLNotify. If you have specified the Response=encrypt parameter, the following parameters are sent Blowfish encrypted to your system: pls. be prepared to receive additional parameters at any time and do not check the order of parameters
the key (e.g. MerchantId, RefNr) should not be checked case-sentive
Return parameters for URLSuccess, URLFailure and URLNotify with PagBrasil
The following table shows the Federal States of Brazil as well as their official Brazilian abbreviation which must be used in the AddrState transfer parameter.
Federal State | Abbreviation |
---|---|
Acre | AC |
Alagoas | AL |
Amapá | AP |
Amazonas | AM |
Bahia | BA |
Ceará | CE |
Distrito Federal | DF |
EspÃrito Santo | ES |
Goias | GO |
Maranhão | MA |
Mato Grosso | MT |
Mato Grosso do Sul | MS |
Minas Gerais | MG |
Pará | PA |
ParaÃba | PB |
Paraná | PR |
Pernambuco | PE |
Piauà | PI |
Rio de Janeiro | RJ |
Rio Grande do Norte | RN |
Rio Grande do Sul | RS |
Rondônia | RO |
Roraima | RR |
Santa Catarina | SC |
São Paulo | SP |
Sergipe | SE |
Tocantins | TO |
Federal States of Brazil
Credit card payment via Server-to-Server connection
In order to execute a SSL credit card payment with PagBrasil (Brazil) via a server-to-server connection, please use the following URL:
https://www.computop-paygate.com/direct.aspx |
Notice: For security reasons, Computop Paygate rejects all payment requests with formatting errors. Therefore, please use the correct data type for each parameter. The following table describes the encrypted payment request parameters:
Parameters for credit card payments with PagBrasil via socket connection
The following table describes the result parameters with which the Computop Paygate responds to your system pls. be prepared to receive additional parameters at any time and do not check the order of parameters
the key (e.g. MerchantId, RefNr) should not be checked case-sentive
Results parameters for socket connection for PagBrasil
In addition to the response of the payment request session, Paygate sends a notification to the URL deposited in Paygate or stated in the parameter [URLNotify], depending on the card brand and the configuration settings of the merchant. This is generally the case for payments with a card of the brand Hipercard (Itau).
In addition, Paygate sends chargeback notifications to the URLNotify for all supported card brands, if the merchant in question is correspondingly configured in Paygate. The chargeback notification contains these parameters
action=CHARGEBACK&chargebackamount={value}.
The following table describes the result parameters with which the Computop Paygate responds to your system pls. be prepared to receive additional parameters at any time and do not check the order of parameters
the key (e.g. MerchantId, RefNr) should not be checked case-sentive
Response parameters to URLNotify for PagBrasil payments with Hipercard
PagBrasilOTF online transfer
In order to make a payment with PagBrasilOTF, please use the following URL:
https://www.computop-paygate.com/BrazilOTF.aspx |
Notice: For security reasons, Computop Paygate rejects all payment requests with formatting errors. Therefore, please use the correct data type for each parameter. The following table describes the encrypted payment request parameters:
Parameters for online transfers with PagBrasil
The following table gives the result parameters which Computop Paygate transmits to URLSuccess or URLFailure and URLNotify. If you have specified the Response=encrypt parameter, the following parameters are sent Blowfish encrypted to your system: pls. be prepared to receive additional parameters at any time and do not check the order of parameters
the key (e.g. MerchantId, RefNr) should not be checked case-sentive
Response parameters for URLSuccess, URLFailure and URLNotify with PagBrasilOTF
Cash payment with PagBrasil Boleto Bancário
In order to execute a cash payment with PagBrasil Boleto Bancário (Brazil) via a server-to-server connection, please use the following URL:
https://www.computop-paygate.com/BoletoBancario.aspx |
Notice: For security reasons, Computop Paygate rejects all payment requests with formatting errors. Therefore, please use the correct data type for each parameter. The following table describes the encrypted payment request parameters:
MerchantID | ans..30 | M | MerchantID, assigned by Computop. Additionally this parameter has to be passed in plain language too. |
TransID | ans..64 | M | TransactionID which should be unique for each payment |
RefNr | ans..30 | M | Unique reference number. Format must be mutually agreed beforehand with Computop! |
Amount | n..10 | M | Amount in the smallest currency unit (e.g. BRL Centavos) Please contact the helpdesk, if you want to capture amounts < 100 (smallest currency unit). |
Currency | a3 | M | Currency, three digits DIN / ISO 4217. Only BRL permitted. |
MAC | an64 | M | Hash Message Authentication Code (HMAC) with SHA-256 algorithm |
UserData | ans..1024 | O | If specified at request, Paygate forwards the parameter with the payment result to the shop |
URLNotify | ans..256 | O | Complete URL which Paygate calls up in order to notify the shop about the payment result. The URL may be called up only via port 443 It may not contain parameters: Use the UserData parameter instead. |
Name | ans..128 | M | Name of the customer |
AddrStreet | ans..46 | M | Customer's street name (Optional, if agreed with PagBrasil and Computop) |
AddrCity | ans..40 | M | Customer's town/city (Optional, if agreed with PagBrasil and Computop) |
AddrZip | ans..8 | M | Customer's post code (Optional, if agreed with PagBrasil and Computop) |
AddrState | a2 | M | Abbreviation of the customer’s Federal State. See the table aove for the Federal States of Brazil. (Optional, if agreed with PagBrasil and Computop) |
TaxNumber | n11/n14 | M | In Brazil there are two kinds of tax numbers: CPF for persons and CNPJ for companies. CPF: 11 characters without separators, e.g. 12312312312 CNPJ: 14 characters without separators, e.g. 12345678000123 (Optional, if agreed with PagBrasil and Computop) |
ans..128 | M | Customer's email address (Optional, if agreed with PagBrasil and Computop) | |
Phone | ans..40 | M | Customer's phone number (Optional, if agreed with PagBrasil and Computop) |
OrderDesc | ans..768 | M | Description of purchased goods, unit prices etc. |
ArticleList | ans..254 | M | Description of the goods purchased. Example: ProductName; Quantity+ProductName;Number The product and the quantity are indicated on the customer’s bill. |
Expiration | n..3 | O | Number of days for which the payment form is valid |
ReqID | ans..32 | O | To avoid double payments, enter an alphanumeric value which identifies your transaction and may be assigned only once. If the transaction is submitted again with the same ReqID, Paygate will not carry out the payment, but will just return the status of the original transaction. Please note that the Paygate must have a finalized transaction status for the first initial action. Submissions with identical ReqID for an open status will be processed regularly. |
Custom | ans..1024 | O | The merchant can submit several values separated by | which are returned unencrypted and separated by &. Custom=session=123|id=456 will change in the answer to Session=123&id=456 |
Parameters for payments with Boleto Bancário via socket connection
The following table describes the result parameters with which the Computop Paygate responds to your system pls. be prepared to receive additional parameters at any time and do not check the order of parameters
the key (e.g. MerchantId, RefNr) should not be checked case-sentive
Parameter | Format | CND | Description |
---|---|---|---|
MID | ans..30 | M | MerchantID, assigned by Computop |
PayID | an32 | M | ID assigned by Paygate for the payment, e.g. for referencing in batch files. |
XID | an32 | M | ID for all single transactions (authorisation, capture, credit note) for one payment assigned by Paygate |
TransID | ans..64 | M | Merchant’s transaction number |
OrderID | an15 | M | Corresponds to RefNr or TransID, depending on whether RefNr is transmitted or not. |
Status | a..30 | M | OK or FAILED |
Description | ans..1024 | M | Further details in the event that payment is rejected. Please do not use the Description but the Code parameter for the transaction status analysis! |
Code | n8 | M | Error code according to Paygate Response Codes (A4 Error codes) |
RefNr | ans..30 | O | Merchant’s unique reference number |
UserData | ans..1024 | O | If specified at request, Paygate forwards the parameter with the payment result to the shop. |
PaymentSlipLink | ans..256 | M | Complete URL (URL-encoded) for the page which presents the payment form |
Results parameters for socket connection for Boleto Bancário
The following table describes the parameters which the Paygate transfers to URLNotify:
Parameter | Format | CND | Description |
---|---|---|---|
MID | ans..30 | M | MerchantID, assigned by Computop |
PayID | an32 | M | ID assigned by Paygate for the payment, e.g. for referencing in batch files. |
XID | an32 | M | ID for all single transactions (authorisation, capture, credit note) for one payment assigned by Paygate |
TransID | ans..64 | M | Merchant’s transaction number |
Status | a..30 | M | OK or FAILED |
Description | ans..1024 | M | Further details in the event that payment is rejected. Please do not use the Description but the Code parameter for the transaction status analysis! |
Code | n8 | M | Error code according to Paygate Response Codes (A4 Error codes) |
RefNr | ans..30 | O | Merchant’s unique reference number |
UserData | ans..1024 | O | If specified at request, Paygate forwards the parameter with the payment result to the shop. |
PaymentSlipLink | ans..256 | M | Complete URL (URL-encoded) for the page which presents the payment form |
AmountAuth | n..10 | M | Authorized amount in the smallest currency unit (e.g. BRL Centavos) |
AmountCap | n..10 | M | Captured amount in the smallest currency unit (e.g. BRL Centavos). Used to check whether the total amount has been captured. |
AmountCred | n..10 | M | Credited amount in the smallest currency unit (e.g. BRL Centavos) |
Custom | ans..1024 | O | The merchant can submit several values separated by | which are returned unencrypted and separated by &. Custom=session=123|id=456 will change in the answer to Session=123&id=456 |
PaymentDate | dttm | M | Date when the Boleto Bancário was paid by the customer. Format: YYYY-MM-DD. |
Response parameters to URLNotify for payments with Boleto Bancário
Cash payment with PagBrasil PEC Flash
In order to execute a cash payment with PagBrasil PEC Flash, please use the following URL:
https://www.computop-paygate.com/PECFlash.aspx |
Notice: For security reasons, Computop Paygate rejects all payment requests with formatting errors. Therefore, please use the correct data type for each parameter. The following table describes the encrypted payment request parameters:
Parameter | Format | CND | Beschreibung |
---|---|---|---|
MerchantID | ans..30 | M | MerchantID, assigned by Computop. Additionally this parameter has to be passed in plain language too. |
TransID | ans..64 | M | TransactionID which should be unique for each payment |
RefNr | ans..30 | M | Unique reference number |
Amount | n..10 | M | Amount in the smallest currency unit (e.g. BRL Centavos) Please contact the helpdesk, if you want to capture amounts < 100 (smallest currency unit). |
Currency | a3 | M | Currency, three digits DIN / ISO 4217. Only BRL permitted. |
MAC | an64 | M | Hash Message Authentication Code (HMAC) with SHA-256 algorithm |
UserData | ans..1024 | O | If specified at request, Paygate forwards the parameter with the payment result to the shop |
URLNotify | ans..256 | O | Complete URL which Paygate calls up in order to notify the shop about the payment result. The URL may be called up only via port 443 It may not contain parameters: Use the UserData parameter instead. |
Name | ans..128 | M | Name of the customer |
AddrStreet | ans..46 | C | Customer's street name (Optional, if agreed with PagBrasil and Computop) |
AddrCity | ans..40 | C | Customer's town/city (Optional, if agreed with PagBrasil and Computop) |
AddrZip | ans..8 | C | Customer's post code (Optional, if agreed with PagBrasil and Computop) |
AddrState | a2 | C | Abbreviation of the customer’s Federal State. See the table aove for the Federal States of Brazil. (Optional, if agreed with PagBrasil and Computop) |
TaxNumber | n11/n14 | C | In Brazil there are two kinds of tax numbers: CPF for persons and CNPJ for companies. CPF: 11 characters without separators, e.g. 12312312312 CNPJ: 14 characters without separators, e.g. 12345678000123 (Optional, if agreed with PagBrasil and Computop) |
ans..128 | C | Customer's email address (Optional, if agreed with PagBrasil and Computop) | |
Phone | ans..40 | C | Customer's phone number (Optional, if agreed with PagBrasil and Computop) |
OrderDesc | ans..768 | M | Description of purchased goods, unit prices etc. |
ArticleList | ans..254 | M | Description of the goods purchased. Example: ProductName; Quantity+ProductName;Number The product and the quantity are indicated on the customer’s bill. |
Expiration | n..3 | O | Number of days (0 - 5), which the PEC Flash® payment slip is valid. If you do not use this parameter the default value configured within PagBrasil dashboard will be used. |
ReqID | ans..32 | O | To avoid double payments, enter an alphanumeric value which identifies your transaction and may be assigned only once. If the transaction is submitted again with the same ReqID, Paygate will not carry out the payment, but will just return the status of the original transaction. Please note that the Paygate must have a finalized transaction status for the first initial action. Submissions with identical ReqID for an open status will be processed regularly. |
Custom | ans..1024 | O | The merchant can submit several values separated by | which are returned unencrypted and separated by &. Custom=session=123|id=456 will change in the answer to Session=123&id=456 |
Parameters for payments with PEC Flash
The following table describes the result parameters with which the Computop Paygate responds to your system pls. be prepared to receive additional parameters at any time and do not check the order of parameters
the key (e.g. MerchantId, RefNr) should not be checked case-sentive
Parameter | Format | CND | Beschreibung |
---|---|---|---|
MID | ans..30 | M | MerchantID, assigned by Computop |
PayID | an32 | M | ID assigned by Paygate for the payment, e.g. for referencing in batch files |
XID | an32 | M | ID for all single transactions (authorisation, capture, credit note) for one payment assigned by Paygate |
TransID | ans..64 | M | Merchant’s transaction number |
Status | a..30 | M | OK or FAILED |
Description | ans..1024 | M | Further details in the event that payment is rejected. Please do not use the Description but the Code parameter for the transaction status analysis! |
Code | n8 | M | Error code according to Paygate Response Codes (A4 Error codes) |
RefNr | ans..30 | O | Merchant’s unique reference number |
UserData | ans..1024 | O | If specified at request, Paygate forwards the parameter with the payment result to the shop |
OrderID | an15 | M | Corresponds to RefNr or TransID, depending on whether RefNr is transmitted or not |
TransactionID | ans..17 | O | The payment generated code which the shopper needs to show at the lottery store for paying in CASH. It will be returned in case of successful Authorization Request. |
CompanyID | ans..10 | O | Company code to be used in the order confirmation page for the shopper, as part of payment instruction information to the lottery store |
Note | ans..254 | O | Payment instructions that contains a Portuguese text detailing exactly where the customer can pay and which information he will need to provide to the agent. PagBrasil recommends merchants to use this element "payment_instructions" on their confirmation page instead of mounting the text from XML elements (company_code, payment_id, customer_taxid). |
Response parameters for PEC Flash
The following table describes the parameters which the Paygate transfers to URLNotify:
Parameter | Format | CND | Beschreibung |
---|---|---|---|
MID | ans..30 | M | MerchantID, assigned by Computop |
PayID | an32 | M | ID assigned by Paygate for the payment, e.g. for referencing in batch files |
XID | an32 | M | ID for all single transactions (authorisation, capture, credit note) for one payment assigned by Paygate |
TransID | ans..64 | M | Merchant’s transaction number |
Status | a..30 | M | OK or FAILED |
Description | ans..1024 | M | Further details in the event that payment is rejected. Please do not use the Description but the Code parameter for the transaction status analysis! |
Code | n8 | M | Error code according to Paygate Response Codes (A4 Error codes) |
RefNr | ans..30 | O | Merchant’s unique reference number |
UserData | ans..1024 | O | If specified at request, Paygate forwards the parameter with the payment result to the shop |
TransactionID | ans..17 | O | The payment generated code which the shopper needs to show at the lottery store for paying in CASH. It will be returned in case of successful Authorization Request. |
CompanyID | ans..10 | O | Company code to be used in the order confirmation page for the shopper, as part of payment instruction information to the lottery store |
Note | ans..254 | O | Payment instructions that contains a Portuguese text detailing exactly where the customer can pay and which information he will need to provide to the agent. PagBrasil recommends merchants to use this element "payment_instructions" on their confirmation page instead of mounting the text from XML elements (company_code, payment_id, customer_taxid). |
Custom | ans..1024 | O | The merchant can submit several values separated by | which are returned unencrypted and separated by &. Custom=session=123|id=456 will change in the answer to Session=123&id=456 |
AmountAuth | n..10 | M | Authorized amount in the smallest currency unit (e.g. BRL Centavos) |
AmountCap | n..10 | M | Captured amount in the smallest currency unit (e.g. BRL Centavos). Used to check whether the total amount has been captured. |
AmountCred | n..10 | M | Credited amount in the smallest currency unit (e.g. BRL Centavos) |
PaymentDate | dttm | M | Date when the PEC Flash was paid by the customer. Format: YYYY-MM-DD. |
Response parameters to URLNotify for payments with PEC Flash
Updating a payment with PEC Flash
In order to extend a payment slip for PEC Flash via a server-to-server connection, please use the following URL:
https://www.computop-paygate.com/PagBrasilUpdate.aspx |
Notice: For security reasons, Computop Paygate rejects all payment requests with formatting errors. Therefore, please use the correct data type for each parameter. The following table describes the encrypted payment request parameters:
Parameters for updating payments with PEC Flash
The following table describes the result parameters with which the Computop Paygate responds to your system pls. be prepared to receive additional parameters at any time and do not check the order of parameters
the key (e.g. MerchantId, RefNr) should not be checked case-sentive
Response parameters for updating payments with PEC Flash
Capture of a credit card payment with PagBrasil
Captures are possible via a Server-to-Server connection. To carry out a Capture for a PagBrasil credit card payment via a Server-to-Server connection please use the following URL:
https://www.computop-paygate.com/capture.aspx |
Notice: For security reasons, Computop Paygate rejects all payment requests with formatting errors. Therefore, please use the correct data type for each parameter. The following table describes the encrypted payment request parameters:
Parameters for captures of PagBrasil, PagBrasilOTF and Boleto Bancário
The following table describes the result parameters with which the Computop Paygate responds to your system pls. be prepared to receive additional parameters at any time and do not check the order of parameters
the key (e.g. MerchantId, RefNr) should not be checked case-sentive
Response parameters for captures of PagBrasil, PagBrasilOTF and Boleto Bancário
Credit with reference
Credits (refunds) are possible via a Server-to-Server connection. For a Credit with reference to a capture the amount of the Credit is limited to the amount of the previous capture.
Credits with credit cards can be made within up to 90 days on the credit card given with the payment but only on the same day with debit cards. Later it will be possible to make credit only with the optional parameters AccNr, AccBankName and AccBIC. These must be requested from the customer since no data would be available for a credit on payment. In the case of credits for payments with PagBrasilOTF and Boleto Bancário there is also no data for a credit. Here again the details must be requested from the customer and transferred to the parameters AccNr, AccBankName and AccBIC.
To carry out a credit with a reference transaction, please use the following URL:
https://www.computop-paygate.com/credit.aspx |
Notice: For security reasons, Computop Paygate rejects all payment requests with formatting errors. Therefore, please use the correct data type for each parameter. The following table describes the encrypted payment request parameters:
Parameters for credit of payments with PagBrasil, PagBrasilOTF and Boleto Bancário
The following table describes the result parameters with which the Computop Paygate responds to your system pls. be prepared to receive additional parameters at any time and do not check the order of parameters
the key (e.g. MerchantId, RefNr) should not be checked case-sentive
Response parameters for credit of payments with PagBrasil, PagBrasilOTF and Boleto Bancário
Batch processing via the interface
Basic information about using Batch files and about their structure can be found in the Batch Manager manual. Within batch processing not alle functions are available which are usually available for the online interface.
This section describes the parameters which must be transferred within the data set (Record) for executing payments / credits with PagBrasil, PagBrasilOTF and Boleto Bancário and which information can be found within the response file about the payment status.
Following table gives an overview of all batch versions that are possible for a specific action and their specialities:
Description of the possible batch versions
The structure for a PagBrasil payment within a Batch file to be submitted is the following:
HEAD,<MerchantID>,<Date>,<Version> PagBraCC,Capture,<Amount>,<Currency>,<TransID>,(<RefNr>,)<PayID> PagBraCC,Credit,<Amount>,<Currency>,<TransID>,(<RefNr>,)<PayID>,<AccBankName>,<AccNr>,<AccBIC> PagBraBB,Credit,<Amount>,<Currency>,<TransID>,(<RefNr>,)<PayID>,<AccBankName>,<AccNr>,<AccBIC> PagBraOTF,Credit,<Amount>,<Currency>,<TransID>,(<RefNr>,)<PayID>,<AccBankName>,<AccNr>,<AccBIC> FOOT,<CountRecords>,<SumAmount>
Example for Master MID function:
HEAD,[Master]MerchantID,Date,2.x Type,Action,[Slave]MID,Amount,Currency,TransID,Data (depends on Action) FOOT,CountRecords,SumAmount
The following table describes the individual fields and values used within the data set (record) within the batch file:
Description of fields within the record for Batch files
The record area within the response file for Batch transactions looks as follows:
HEAD,<MerchantID>,<Date>,<Version> PagBraCC,Capture,<Amount>,<Currency>,<TransID>,(<RefNr>,)<PayID>,<Status>,<Code> PagBraCC,Credit,<Amount>,<Currency>,<TransID>,(<RefNr>,)<PayID>,<AccBankName>,<AccNr>,<AccBIC>,<Status>,<Code> PagBraBB,Credit,<Amount>,<Currency>,<TransID>,(<RefNr>,)<PayID>,<AccBankName>,<AccNr>,<AccBIC>,<Status>,<Code> PagBraOTF,Credit,<Amount>,<Currency>,<TransID>,(<RefNr>,)<PayID>,<AccBankName>,<AccNr>,<AccBIC>,<Status>,<Code> FOOT,<CountRecords>,<SumAmount>
The following table describes the response parameters which the Batch Manager saves in the Record area for each transaction (standard parameters not explained here, such as <TransID> or <RefNR> and request parameters are returned unchanged and correspond to the call as specified before):
Description of result parameters within the record for Batch files