Underpayments
Small shortfalls
A payment that falls slightly short still completes the checkout. How short is set under Settings, then Underpayment, in the dashboard:- Percent of the total. The default is 0.5%.
- Fixed amount in USD. Off by default.
completed, and underpaid is true if it was short by one cent or more.
Partial payments
A payment that falls short by more than the allowance moves the checkout topartial and sends a checkout.partial event. The checkout stays open, and the customer can send the rest to the same address. When the total reaches the full amount, the checkout becomes completed.
If the checkout reaches expires_at while it is still partial, it becomes expired with underpaid set to true. The USDC from the partial payment has already reached your wallet.
Resolving an underpaid checkout
When a checkout ispartial or expired and has received a payment, you have two options:
- Accept what was paid. Resolve the checkout, or select Mark as resolved on the checkout in the dashboard. Its status becomes
resolvedand acheckout.resolvedevent is sent. - Return the payment. Send the customer a refund from your own wallet. CoinStack does not send refunds.
resolved is final. Treat it as paid in your own system.
Overpayments
If the customer pays more than 2% over the full amount, the checkout iscompleted with overpaid set to true. All of it is settled to your wallet. Compare received with what you expected and refund the difference from your own wallet if you choose to.
Late payments
A payment that arrives afterexpires_at is still recorded against the checkout.
- If it brings the total to the full amount, the checkout changes from
expiredtocompleted,lateis set totrue, and acheckout.completedevent is sent. - If it does not, the checkout stays
expiredwithunderpaidset totrue. You can resolve it or refund the customer.
checkout.completed event for an order you already cancelled.
Payments after the price lock
When a customer chooses a token, the amount is fixed at the price at that moment. That price is held for a limited time:
A payment sent after that time, in a token that is not a stablecoin, is counted at the market price when it arrived. If the price has fallen, the payment may no longer cover the full amount and the checkout becomes
partial.
Returned payments
Sometimes a payment cannot be processed. It is returned to the sender, and the payment’sstatus becomes refunded with the reason in fail_reason. A payment.refunded event is sent.
A returned payment does not count towards the checkout.