Skip to main content

Use Boleto/Pix

Last updated: 21-Dec-2023
Rate this article:

Overview

Boleto/Pix is a payment method tailored for international e-merchants that facilitates money transfers from Brazilian customers designed to make it easy for them to receive money from Brazilian customers. The Boleto/Pix credit transfer service enables customers in Brazil to make online purchases via 2Checkout and pay offline at any Brazilian post office, bank branch, or through Internet banking. Boleto/Pix currently has a market share of approximately 25% in Brazil.

Availability

The feature is available only to users in Brazil with a Brazilian billing address.

Mandatory billing information must also include:

  • State
  • Phone number
  • Fiscal code (CPF/CNPJ)

Supported currencies

Boleto/Pix supports BRL transactions.

Workflow

  1. Shoppers select BOLETO as a payment option in the checkout interface you provide to them.
  2. Call the PlaceOrder method with “BOLETO” as the type of the PaymentDetails object.
  3. After the Order Object is generated, in the PaymentDetails->PaymentMethod, you will find the URL where the shoppers need to be redirected to so they can finish the payment. Example: “https://pagbrasil.com/b?a41aewmfjb
  4. The shopper selects the preferred Bank for payment and generates the payment slip (Boleto).
  5. The shopper prints the Boleto which contains a bar-coded invoice and takes it to one of the convenient Boleto/Pix locations.
  6. Once the shopper finishes the payment process on the Boleto side, the order will be updated in the 2Checkout system as well.

Request Parameters

Parameters

Type/Description

sessionID

Required (string)

 

Session identifier, the output of the Login method. Include sessionID into all your requests. 2Checkout throws an exception if the values are incorrect.  The sessionID expires in 10 minutes.

Order

Required (Object)

 

Object designed to collect all data necessary for an order, including billing, product/subscription plan and payment details.

See code sample for more details. 

Request Example

<?php

require ('PATH_TO_AUTH');

$Order = new stdClass();
$Order->RefNo = NULL;
$Order->Currency = 'BRL';
$Order->Country = 'BR';
$Order->State = 'Acre';
$Order->Language = 'EN';
$Order->CustomerIP = '10.5.22.197';
$Order->ExternalReference = NULL;
$Order->Source = NULL;
$Order->CustomerReference = NULL;

$Order->Items = array();
$Order->Items[0] = new stdClass();
$Order->Items[0]->Code = 'ProductCode';     // add product code here
$Order->Items[0]->Quantity = 1;
$Order->Items[0]->PriceOptions = NULL;
$Order->Items[0]->SKU = NULL;
$Order->Items[0]->Price = NULL;
$Order->Items[0]->CrossSell = NULL;
$Order->Items[0]->Trial = false;
$Order->Items[0]->AdditionalFields = NULL;
$Order->Items[0]->SubscriptionStartDate = NULL; //If empty or null, subscriptions become active when purchase is made.

$Order->BillingDetails = new stdClass();
$Order->BillingDetails->FirstName = 'John';
$Order->BillingDetails->LastName = 'Doe';
$Order->BillingDetails->CountryCode = 'BR';
$Order->BillingDetails->State = 'Acre';  //Required
$Order->BillingDetails->City = 'Acre';
$Order->BillingDetails->Address1 = 'Address example';
$Order->BillingDetails->Address2 = NULL;
$Order->BillingDetails->Zip = '70403-900';    //Required
$Order->BillingDetails->Email = 'testemail1@address.com';
$Order->BillingDetails->Phone = '556133127400';   //Required
$Order->BillingDetails->Company = NULL;
$Order->BillingDetails->FiscalCode ='056.027.963-98';  //Required
$Order->DeliveryDetails = NULL;

$Order->PaymentDetails = new stdClass ();
$Order->PaymentDetails->Type = 'BOLETO';
$Order->PaymentDetails->Currency = 'BRL';
$Order->PaymentDetails->PaymentMethod = new stdClass ();

try {
   $newOrder = $client->placeOrder($sessionID, $Order);
}
catch (SoapFault $e) {
    echo "newOrder: " . $e->getMessage();
    exit;
}
var_dump("newOrder", $newOrder)

Response Parameters

Parameters

Type/Description

Order information

Object

Rate this article:

Need help?

Do you have a question? If you didn’t find the answer you are looking for in our documentation, you can contact our Support teams for more information. If you have a technical issue or question, please contact us. We are happy to help.

Not yet a Verifone customer?

We’ll help you choose the right payment solution for your business, wherever you want to sell, in-person or online. Our team of experts will happily discuss your needs.

Verifone logo