Overview

Call the Payments API to request host-to-host payin methods.

The API parameters are organized into distinct objects to streamline the payment process and ensure clarity in data handling. Each object represents a specific aspect of the transaction, making it easier to manage and understand the flow of information. However, some parameters stand alone and are not part of any object. Below is an overview of the objects and their corresponding parameters, as well as the standalone parameters:

  • Customer: Represents the individual making the payment. This object includes critical information about the customer, such as their unique ID, name, email address, and optionally, their IP address and birthdate. The customer.document sub-object details the type and number of the customer's official identification, while the customer.address sub-object includes the customer's full address, which may be required depending on the payment method.

  • Transaction: This object contains all the essential details about the transaction itself, including a unique transaction ID, the currency used, the total amount involved, and optionally, the time until the transaction expires.

  • Payment: Represents the payment method and related URLs for completing the transaction. This object is crucial for determining how the customer will pay and where they will be redirected after the payment is completed.

  • Values: This object provides detailed financial information related to the transaction. It includes the original and converted amounts, the currencies involved, the exchange rate applied, and any fees associated with the transaction.

Standalone parameters, such as branch, country, notification_url, and redirect_url, do not belong to any specific object. These parameters provide additional information relevant to the transaction, such as the location of the transaction, the country code, where payment notifications should be sent, and where the customer should be redirected after completing the payment.

Our API structure remains consistent across different payment methods and countries, making it easy to adapt as you expand into new regions or integrate new methods.

Knowing the parameters used

ParameterTypeDescription

customer.id

string

Unique identifier for the customer in your system. This value should remain consistent across all transactions for the same customer

customer.name

string

The full name of the customer making the payment. It should match the name on the customer's identification documents

customer.email

string

The email address of the customer. This will be used for sending payment confirmations and notifications

customer.phone

string

The phone number of the customer, including the country code. This parameter may be optional or required depending on the payment method used

customer.birthdate

string

The birthdate of the customer, provided in the format mm-dd-yyyy. This parameter may be required depending on the country regulations or the payment method

customer.document.number

string

The official identification number of the customer. This is typically a national ID, passport, or other government-issued document

customer.document.type

string

The type of document provided by the customer. Common types include national ID, passport, or driver's license. List of documents allowed.

customer.address.addres_1

string

The primary street address of the customer

customer.address.addres_2

string

Additional address information, such as apartment number or suite

customer.address.city

string

The city in which the customer resides

customer.address.country_code

string

The ISO 3166-1 alpha-3 country code for the customer's address. List of country codes.

customer.address.neightborhood

string

The neighborhood or district of the customer's address

customer.address.number

string

The street number of the address

customer.address.postal_code

string

The postal or ZIP code for the customer's address

customer.address.state

string

The state or region of the customer's address

transaction.id

string

A unique identifier for the transaction. This ID should be generated by your system to track the specific payment process

transaction.currency

string

The currency in which the transaction is being conducted. Use standard ISO 4217 currency codes (e.g., USD, PEN). List of currency codes.

transaction.amount

decimal (10,2)

The total amount of the transaction in the specified currency. This value should be a numeric amount (use dot instead of comma) Eg: 300.10

transaction.expire

integer (11)

The time in seconds until the transaction expires and is no longer valid

branch

string

The specific branch or location identifier where the transaction is being processed, if applicable

country

string

The country code where the transaction is taking place. The format is ISO 3166-1 alpha-3 (e.g., BRA for Brazil). List of country codes.

payment_method

string

The method of payment being used for the transaction, such as bank transfer, credit card...

notification_url

string

The URL to which payment notifications will be sent. Ensure this URL is accessible and configured to handle the notification format

Example response payment method request

{
    "requestId": "a2435636-5f69-447d-8e22-8382f62ef7dd",
    "data": {
        "id": "4a79f3b4-8d55-428b-a560-984fedd6f78a",
        "status": "pending",
        "expires_in": 1722108649,
        "payment": {
            "method": "picpay",
            "qr_code": "00...014COM.PICPAY.P2B0164https:\\app.picpay.com\checkout\SMARTFASTPAY...AY6009SAO PAULXXXXX",
            "url": "https:\\app.picpay.com\checkout\SMARTFASTPAY",
            "name": "Viacredi", // only payment method is bank_transfer
            "code": "085", // only payment method is bank_transfer
            "agency": "0101-5", // only payment method is bank_transfer
            "account": "12551163", // only payment method is bank_transfer
            "account_operation": "Conta Corrente", // only payment method is bank_transfer
            "document": "34.911.051/0001-97", // only payment method is bank_transfer
            "beneficiary": "SmartFastPay" // only payment method is bank_transfer
        },
        "values": {
            "source_total": 27525.47,
            "source_currency": "BRL",
            "exchanged_total": 27525.47,
            "exchanged_currency": "BRL",
            "exchange": 1.00,
            "fee": 92.5226
        }
    }
}

Response details

ParameterDescription

id

A unique identifier for the response generated by the payment system, used to track the transaction. Can be used to verify the payment status in the GET /payment/{id} endpoint

status

The current status of the transaction such as pending, paid, denied, expired

expires_in

The time in seconds until the transaction expires and is no longer valid

payment.method

The payment method that was used for the transaction, such as bank_transfer, credit_card, picpay...

payment.url

The URL provided to the customer for completing the payment. This might be a redirect to a bank or payment gateway

payment.qr_code

The string that contains the information of the qrcode. It is necessary to use some programming resource to convert this text into an image

bank info

only bank_transfer

payment.name

Name of the bank where the deposit is going to be made

payment.code

Brazilian code of the bank to which the deposit is going to be directed

payment.agency

Agency number with verification digit to which the deposit is going to be directed

payment.account

Account number with verification digit to which the deposit is going to be directed

payment.account_operation

Either it's a savings account or a current account. current account, saving account

payment.document

Either the owner document or the company document for the account to which the deposit is going to be directed

payment.beneficiary

Name of the owner of the account to which the deposit is going to be direct

values.source_total

The total amount of the transaction in the source currency before any exchange

values.source_currency

The original currency of the transaction as specified in the request

values.exchanged_total

The total amount of the transaction after currency conversion, if applicable

values.exchanged_currency

The currency in which the payment was completed after conversion

values.exchange

The exchange rate applied to convert the source currency to the target currency

values.fee

The amount charged by our service for processing the transaction

Note:

The payment.qr_code parameter can be provided in different formats depending on the scenario. You might receive both a URL and a QR code, or just one of them. In the example below, the payment method "picpay" includes both a QR code and a URL. Depending on the implementation, you may only need to use one of these elements, or both, to facilitate the payment process.

"payment": {
    "method": "picpay",
    "qr_code": "00...014COM.PICPAY.P2B0164https:\\app.picpay.com\checkout\SMARTFASTPAY...AY6009SAO PAULXXXXX",
    "url": "https:\\app.picpay.com\checkout\SMARTFASTPAY"
},

Our API is designed to be flexible and adaptable, so as you expand into new regions or add more payment methods, you can easily apply these principles across different implementations.

If you need further details on other payment methods or countries, be sure to explore the rest of our documentation. Additionally, we have a dedicated FAQ and support section to help with common questions:

FAQ & Support

Last updated