Initiate a payment
Initiates a bankslip or utilities bill payment. The type is classified automatically from the digitable line. The payment is executed immediately; this operation does not accept a scheduling date. A request that sends scheduledDate is refused with 400 PBP-0001, naming body.scheduledDate as an unexpected property.
Authorizations
JWT bearer token issued by the identity provider.
Headers
Midaz organization the account and the ledger entry live under. Required: a request without it, or with a value that is not a canonical UUID, is refused with 400 PBP-0025.
Client-supplied idempotency key, a UUID. Required: a request without it, or with a value that is not a UUID, is refused with 400 PBP-0012.
Body
Bankslip or utilities digitable line, digits only.
"00190500954014481606906809350314337370000000100"
Midaz account the payment settles from. Who PAYS is the registered owner of this account, read from the Midaz CRM — the request does not state a payer.
Free-text description carried on the payment.
Midaz ledger the account lives in and the entry is posted to. Required: absent, blank or not a canonical UUID is refused with 400 PBP-0026.
Response
Created. The payment provider acknowledged the payment: it is in status CREATED and carries the provider's providerId. Its outcome arrives later; follow it with GET /v1/payments/{id}. A request under an Idempotency-Key that already names a payment the provider acknowledged is answered 201 too, with that payment as it stands, in whatever status it has reached. Compare the 202, where the outcome at the provider is not known.
Midaz ledger the payment was written with. Always present.
Midaz organization the payment was written with. Always present.
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.

