Create a Payment
POST/v2/payments
Generic endpoint for creating payments of any type. The type must be specified in the kind field.
Prerequisites
To issue a payment, you must have a Financial Account, informed in financial_account_uid. The payment account that records the operation is defined in payment_account_uid; if omitted, the oldest linked to the financial account is used; if informed, it must belong to financial_account_uid.
Supported Types
PIX
Use kind: "pix" and provide the pix key:
{
"kind": "pix",
"financial_account_uid": "...",
"amount": 100.0,
"pix": {
"qrcode": "00020126330014br.gov.bcb.pix..."
}
}
Bank Billet
Use kind: "bank_billet" and provide the bank_billet key:
{
"kind": "bank_billet",
"financial_account_uid": "...",
"amount": 200.0,
"bank_billet": {
"code": "81770000001-8 00005659970-7 41131079703-9 0014334-8"
}
}
DARF
Use kind: "darf" and provide the darf key:
{
"kind": "darf",
"financial_account_uid": "...",
"amount": 300.0,
"darf": {
"tax_code": "0107",
"calculation_date": "2024-12-31",
"expire_at": "2025-01-10"
}
}
Taxes
Use kind: "tax" and provide the tax key with bar code:
{
"kind": "tax",
"financial_account_uid": "...",
"amount": 400.0,
"tax": {
"kind": "iptu",
"code": "81770000001-8 00005659970-7..."
}
}
Utility Bills
Use kind: "utility" and provide the utility key:
{
"kind": "utility",
"financial_account_uid": "...",
"amount": 500.0,
"utility": {
"code": "81770000001-8 00005659970-7..."
}
}
Webhook Events
The payment.db.created event is triggered in this operation.
Unified Endpoint: This endpoint unifies the creation of all types of payments. To create payments of a specific type, you can also use the dedicated endpoints in
/api/v2/payment/{type}.
Request
Responses
- 201
- 401
- 422
Utility Bill Payment created
Authentication failure. Invalid token
Tax with format=code and missing code