Saltar al contenido principal
GET
Get payment by ID

Autorizaciones

Authorization
string
header
requerido

JWT bearer token issued by the identity provider.

Encabezados

X-Organization-Id
string

Midaz organization the payment belongs to. Required: a request without it, or with a value that is not a canonical UUID, is refused with 400 PBP-0025. A payment of another organization is answered 404, exactly as one that does not exist.

Parámetros de ruta

id
string<uuid>
requerido

Payment identifier (UUID).

Ejemplo:

"123e4567-e89b-12d3-a456-426614174000"

Respuesta

OK.

amount
string
requerido
createdAt
string
requerido
id
string
requerido
ledgerId
string
requerido

Midaz ledger the payment was written with. Always present.

midazAccountId
string
requerido

Midaz account the payment is debited from: the midazAccountId the payment was created with. Always present.

organizationId
string
requerido

Midaz organization the payment was written with. Always present, and always the organization of the X-Organization-Id header.

status
string
requerido

The payment's current status: UNCONFIRMED, CREATED, SCHEDULED, PENDING_APPROVAL, APPROVED, EXECUTED, SETTLED, REJECTED, FAILED or CANCELED. UNCONFIRMED means the outcome at the payment provider is not known yet: every payment starts there, and one whose initiation was answered 202 stays there until it resolves. Treat the list as open: a value added later must not break a client.

Planned: status gains RETURNED, reached only by the Lerian-provider payment flow; PENDING_APPROVAL also means the payment waits for the antifraud partner's final decision.

type
string
requerido
updatedAt
string
requerido
canceledAt
string
cancellationReason
string
darf
object
description
string
digitableLine
string
dueDate
string

Due date, YYYY-MM-DD. A DARF payment carries the one its creation request named, if any. A BANKSLIP payment carries the slip's due date as the payment provider's pre-payment consult reported it: absent when the consult reported none, and on bank-slip payments created before the due date was recorded. UTILITIES payments do not carry it.

errorMessage
string
failedAt
string
failureCode
string

The product error code a FAILED payment was recorded with, when its failure has one. PBP-0211: the payment provider provably never received the payment, nothing was paid, and its reservation is cancelled. PBP-0212: the payment provider refused the payment because it arrived outside the hours it accepts payments, nothing was paid, and its reservation is cancelled. PBP-0014: the payment provider refused what it was sent. Absent on every other status, and on a failure recorded without a code. Treat the list as open.

Ejemplo:

"PBP-0211"

midazOperationId
string
payee
object
providerId
string

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, and on a payment that failed before the provider acknowledged it.

providerRequestId
string

Reference this API sends to the payment provider when it instructs this 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. It is recorded when the payment is created, before the instruction, so it is present on a payment the provider never received too: one FAILED with failureCode PBP-0211, or FAILED without a code after the ledger refused its funds. The provider holds no payment under it then, and a payment retried under the same Idempotency-Key after a refusal for funds carries the same reference as the refused attempt. Absent when the payment carries no such reference.

rejectedAt
string
rejectionReason
string
settledAmount
string
settledAt
string
requestedAmount
string
Under development

The amount the creation request named, when it named one. amount is the amount reserved and paid, which for such a payment equals it. Absent when the request named none.

Ejemplo:

"100.00"

antifraud
object
Under development

Antifraud analysis of the payment. Present on every payment the client's antifraud partner evaluated (ALLOW or REVIEW), also after the final decision, as its audit record. Absent when the tenant has the check off and on payments created before the antifraud check existed. The partner's reasons and score are recorded but not exposed.

return
object
Under development

Return of a settled payment after the issuing institution cancelled the write-off. While state is PENDING the payment is still SETTLED and the amount goes back at scheduledFor: 08:20 (America/Sao_Paulo), the first SILOC settlement of the business day after the notice. At that moment the amount is credited back to the funding account, the payment becomes RETURNED, state becomes POSTED and PAYMENT_RETURNED is sent. Only Lerian-provider payments carry it.

scheduledDate
string<date>
Under development

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.
Ejemplo:

"2026-09-16"

effectiveScheduledDate
string<date>
Under development

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/effectiveScheduledDateTo interval it was in and enters the next one.
  • Present only in scheduled payments. Absent in an immediate payment.
Ejemplo:

"2026-09-14"

effectiveAfterDueDate
boolean
Under development

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 always false.
Ejemplo:

false

executedAt
string<date-time> | null
Under development

Planned. Instant the scheduled payment was executed on its day, when the provider accepted the payment call. Null until the execution happens, and stays null for a scheduled payment canceled or failed before it reached the provider.

  • There is no separate scheduling instant: a scheduled payment is created in SCHEDULED, so createdAt is that instant.
  • Do not confuse with effectiveScheduledDate: executedAt is when it ran, effectiveScheduledDate is when it was due to run.
Ejemplo:

"2026-09-14T06:00:47Z"

failureReason
enum<string>
Under development

Planned. Why the execution of a scheduled payment failed terminally. Present only when status is FAILED and the payment was scheduled. An immediate payment that fails is described only by errorMessage.

  • In every terminal case the reservation in the ledger is released.
  • status decides whether the payment ended, never this field. The field is not returned outside FAILED.
Opciones disponibles:
INSUFFICIENT_FUNDS,
BILL_NO_LONGER_PAYABLE,
PROVIDER_REJECTED,
PROVIDER_UNAVAILABLE,
RETRY_LIMIT_EXCEEDED,
MALFORMED_RECORD,
LEDGER_CONTEXT_MISSING,
CUTOFF_WINDOW_MISSED
Ejemplo:

"RETRY_LIMIT_EXCEEDED"