Payment

The Payment API allows you to charge your customers using various payment methods.

LaFinteca supports numerous payment methods, so you can find the most suitable for your business and your customers.

Flow

Usually, payment flow looks like this:

  1. Customer wants to pay for some service or product on merchants side
  2. Merchant creates order for specific amount of money
  3. LaFinteca returns endpoint that should be used to redirect customer
  4. LaFinteca guides the customer through process of payment completion
  5. Order status can be changed to one of final
  6. (Optional) After all necessary steps are completed, LaFinteca redirects customer to returnUrl
  7. (Optional) LaFinteca sends webhook to the specified webhookUrl

Methods

Currently, we support payment method:

  • 🇧🇷 Pix (dynamic qr code)
  • 🇧🇷 Boleto
  • 🇧🇷 PicPay
  • 🇧🇷 TED coming soon
  • 🇲🇽 SPEI / CLABE
  • 🇵🇪 Cash
  • 💳 Visa / MC
  • 🇮🇳 India
  • Skrill (digital wallet)
  • Neteller (digital wallet)
  • Paysafecard (digital wallet)
  • Binance Pay
  • Crypto

Depending on the specific payment method, you may need to provide additional customer information.

Looking for something?

Feel free to contact us if you need some other payment method.

API

Request

There are two types of Pix payment methods.

Depending on third-party requirements, you will be informed which one is suitable for you.

Regular

POST /api/v3/order/payment-form/create
{
# A unique id on the merchant side. Required
"merchantOrderId": "1697633610",
"invoice": {
# The quantity of currency to be paid. Numeric-string. Required
"amount": "100.54",
# Three-letter ISO currency code, in lowercase. Required
"currency": "brl"
},
# Send this data in case if you need to match biller and payer. In case if we found mismatch of CPF – we reject payment.
"client": {
# Optional
"name": "Alvaro Silva",
# CPF or TaxID. Optional
"taxpayer": {
"number": "67223188006"
}
},
# Endpoint that will be used to return client on your site. Optional
"returnUrl": "https://example.com/return-url/1697633610",
# Endpoint that is expected to receive webhook. Optional
"webhookUrl": "https://example.com/webhook-url/1697633610"
}

Extended

The same request as the previous one, but this time you need to provide much more information about the customer.

POST /api/v3/order/payment-form/create
{
# ...
"client": {
# Required
"name": "Alvaro Silva",
# Required
"email": "[email protected]",
# Required
"phone": "5511999999999",
# Required
"taxpayer": {
# CPF
"number": "52.651.559/0001-85"
}
},
"attributes": {
# Required
"routingKey": "EXTENDED"
},
# ...
}

Response

During the creation of a payment order, you will encounter one of the following options:

  1. Order was created successfully and actions should be performed by the customer
  2. Order was rejected by third party
RESPONSE
{
"data": {
# An identifier of the order on the LaFinteca side
"id": "2d75f116-5c79-49cd-9ce3-32003bd45efe",
# Provided identifier
"merchantOrderId": "1697633610",
# Type of order
"type": "payin",
"createdAt": "2023-10-18T12:53:32+00:00",
# This object represents the actions customers need to perform
# For more details, please refer to the "Auth" section below
"auth": {
"type": "pixDynamicQrCode",
# LaFinteca endpoint that can be alternatively used to redirect customer
"redirectUrl": "https://pay.la-finteca.com/challenge/d54e9a60-56e9-47b3-8df0-7b22b4868734",
# Content of QR code
"code": "00020101021226990014br.gov.bcb.pix2577pix.bancogenial.com/qrs1/v2/01dMJP2hq0BHKJe6iRfnjnMlOMvPtfOHspAWmxRvVfjJs8buV520400005303986540550.005802BR5920Just Pagamentos Ltda6014Rio de Janeiro62070503***63043AFE",
# Expiration date of QR code
"expiresAt": "2023-10-31T06:54:25+00:00"
},
"status": "processing",
"rejectReason": null
},
"error": null
}

Auth

Depending on the selected payment method, there are different ways in which customers can make a payment. The provided object specifies the required action for customers to complete their payment.

Attention

Please note that the payment process may not always be consistent for the same payment method.

Therefore, you should be prepared to support all these variations.

Whenever possible, we provide you with all the data necessary for you to process the payment on your end. However, there may be situations where we have to resort to the redirect type and let the customer handle the payment themselves

For PIX payments, there are two available options:

  1. Display the PIX QR code directly on your side for customers to scan and make payments.
  2. Alternatively, you can redirect the customer to LaFinteca for a seamless payment experience.
{
"type": "pixDynamicQrCode",
# LaFinteca endpoint for redirecting customers
"redirectUrl": "https://pay.la-finteca.com/challenge/d54e9a60-56e9-47b3-8df0-7b22b4868734",
# Content of the QR code
"code": "00020101021226990014br.gov.bcb.pix2577pix.bancogenial.com/qrs1/v2/01dMJP2hq0BHKJe6iRfnjnMlOMvPtfOHspAWmxRvVfjJs8buV520400005303986540550.005802BR5920Just Pagamentos Ltda6014Rio de Janeiro62070503***63043AFE",
# Expiration date of the QR code
"expiresAt": "2023-10-31T06:54:25+00:00"
}

Status

Refer to the Status & Webhook section for generic guidance.

POST /api/v3/order/get-status
{
"merchantOrderId": "1697633610"
}

The processing order status indicates that the order is awaiting its final status.

This status is not final and can be changed.

RESPONSE
{
"data": {
"id": "2d75f116-5c79-49cd-9ce3-32003bd45efe",
"merchantOrderId": "1697633610",
"type": "payin",
"createdAt": "2023-10-18T12:53:32+00:00",
# Status of order
"status": "processing",
"merchantSourceWallet": null,
"merchantTargetWallet": null,
"transactions": [
{
"type": "payin",
"id": "2eab2f9e-8374-4ff6-bfeb-204b9cee3dbe",
# Status of transaction
"status": "processing",
# Amount of money that will be charged from customer,
# valid for any currency: BRL, MXN, PEN, USD, etc.
"authorized": {
"amount": "100.54",
"currency": "brl"
},
# Amount of money that will be received
# by merchant after order completion, valid
# for any currency: BRL, MXN, PEN, USD, etc.
"merchantWallet": {
"amount": "100.54",
"currency": "brl"
},
"counterpartyInfo": null,
"paymentInfo": null,
"createdAt": "2023-10-18T12:53:32+00:00",
"completedAt": null,
"rejectReason": null
}
]
},
"error": null
}

Are there any inquiries still outstanding?

Our team of experts is available 24/7 to answer all your questions. Feel free to reach out to us at any time, and we will be happy to help you address any inquiries or issues. Your comfort and satisfaction are our priority.
Need help?Contact support

Powered by LA FRAMBUESA & Markdoc