v1

latestOpenAPI 3.1.02026-07-245361280.3 KB

Create payment

Creates a new payment using any of the available payment methods.

post/payments

Request body

amountnumber float required

Transaction amount (in the currency specified in the currency field).<br> Decimals may vary by country. </br></br>Length: 10,2 (e.g., 99999999.99).

currencystring required

Three-letter ISO-4217 currency code, in uppercase.

currency_to_chargestring

It indicates that the payer will be charged in USD. Check availability by country. <br><br>Possible values: USD.

payment_method_idstring

Payment method code chosen to make the payment, or the keyword CARD. Required for DIRECT payment method flow. </br></br>Length: 4. For example: CARD, VI, VD, MC.

payment_method_flowstring required

Payment method flow, can DIRECT or REDIRECT.

countrystring required

Payment processing country code. ISO 3166-1 alpha-2 code.

scheduled_datestring

Scheduled payment date (YYYY-MM-DD). Required for Pix Automático (XA) recurring payments. Must be sent between 2 and 10 days before the billing date, as required by Banco Central do Brasil.

order_idstring required

ID given by the merchant in their system. </br></br>Length: 125.

original_order_idstring

For payment retries. ID given by the merchant in their system for the original transaction that was rejected and needs to be retried. </br></br> Length: 125.

descriptionstring

Payment description. </br></br>Length: 200.

notification_urlstring

URL where dlocal will send notifications associated to changes to this payment.</br></br>Length: 500.

callback_urlstring

URL where dLocal does the final redirect. Required only for REDIRECT payment flow.</br></br>Length: 500.

remitter_user_idstring

Unique ID generated for the Remitter of the transaction. Mandatory for Remittances.

beneficiary_user_idstring

Unique ID generated for the beneficiary of the transaction. Mandatory for Remittances.

subpurposestring

Specific purpose of the transaction. Mandatory for Remittances.</br></br> Possible values: </br>EPREFA - Family Allowance</br>EPREGS - Goods and Services</br>EPRETE Travel Expenses</br>EPRESI - Savings or Investments</br>EPREGI - Gifts

source_of_fundsstring

Source of funds for the transaction. Mandatory for Remittances.</br></br> Possible values: SAVINGS, DONATION, BUSINESS, PENSION, SALARY, INHERITANCE, LOAN.

Response

200

OR
OR
OR

Example response

{
  "id": "PAY2323243343543",
  "amount": 120,
  "currency": "USD",
  "country": "BR",
  "payment_method_id": "CARD",
  "payment_method_type": "CARD",
  "payment_method_flow": "DIRECT",
  "card": {
    "holder_name": "Thiago Gabriel",
    "expiration_month": 10,
    "expiration_year": 2040,
    "last4": "1111",
    "brand": "VI"
  },
  "created_date": "2018-02-15T15:14:52-00:00",
  "approved_date": "2018-02-15T15:14:52-00:00",
  "status": "PAID",
  "status_code": "200",
  "status_detail": "The payment was paid.",
  "order_id": "657434343",
  "notification_url": "http://merchant.com/notifications"
}