Skip to main content
GET
Get payment by ID

Authorizations

Authorization
string
header
required

JWT bearer token issued by the identity provider.

Headers

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.

Path Parameters

id
string<uuid>
required

Payment identifier (UUID).

Example:

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

Response

OK

amount
string
required
createdAt
string
required
id
string
required
ledgerId
string
required

Midaz ledger the payment was written with. Always present.

midazAccountId
string
required

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

organizationId
string
required

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

status
string
required

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.

type
string
required
updatedAt
string
required
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-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.

Example:

"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