Payezydevelopers
Sandbox

API reference / Act as a platform

Reject a customer's payment

POST/v1/platforms/{platformOrgId}/customers/{customerOrgId}/payments/{paymentId}/reject

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

Before you call it

  • Organizationplatform
  • Permissionplatform:customer_payments_approve

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.

Request body

FieldWhat it does
commentstringNote left with a decision.

Response 200

Rejected and canceled

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

One of inbound outbound

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

One of payment withdrawal deposit

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

Events it causes

Errors to handle

CodeWhat it means and what to do
already_decided409you already responded to this payment
not_pending_approval409The payment is no longer waiting for approval.

Fetch the payment to see its current status.

Every error is a Problem document. Branch on code; quote request_id to support.