Alternative Payment Methods

Learn how to integrate your solution to process payments with Alternative Payment Methods such as PIX and Boleto Bancario.

PIX

PIX is an official Brazilian payment method launched by the local Central Bank. It allows for immediate payment confirmation and is available 24/7. To complete a payment, the payer can use any Home Banking or Wallet App by copying and pasting a Transaction ID or scanning a QR code.

Request parameters

You need to include specific fields for this payment method to work correctly. Check the Purchase operation article for details on authentication, languages of the response, and basic purchase parameters such as amount and currency.

PropertyTypeMandatory?Description
PaymentMediaIdnumericYesThe PaymentMediaId for this payment method is 31.
TargetCountryISOstringYesIndicate the destination country.
CustomerEmailstringYesCustomer’s email.
CustomerFirstNamestringYesCustomer’s first name.
CustomerLastNamestringYesCustomer’s last name.
CustomerDocumentTypeIdnumericNoCustomer’s document type.
Refer to the Document types table to see the possible values.
CustomerDocNumberstringYesCustomer’s Document Number.
CustomerPhoneNumberstringNoCustomer’s phone number.
CustomerBillingAddressCountrystringNoCustomer’s Country.
CustomerBillingAddressStatestringNoCustomer’s State.
CustomerBillingAddressCitystringNoCustomer’s City.
CustomerBillingAddressAddressDetailstringNoCustomer’s Address Detail.
CustomerBillingAddressPostalCodestringNoCustomer’s Postal Code.
MetaDataInPaymentExpirationInMinutesnumericYesConfigure the expiration time for the payment using this field, specifying the duration in minutes.
MetadataIn.AddressStreetstringNoCustomer address street.
MetadataInAddressNumberstringNoCustomer address number, floor, apartment.
MetadataInAddressDistrictstringNoCustomer address district.

Request example

{
    "PaymentMediaId": "31",
    "Capture": "true",
    "Amount": 2000,
    "Currency": "BRL",
    "TargetCountryISO": "BR",
    "Customer": {
        "Email": "john@mail.com",
        "BillingAddress": {
            "AddressDetail": "Avenida Anisio Fernandes Coelho, 661 ",
            "PostalCode": "29060670",
            "City": "Vitoria",
            "State": "ES",
            "Country": "Brasil"
        },
        "FirstName": "John",
        "LastName": "Doe",
        "DocNumber": "13394559358",
        "DocumentTypeId": 25,
        "PhoneNumber": "+59812345678"
    },
    "MetadataIn": {
        "PaymentExpirationInMinutes": "14040",
        "AddressStreet": "Avenida Anisio Fernandes Coelho",
        "AddressNumber": "661",
        "AddressDistrict": "PR"
    },
    "description": "Pagameto do Brazil"
}

Response parameters

In the response, you will find the following parameters:

PropertyTypeDescription
ResponseMetadataOutPaymentCodestringPayment code generated by PIX.
ResponseMetadataOutPaymentBarCodestringThis code, which corresponds in Brazil to the copia e cola, allows payers to copy it in their bank app.
This parameter is handy to generate the QR code when creating your checkout.
ResponseMetadataOutPaymentBarCodeUrlstringURL of the payment page, this page has the QR code generated with the string returned in PaymentBarCode parameter.
You can also redirect the payer to this page to complete the payment.
ResponseMetadataOutPaymentExpirationDatedateDate when the payment will expire.
Format DD/MM/YYYY HH:MM:SS.

Payment page in PIX

PrintScreen

Response example

