Skip to main content
A payment is one transfer a customer sent to a checkout’s deposit address. Most checkouts have one payment. A checkout has more than one when the customer pays in parts, or sends again after paying too little. You do not create payments. One appears when a transfer is detected.

Statuses

A payment starts as pending and ends in one of the other three. Only completed payments count towards a checkout.

How a payment changes its checkout

  • While a payment is pending, the checkout’s status is confirming.
  • When a payment is completed, its USDC is added to the checkout’s received. If the checkout is now paid in full it becomes completed. If not, it becomes partial.
  • If a payment ends as refunded or failed, it adds nothing. A checkout with no other payments goes back to pending, or becomes expired if it is past expires_at.
Each completed payment has a share: how much of the checkout it covered. 1 is the full amount and 0.4 is 40%. A checkout is paid in full when the shares of its completed payments add up to 1, or fall short by no more than your underpayment allowance.

Read payments

Get a checkout returns its payments along with the checkout. To get payments on their own, list them, optionally for one checkout:
network and token are what the customer paid with. The amounts are explained in Fees and settlement.

Transactions

A payment records two transactions: Look either one up in a block explorer for its network.

Events

Payments send three webhook events: payment.pending, payment.completed and payment.refunded. No event is sent when a payment ends as failed. To decide whether an order is paid, use the checkout’s events and status, not the payment’s. A completed payment can still leave its checkout partial.