Payezydevelopers
Sandbox

API reference / Act as a platform

Get a customer's payment

GET/v1/platforms/{platformOrgId}/customers/{customerOrgId}/payments/{paymentId}

Acts on a linked customer with the platform's own key or team (platform:customer_accounts_view). Same as GET /v1/orgs/{orgId}/payments/{paymentId}.

Before you call it

  • Organizationplatform
  • Permissionplatform:customer_accounts_view

Parameters

ParameterWhat it does
platformOrgIdpath, uuidrequiredYour platform's organization id. platformOrgId is the platform response's org_id.
customerOrgIdpath, uuidrequiredcustomerOrgId is the customer response's org_id.
paymentIdpath, uuidrequiredThe payment id from create payment or list payments. Withdrawals use the same id.

Response 200

A payment with its status timeline

FieldWhat it does
paymentPaymentrequiredA payment, deposit, or withdrawal on an account.
payment.idstring (uuid)requiredPayment id. Send it as paymentId to get, cancel, approve, or reject the payment.
payment.account_idstring (uuid)requiredPayezy account the money moved from or into.
payment.directionenumrequiredWhether money came in or went out. One of: inbound, outbound.

One of inbound outbound

payment.kindstringrequiredHow the money moved, for example a fiat deposit or a payout.
payment.purposeenumpayment sends to a third party, withdrawal moves funds to the organization's own account, deposit is incoming

One of payment withdrawal deposit

payment.invoice_numberstringYour invoice or bill number, up to 64 characters. It is stored on the payment.
payment.statusstringrequiredWhere the payment is in its lifecycle, such as pending_approval, processing, completed, failed, or canceled.
payment.amountstringrequiredPayment amount as a decimal string in major units of asset.
payment.assetstringrequiredAsset code, such as USD, USDC, or SBC.
payment.feestringrequiredFee reserved with the amount, as a decimal string.
payment.railstringrequiredRail that sent or received the money, such as ach_credit, wire, or onchain.
payment.memostringrequiredNote stored with the payment, up to 140 characters.
payment.failurePaymentFailureWhy a payment failed and the code to branch on.
payment.failure.codestringrequiredStable reason the payment failed.
payment.failure.reasonstringrequiredWhy this happened, or why the change is being made.
payment.created_atstring (date-time)requiredWhen this record was created, as an ISO-8601 timestamp.
payment.completed_atstring (date-time)When this finished, as an ISO-8601 timestamp.
payment.counterparty_idstring (uuid)Recipient id. A recipient is a counterparty.
payment.recipientstringRecipient name (outbound)
payment.recipient_accountstringMasked destination, e.g. Chase ••6789
payment.dest_assetstringStablecoin delivered (crypto payouts)
payment.dest_networkstringNetwork a crypto payout is delivered on.
payment.tx_hashstringOn-chain hash or bank trace number
payment.tx_urlstringBlock explorer page for tx_hash. Set only for a crypto payout whose network Payezy supports.
payment.from_addressstringOn-chain address a crypto payout was sent from (the customer's holding wallet).
payment.to_addressstringOn-chain address a crypto payout was sent to (the destination wallet).
payment.approvals_requiredintegerHow many approvals the payment still needs.
payment.created_bystring (uuid)User id of the person who created this.
eventsPaymentEvent[]requiredStatus changes, oldest first, or the webhook event names this endpoint receives.
events[].statusstringrequiredWhere this record is in its lifecycle.
events[].messagestringrequiredWhat happened, in plain language.
events[].atstring (date-time)requiredWhen this happened, as an ISO-8601 timestamp.
approvalsPaymentApproval[]requiredApprove and reject decisions already recorded on this payment.
approvals[].user_idstring (uuid)requiredUser id of the person.
approvals[].emailstringEmail address.
approvals[].decisionenumrequiredThe approve or reject choice. One of: approve, reject.

One of approve reject

approvals[].commentstringrequiredNote left with a decision.
approvals[].atstring (date-time)requiredWhen this happened, as an ISO-8601 timestamp.
approvals[].api_key_idstring (uuid)The API key that decided, when a key did
approvals[].via_platform_idstring (uuid)The platform that decided on the customer's behalf
legsPaymentLeg[]requiredPartner steps that moved the money.
legs[].seqintegerrequiredOrder of this leg. The first step is 1.
legs[].partnerstringrequiredBanking or payout partner that handled this.
legs[].operationstringrequiredWhat the partner did for this leg of the payment.
legs[].statusstringrequiredWhere this record is in its lifecycle.
legs[].amountstringrequiredAmount as a decimal string in major units, such as dollars.
legs[].referencestringPartner reference for this step, such as a bank trace or a transaction hash.
can_approvebooleanrequiredThe caller may approve or reject this payment now
can_cancelbooleanrequiredWhether the caller may cancel this payment now.