{
    "Response": {
        "PurchaseId": 1167187,
        "Created": "2023-08-31T15:44:31.104",
        "TrxToken": null,
        "Order": null,
        "Transaction": {
            "TransactionID": 1186084,
            "Created": "2023-08-31T15:44:31.104",
            "AuthorizationDate": "",
            "TransactionStatusId": 2,
            "Status": "Pending",
            "ErrorCode": null,
            "Description": " ",
            "ApprovalCode": null,
            "Steps": [
                {
                    "Step": "Generic External",
                    "Created": "",
                    "Status": null,
                    "ResponseCode": "1",
                    "ResponseMessage": "Created",
                    "Error": null,
                    "AuthorizationCode": null,
                    "UniqueID": null,
                    "AcquirerResponseDetail": null
                }
            ]
        },
        "Capture": true,
        "Amount": 2000,
        "OriginalAmount": 2000,
        "TaxableAmount": null,
        "Tip": 0,
        "Installments": 1,
        "Currency": "BRL",
        "Description": "Pagameto do Brazil",
        "Customer": {
            "CustomerId": 88230,
            "Created": "2022-12-08T11:30:35.933",
            "CommerceCustomerId": null,
            "Owner": "Commerce",
            "Email": "John@mail.com",
            "Enabled": true,
            "ShippingAddress": null,
            "BillingAddress": {
                "AddressId": 88894,
                "AddressType": 2,
                "Country": "COL",
                "State": "Antioquia",
                "AddressDetail": "Carrera 80 #30 - 20",
                "PostalCode": null,
                "City": "Medellin"
            },
            "Plans": null,
            "AdditionalData": null,
            "PaymentProfiles": [
                {
                    "PaymentProfileId": 101557,
                    "PaymentMediaId": 2,
                    "Created": "2023-05-24T21:35:14.387",
                    "LastUpdate": "2023-05-24T21:40:30.700",
                    "Brand": "MasterCard",
                    "CardOwner": "John Doe",
                    "Bin": "529991",
                    "IssuerBank": null,
                    "Installments": null,
                    "Type": "CreditCard",
                    "IdCommerceToken": 40604,
                    "Token": "CT__uYBBUihIydvI--7Pyl8U665OfY_kbX2GGUsAV93Sj0k_",
                    "Expiration": "203008",
                    "Last4": "0015",
                    "Enabled": true,
                    "DocumentNumber": "74857601",
                    "DocumentTypeId": 2,
                    "ExternalValue": "0224d9a155f229d17a966c8f331978dd06df92dcc305fddb9535befe8d7bf999",
                    "AffinityGroup": null
                },
                {
                    "PaymentProfileId": 252287,
                    "PaymentMediaId": 1,
                    "Created": "2023-07-31T18:23:43.257",
                    "LastUpdate": "2023-07-31T18:23:43.257",
                    "Brand": "VISA",
                    "CardOwner": "Jhon Doe",
                    "Bin": "405188",
                    "IssuerBank": "Visa",
                    "Installments": "1;2;3;4;5;6;7;8;9;10;11;12;13;14;15;16;17;18;19;20;21;22;23;24",
                    "Type": "CreditCard",
                    "IdCommerceToken": 41630,
                    "Token": "CT__01dPtulDMY-yaNLK0D4isQhI2h7Angq5R5aAyNExBiM_",
                    "Expiration": "202912",
                    "Last4": "6623",
                    "Enabled": true,
                    "DocumentNumber": null,
                    "DocumentTypeId": null,
                    "ExternalValue": null,
                    "AffinityGroup": null
                }
            ],
            "CaptureURL": "https://api.stage.bamboopayment.com/v1/Capture/",
            "UniqueID": null,
            "URL": "https://api.stage.bamboopayment.com/Customer/88230",
            "FirstName": "John",
            "LastName": "Doe",
            "DocNumber": "13394559358",
            "DocumentTypeId": 25,
            "PhoneNumber": "+59812345678",
            "ExternalValue": null
        },
        "RefundList": null,
        "PlanID": null,
        "UniqueID": null,
        "AdditionalData": null,
        "CustomerUserAgent": null,
        "CustomerIP": null,
        "URL": "https://api.stage.bamboopayment.com/Purchase/1167187",
        "DataUY": {
            "IsFinalConsumer": false,
            "Invoice": null,
            "TaxableAmount": null
        },
        "DataDO": {
            "Invoice": null,
            "Tax": null
        },
        "Acquirer": {
            "AcquirerID": 63,
            "Name": "WePayOut",
            "CommerceNumber": null
        },
        "CommerceAction": null,
        "PurchasePaymentProfileId": 98304,
        "LoyaltyPlan": null,
        "DeviceFingerprintId": null,
        "MetadataIn": {
            "PaymentExpirationInMinutes": "14040",
            "AddressStreet": "Avenida Anisio Fernandes Coelho",
            "AddressNumber": "661",
            "AddressDistrict": "PR"
        },
        "MetadataOut": {
            "PaymentCode": "33ff0bc703d33d4b3029b86abec12bfed2ccc972a87c8525c7dbdcc4f6753398",
            "PaymentBarCode": "00020101226914br.gov.bcb.pix2571api-h.developer.wepayout.com/v1/p/v2/1e317df5-4d0a-43c2-ba6d-18e468392823000053039865802BR5908WePayOut6009Sao Paulo61080141000262070503***63041300",
            "PaymentBarCodeUrl": "https://pagar.sandbox.goboleto.com/?hash=33ff0bc703d33d4b3029b86abec12bfed2ccc972a87c8525c7dbdcc4f6753398",
            "PaymentExpirationDate": "09/10/2023 06:44:31"
        },
        "CrossBorderData": null,
        "CrossBorderDataResponse": {
            "TargetCountryISO": "BR",
            "TargetCurrencyISO": "BRL",
            "TargetAmount": 20
        },
        "Redirection": null,
        "IsFirstRecurrentPurchase": false,
        "AntifraudData": {
            "AntifraudFingerprintId": null,
            "AntifraudMetadataIn": null
        },
        "PaymentMediaId": null,
        "PurchaseType": 1,
        "HasCvv": null,
        "TargetCountryISO": null
    },
    "Errors": []
}

