Initiate a payment
Pays a bank slip (boleto) or a utilities bill through the provider the tenant routes BANKSLIP_PAYMENT or BARCODE_BILL_PAYMENT to. The type comes from the digitable line.
How it works
- The payment runs at once. There is no scheduling: a
scheduledDateis refused. - Before anything is created, the provider checks the slip. A slip that cannot be paid, or that the source refuses or does not know, creates nothing.
- The payer is always the registered owner of the funding account (
midazAccountId). Do not send payer data. - Funds are reserved in the ledger before the provider is instructed.
201: the provider acknowledged the payment (statusCREATED).202: the outcome is not known (statusUNCONFIRMED). Follow both withGET /v1/payments/{id}.- After a
202, do not resend under a newIdempotency-Key: the provider may have it, and you can pay twice. - A retry under the same
Idempotency-Keyreturns the stored answer of a201, a202, or a refusal that consumes the key (see each code). After a refusal that releases the key, the same key runs the request again. While the first request runs, the same key gets409PBP-0007. - To find what a request created when you have no payment id, call
GET /v1/paymentswithidempotencyKey.
Planned changes
- Lerian (PCR): boleto payment through Lerian (PCR) is planned. The body gains optional
amount(informed amount),channelandpaymentMethod, and the payment can pass an antifraud step. Lerian sets up the tenant’s antifraud, default channel and payment method at onboarding. No client endpoint reads or changes them. - DDA (electronic payer): new optional
receiverBoletoId, the presented boleto being paid. WithchannelDDA, it is required, must name a boleto presented to the holder ofmidazAccountId, anddigitableLinemust be that boleto’s line. - Payment scheduling: a future
scheduledDateis sent to the provider on its effective date (first business day on or after it), once. AddsscheduledDate(DARF too),effectiveScheduledDate,effectiveAfterDueDate,amountIsEstimated,executedAt,failureReason, thePROCESSINGstatus and new error codes. This change will be specified again before it applies.
Cabeçalhos
Corpo
Optional amount to pay, a decimal string with two decimal places, for a slip that accepts partial or divergent payment. Absent: the amount the pre-payment consult calculates for today is paid, as before. Present: the provider must pay an informed amount (else 422 PBP-0701, capability PAYMENT_AMOUNT_INFORMED) and the slip must accept it (else 422 PBP-0217); the accepted amount is the one reserved, reported to the clearing base and debited. Exactly two decimal places and greater than zero: zero (0.00) is refused by the pattern with 400 PBP-0001. Part of the request identity: the same Idempotency-Key with another amount is 422 PBP-0013.
32^(0\.(0[1-9]|[1-9][0-9])|[1-9][0-9]{0,15}\.[0-9]{2})$"100.00"
Optional channel through which the payer paid the slip. Absent: the tenant's default payment channel (INTERNET unless Lerian recorded another one at the tenant's request; the default can never be DDA). The value is fixed when the request is received and recorded with the payment. A value outside the enum is refused with 400 PBP-0001. DDA requires a bankslip presented to this payer through DDA (receiverBoletoId, delivered with the DDA payer flow); without it, 422 PBP-0220. Part of the request identity: the same Idempotency-Key with another channel is 422 PBP-0013.
A provider that reports the channel to the clearing base sends the code below; a provider that does not (BTG) ignores it. Codes
of the CanPgto domain, Manual de Leiautes da Plataforma Centralizada de Recebíveis (PCR), MAPX-OP016-2009 V63, §10.1:
Code 4 (PIX) is not accepted: a slip paid through Pix is the BolePix flow, not this operation.
BRANCH, ATM, INTERNET, BANKING_AGENT, CALL_CENTER, ELECTRONIC_FILE, DDA, DIGITAL_BANKING_AGENT "INTERNET"
Optional means of payment the payer used. Absent: the tenant's default payment method (ACCOUNT_DEBIT
unless Lerian recorded another one at the tenant's request). The value is fixed when the request is received and recorded with the payment. A value outside the
enum is refused with 400 PBP-0001. The payment is always debited from midazAccountId; this member only states the means reported
to the clearing base. Part of the request identity: the same Idempotency-Key with another paymentMethod is 422 PBP-0013.
A provider that reports the means of payment to the clearing base sends the code below; a provider that does not (BTG) ignores it.
Codes of the MeioPgto domain, Manual de Leiautes da Plataforma Centralizada de Recebíveis (PCR), MAPX-OP016-2009 V63, §10.36:
CASH, ACCOUNT_DEBIT, CREDIT_CARD, CHECK "ACCOUNT_DEBIT"
Planned. Date on which you want the payment to run, YYYY-MM-DD, with no time or time zone. Without it, the payment runs immediately.
- It is not the date the payment runs. On a non-business day the payment runs on
effectiveScheduledDate: always read that field. - Valid window:
tomorrow ≤ scheduledDate ≤ min(dueDate, today + 30 calendar days). Outside it, creation is refused with one of the window codes. - In the first phase, a date on a non-business day is refused with
PBP-0006.
"2026-09-16"
Resposta
Created. The provider acknowledged the payment. It is CREATED and has providerId. Follow its outcome with GET /v1/payments/{id}. A key that already names an acknowledged payment also returns 201, with the payment as it stands.
The payment's status when this answer was produced. CREATED on a 201 for a new payment; UNCONFIRMED on a 202, while the outcome at the payment provider is unknown. A request already on record is answered with the payment's status at that moment, which may be any status a payment takes. A replay of the same Idempotency-Key serves the stored answer, whose status may since have changed: read the payment by id for its current state.
Identifier the payment provider assigned to this payment. Quote it, together with providerRequestId, when you contact the provider about this payment. Absent while the payment is UNCONFIRMED (the 202 answer): the provider has acknowledged nothing yet. Read the payment by id later to obtain it.
Reference this API sent to the payment provider when it instructed the payment, exactly as sent. Which of providerId and providerRequestId the provider accepts for a lookup depends on the provider and on the payment type, so quote both when you contact the provider. Absent when the payment carries no such reference.
Planned. Date on which you want the payment to run, YYYY-MM-DD, with no time or time zone. Without it, the payment runs immediately.
- It is not the date the payment runs. On a non-business day the payment runs on
effectiveScheduledDate: always read that field. - Valid window:
tomorrow ≤ scheduledDate ≤ min(dueDate, today + 30 calendar days). Outside it, creation is refused with one of the window codes. - In the first phase, a date on a non-business day is refused with
PBP-0006.
"2026-09-16"
Planned. Business day on which the payment runs, YYYY-MM-DD. Read this date to know when the money goes out.
- Computed at acceptance as the first business day on or after
scheduledDate. Equal to it when the requested date is a business day. - Fixed at acceptance: a later calendar change does not move it.
- Only one thing moves it: when the provider refuses the execution for cutoff or time window, the payment is rescheduled to the next business day, up to the attempt limit. A rescheduled payment leaves the
effectiveScheduledDateFrom/effectiveScheduledDateTointerval it was in and enters the next one. - Present only in scheduled payments. Absent in an immediate payment.
"2026-09-14"
Planned. true when the effective date rolled past the title's due date; false otherwise, including in an immediate payment.
- The window is checked on the requested date (
tomorrow ≤ scheduledDate ≤ min(dueDate, today + 30 days)). The roll to the next business day happens after that check, so it can pass the due date: a boleto due on a Saturday, scheduled for that day, runs on Monday. - This case is accepted, not refused, and has no error code. Use the field to warn whoever scheduled the payment.
- If the title does not accept payment on the next business day without a change in value, the amount can rise. See
amountIsEstimated. - In the first phase there is no roll: a requested date on a non-business day is refused with
PBP-0006, so the field is alwaysfalse.
false
Planned. true when amount is the value looked up at acceptance and not the final value; false in an immediate payment, where the instruction was already sent with that value.
- In a scheduled payment it is
truefrom creation. The final value is the one the execution on the scheduled day uses; read it withGET /v1/payments/{id}onceexecutedAtis set.
true