Boleto Bancario

Boleto Bancário is a popular payment method in Brazil that allows for paying bills and online purchases without a credit card. It generates a unique barcode that can be printed or accessed through a digital platform and paid at any bank or authorized payment center.

Request parameters

You need to include specific fields for this payment method to work correctly. Check the Purchase operation article for details on authentication, languages of the response, and basic purchase parameters such as amount and currency.

PropertyTypeMandatory?Description
PaymentMediaIdnumericYesThe PaymentMediaId for this payment method is 66.
TargetCountryISOstringYesIndicate the destination country.
CustomerEmailstringYesCustomer’s email.
CustomerFirstNamestringYesCustomer’s first name.
CustomerLastNamestringYesCustomer’s last name.
CustomerDocumentTypeIdnumericNoCustomer’s document type.
Refer to the Document types table to see the possible values.
CustomerDocNumberstringYesCustomer’s Document Number.
CustomerPhoneNumberstringNoCustomer’s phone number.
CustomerBillingAddressCountrystringNoCustomer’s Country.
CustomerBillingAddressStatestringYesCustomer’s State.
CustomerBillingAddressCitystringYesCustomer’s City.
CustomerBillingAddressAddressDetailstringNoCustomer’s Address Detail.
CustomerBillingAddressPostalCodestringYesCustomer’s Postal Code. The postal code must have eight digits—for example, 29018660.
MetaDataInPaymentExpirationInMinutesnumericNoConfigure the expiration time for the payment using this field, specifying the duration in minutes. The API applies a default value if you don’t provide this information.
MetadataIn.AddressStreetstringYesCustomer address street.
MetadataInAddressNumberstringYesCustomer address number, floor, apartment.
MetadataInAddressDistrictstringYesCustomer address district.

Request example

{
    "PaymentMediaId": "66",
    "Capture":"true",
    "Amount":2000,
    "Currency":"BRL",
    "TargetCountryIso" : "BR",
    "Customer": {
        "Email": "john@mail.com",
        "FirstName" : "John",
        "LastName": "Doe",
        "DocNumber" : "13394559358",
        "DocumentTypeId": 24,
        "BillingAddress": {
          "AddressType": 1,
          "Country": "Brasil",
          "State": "ES",
          "City": "Vitoria",
          "AddressDetail": "Avenida Anisio Fernandes Coelho 661",
          "PostalCode":"11100"
        },
    },
    "MetadataIn" : {
      "PaymentExpirationInMinutes" :"1440",
      "AddressStreet": "Avenida Anisio Fernandes Coelho",
      "AddressNumber": "661",
      "AddressDistrict": "ES"
    }
}

Response parameters

In the response, you will find the following parameters:

PropertyTypeDescription
ResponseMetadataOutPaymentCodestringPayment code generated by Boleto Bancario
ResponseMetadataOutPaymentBarCodestringCode of the barcode generated to complete the payment.
ResponseMetadataOutPaymentBarCodeUrlstringURL of the payment page. You can redirect the payer to this page to download the boleto.
ResponseMetadataOutPaymentExpirationDatedateDate when the payment will expire.
Format DD/MM/YYYY HH:MM:SS.

Payment page in Boleto

PrintScreen

Response example

{
    "Response": {
        "PurchaseId": 1133697,
        "Created": "2023-08-31T16:26:30.073",
        "TrxToken": null,
        "Order": null,
        "Transaction": {
            "TransactionID": 1152594,
            "Created": "2023-08-31T16:26:30.073",
            "AuthorizationDate": "",
            "TransactionStatusId": 2,
            "Status": "Pending",
            "ErrorCode": null,
            "Description": " ",
            "ApprovalCode": null,
            "Steps": [
                {
                    "Step": "Generic External",
                    "Created": "",
                    "Status": null,
                    "ResponseCode": "1",
                    "ResponseMessage": "Created",
                    "Error": null,
                    "AuthorizationCode": null,
                    "UniqueID": null,
                    "AcquirerResponseDetail": null
                }
            ]
        },
        "Capture": true,
        "Amount": 2000,
        "OriginalAmount": 2000,
        "TaxableAmount": 0,
        "Tip": 0,
        "Installments": 1,
        "Currency": "BRL",
        "Description": null,
        "Customer": {
            "CustomerId": 88230,
            "Created": "2022-12-08T11:30:35.933",
            "CommerceCustomerId": null,
            "Owner": "Commerce",
            "Email": "John@mail.com",
            "Enabled": true,
            "ShippingAddress": null,
            "BillingAddress": {
                "AddressId": 88894,
                "AddressType": 2,
                "Country": "COL",
                "State": "Antioquia",
                "AddressDetail": "Carrera 80 #30 - 20",
                "PostalCode": null,
                "City": "Medellin"
            },
            "Plans": null,
            "AdditionalData": null,
            "PaymentProfiles": [
                {
                    "PaymentProfileId": 101557,
                    "PaymentMediaId": 2,
                    "Created": "2023-05-24T21:35:14.387",
                    "LastUpdate": "2023-05-24T21:40:30.700",
                    "Brand": "MasterCard",
                    "CardOwner": "John Doe",
                    "Bin": "529991",
                    "IssuerBank": null,
                    "Installments": null,
                    "Type": "CreditCard",
                    "IdCommerceToken": 40604,
                    "Token": "CT__uYBBUihIydvI--7Pyl8U665OfY_kbX2GGUsAV93Sj0k_",
                    "Expiration": "203008",
                    "Last4": "0015",
                    "Enabled": true,
                    "DocumentNumber": "74857601",
                    "DocumentTypeId": 2,
                    "ExternalValue": "0224d9a155f229d17a966c8f331978dd06df92dcc305fddb9535befe8d7bf999",
                    "AffinityGroup": null
                },
                {
                    "PaymentProfileId": 252287,
                    "PaymentMediaId": 1,
                    "Created": "2023-07-31T18:23:43.257",
                    "LastUpdate": "2023-07-31T18:23:43.257",
                    "Brand": "VISA",
                    "CardOwner": "Jhon Doe",
                    "Bin": "405188",
                    "IssuerBank": "Visa",
                    "Installments": "1;2;3;4;5;6;7;8;9;10;11;12;13;14;15;16;17;18;19;20;21;22;23;24",
                    "Type": "CreditCard",
                    "IdCommerceToken": 41630,
                    "Token": "CT__01dPtulDMY-yaNLK0D4isQhI2h7Angq5R5aAyNExBiM_",
                    "Expiration": "202912",
                    "Last4": "6623",
                    "Enabled": true,
                    "DocumentNumber": null,
                    "DocumentTypeId": null,
                    "ExternalValue": null,
                    "AffinityGroup": null
                }
            ],
            "CaptureURL": "https://api.stage.bamboopayment.com/v1/Capture/",
            "UniqueID": null,
            "URL": "https://api.stage.bamboopayment.com/Customer/88230",
            "FirstName": "John",
            "LastName": "Doe",
            "DocNumber": "13394559358",
            "DocumentTypeId": 24,
            "PhoneNumber": "+59812345678",
            "ExternalValue": null
        },
        "RefundList": null,
        "PlanID": null,
        "UniqueID": null,
        "AdditionalData": null,
        "CustomerUserAgent": null,
        "CustomerIP": null,
        "URL": "https://api.stage.bamboopayment.com/Purchase/1133697",
        "DataUY": {
            "IsFinalConsumer": false,
            "Invoice": null,
            "TaxableAmount": 0
        },
        "DataDO": {
            "Invoice": null,
            "Tax": 0
        },
        "Acquirer": {
            "AcquirerID": 63,
            "Name": "WePayOut",
            "CommerceNumber": null
        },
        "CommerceAction": null,
        "PurchasePaymentProfileId": 98311,
        "LoyaltyPlan": null,
        "DeviceFingerprintId": null,
        "MetadataIn": {
            "PaymentExpirationInMinutes": "1440",
            "AddressStreet": "Avenida Anisio Fernandes Coelho",
            "AddressNumber": "661",
            "AddressDistrict": "MO"
        },
        "MetadataOut": {
            "PaymentCode": "bd88102f813cface085ea4ac63038a65cd5378228be2d5694f67b8a83af45931",
            "PaymentBarCode": "10491814900000002009632034000900041179634666",
            "PaymentBarCodeUrl": "https://pagar.sandbox.goboleto.com/?hash=bd88102f813cface085ea4ac63038a65cd5378228be2d5694f67b8a83af45931",
            "PaymentExpirationDate": "09/01/2023 00:00:00"
        },
        "CrossBorderData": null,
        "CrossBorderDataResponse": {
            "TargetCountryISO": "BR",
            "TargetCurrencyISO": "BRL",
            "TargetAmount": 20
        },
        "Redirection": null,
        "IsFirstRecurrentPurchase": false,
        "AntifraudData": {
            "AntifraudFingerprintId": null,
            "AntifraudMetadataIn": null
        },
        "PaymentMediaId": null,
        "PurchaseType": 1,
        "HasCvv": null,
        "TargetCountryISO": null
    },
    "Errors": []
}
footer
Last modified June 24, 2024

© Bamboo | All rights reserved 2024