Blog

Checkout and payment statuses in CoinStack, explained

CoinStack11 min read
Product

A CoinStack checkout has 6 statuses: pending, confirming, partial, completed, expired and resolved. Three flags add detail: underpaid, overpaid and late. Each transfer the customer sends is a payment with its own 4 statuses: pending, completed, refunded and failed. Payments drive the checkout, and the checkout is what you act on. Fulfil an order when its checkout is completed, and treat resolved as paid if you use it.

What are the 6 checkout statuses?

A checkout is the request for one payment, and its status answers one question: has this been paid? The API returns the lowercase value, the dashboard shows a capitalized label, and the customer's checkout page shows a heading of its own.

StatusDashboard labelWhat it meansCustomer's page showsEvent sent
pendingPendingNothing has been paid yetThe token and network choice, then Send exactlyNone
confirmingConfirmingA payment was detected and is being processedConfirming paymentcheckout.confirming
partialPartialLess than the full amount has arrived, and the checkout is still openRemaining amountcheckout.partial
completedCompletedPaid in full, or short by no more than your allowancePayment completecheckout.completed
expiredExpiredClosed before it was paid in fullCheckout expiredcheckout.expired
resolvedResolvedYou accepted an underpaymentPayment completecheckout.resolved

The checkouts guide puts the event rule in one line: "Each change after pending sends a webhook event named after the new status." Creating a checkout sends nothing, which is why there is no checkout.pending event.

The last row deserves a second look. When you resolve an underpaid checkout, the customer's page switches to Payment complete, the same screen a full payment produces. Resolving is a decision you communicate to the customer as well as to your own systems.

How does a checkout move between statuses?

Most checkouts take the short path: pending, then confirming for seconds to a few minutes, then completed. The other moves all have a specific cause.

FromToWhat causes it
pending or partialconfirmingA new transfer is detected
confirmingcompletedThe payment completes and the total now covers the amount
confirmingpartialThe payment completes but the total is still short
confirmingpending or expiredThe only payment is returned or fails, so nothing counts
pending or partialexpiredexpires_at passes, or you expire it early
expiredcompletedA late payment brings the total to the full amount
partial or expiredresolvedYou select Mark as resolved, or call the resolve endpoint

Two rules limit what you can do by hand. Expire works only on a pending or partial checkout. Resolve works only on a partial or expired checkout that has received a payment. In the dashboard both buttons appear on the checkout's page for members, admins and the owner when those conditions hold. resolved is final: the docs say to "Treat it as paid in your own system."

Notice that expired is not final. A checkout can send checkout.expired at 10:00 and checkout.completed at 10:40.

The 3 flags: underpaid, overpaid and late

Flags sit next to the status and explain an unusual payment. The dashboard shows them as an Underpaid or Overpaid row on the checkout's page, and as "paid late" beside the status. The examples below use a $200 checkout paid in USDC and ignore the fraction of a cent by which USDC's market price can differ from $1.

Underpaid means payments arrived but add up to less than the full amount. Whether the checkout still completes depends on your allowance, set under Settings, then Underpayment. The default is 0.5% of the total, which is $1.00 here.

  • A customer who sends 199.40 USDC is 60 cents short. That is inside the allowance, so the checkout is completed with underpaid set, because the flag marks any gap of 1 cent or more.
  • A customer who sends 150 USDC is $50 short. The checkout becomes partial and stays open for the rest.
  • If the rest never arrives, the checkout ends as expired with underpaid, and the 150 USDC has already reached your wallet.

The allowance can also be a fixed amount in US dollars, and if you set both, the smaller one applies. Add a fixed $0.50 allowance and the 199.40 USDC payment is now too short: the checkout goes partial instead.

Overpaid is set when the customer pays more than 2% over. On $200 the line is $204. A payment of 203 USDC completes the checkout with no flag, and the extra $3 still settles to you. A payment of 210 USDC completes it with overpaid set. All of it settles to your wallet either way, and refunding the excess is your choice, made from your own wallet.

Late is set when the payment that completed the checkout arrived after expires_at. Say the checkout expired on Tuesday at 10:00 and the customer's transfer lands at 10:40. The status changes from expired to completed, late is set, and checkout.completed is sent. With a token that is not a stablecoin, timing matters twice: the amount was only locked for 20 minutes (60 for BTC), so an ETH payment sent after the lock is counted at the market price when it arrives. If ETH has fallen 2% by then, the payment covers 98% of the amount, and the checkout ends up partial, or stays expired with underpaid if it had already closed.

Underpaid crypto payments and overpaid and late crypto payments go further into each case.

What are the 4 payment statuses?

A payment is one transfer the customer sent to a checkout's deposit address. You never create one; it appears when a transfer is detected. Most checkouts have exactly one.

StatusDashboard labelWhat it meansEvent sent
pendingConfirmingThe transfer was detected and is being processedpayment.pending
completedCompletedThe USDC reached your walletpayment.completed
refundedReturned to senderThe transfer could not be processed and was sent backpayment.refunded
failedFailedThe transfer could not be processedNone

Watch the word "pending". On a checkout it means nothing has arrived. On a payment it means something has arrived and is being processed, which is why the dashboard labels a pending payment Confirming. Code that checks status === "pending" without knowing which object it holds will get this wrong.

A returned payment carries the reason in its fail_reason field. Only completed payments count towards the checkout.

How do payments change the checkout status?

The payments guide gives 3 rules. While any payment is pending, the checkout is confirming. When a payment completes, its USDC is added to the checkout's received, and the checkout becomes completed if it is now paid in full or partial if not. When a payment ends refunded or failed, it adds nothing, and a checkout with no other payments goes back to pending, or to expired if it is past expires_at.

Each completed payment also has a share, the fraction of the checkout it covered. A checkout is paid in full when the shares add up to 1, or fall short by no more than your allowance. Here is the $200 checkout paid in 2 parts with USDC on Solana:

TimeWhat happensPayment statusCheckout statusEvents
10:00Checkout createdpendingNone
10:05Customer sends 80 USDCpendingconfirmingpayment.pending, checkout.confirming
10:06First payment completes, share 0.4completedpartialpayment.completed, checkout.partial
10:20Customer sends 120 USDCpendingconfirmingpayment.pending, checkout.confirming
10:21Second payment completes, share 0.6completedcompletedpayment.completed, checkout.completed

At the end, received is $198.40. The fee is 0.8% of each payment, 64 cents on the first and 96 cents on the second, $1.60 in all. That is why the docs say to use status, not received, to decide whether a checkout is paid: on a fully paid checkout received is always lower than value.

A refunded payment produces a quieter signal. If the customer's only transfer is returned, the checkout drops back to pending, and because there is no checkout.pending event, the notice you get is payment.refunded.

Which status should you act on?

Your system needs to make a decision on 5 situations. Everything else is a moment to wait.

You seeWhat to do
completedFulfil the order
completed with overpaidFulfil, then decide whether to send back the excess
completed with lateFulfil if you still can; if the order was cancelled, refund it
expired with underpaidMark as resolved to accept what came, or refund it from your wallet
resolvedFulfil the order, because you accepted the payment

pending, confirming and partial need no action from you; a customer who sees "Remaining amount" can top up to the same address. A plain expired checkout received nothing, so the only step is a new checkout if the customer asks.

For webhooks, the webhooks guide says most integrations only need checkout.completed, plus checkout.expired if you release stock or cancel orders. Add checkout.resolved if anyone on your team uses Mark as resolved. Do not fulfil on payment.completed, because a completed payment can leave its checkout partial. Events can arrive twice and out of order, so record each event_id and, when order matters, read the checkout and act on its current status. Reliable payment webhooks covers the patterns.

What each status means in WHMCS, WooCommerce, Blesta and PrestaShop

The official CoinStack plugins translate checkout statuses into each platform's own order or invoice states. Until a payment is detected, no payment is recorded in WHMCS, WooCommerce or Blesta, and PrestaShop has not created an order at all. From the first detected payment on, the integration guides document these states:

CheckoutWHMCS 8 or 9WooCommerceBlesta 6+PrestaShop 8 or 9
confirmingInvoice shows Payment PendingOrder on hold, with a noteTransaction shows as pendingOrder created as Awaiting crypto payment
completedPayment recorded, invoice marked paidOrder marked paid, moves to ProcessingTransaction recorded and applied to the invoicesPayment recorded, order moves to Payment accepted
expired with underpaidWhat arrived is recorded on the invoice; the customer can pay the rest from the invoice pageResolve to mark the order paid, or refundWhat arrived is recorded and applied; the customer can pay the rest from the client areaOrder moves to Payment error, with a note
resolvedRemainder recorded, invoice marked paidOrder marked paidRemainder recorded and appliedOrder marked paid

While a checkout is partial, WooCommerce keeps the order on hold with a note, and PrestaShop keeps it at Awaiting crypto payment with a link on the order page to pay the rest.

A few platform details change how you read the table. In WooCommerce, cancelling an unpaid order closes its checkout, and every payment update is written to the order as a note; WooCommerce order statuses for crypto payments follows an order through each one. In PrestaShop, a customer who leaves without paying creates no order, no order email and no stock hold, and an order whose cart changed after the checkout opened goes to Payment error with a note rather than being marked paid (PrestaShop: create the order after the crypto payment). In Blesta, one checkout can pay several invoices at once. In WHMCS, the module also uses the WHMCS cron to catch up on updates it missed, so an invoice still unpaid after a completed checkout points to one of the causes the WHMCS guide lists: a System URL without a valid https:// certificate, a blocked callback or a stopped cron. WHMCS invoice paid on-chain but still Unpaid works through each.

Frequently asked questions

Is a resolved checkout the same as a paid one?

For your records, yes. resolved means you looked at an underpaid checkout and accepted what arrived. The status is final, a checkout.resolved event is sent, the plugins mark the invoice or order paid, and the customer's page shows Payment complete. The USDC you received is what the customer sent, and resolving is your decision to accept it.

Can an expired checkout still become completed?

Yes. A payment that arrives after expires_at is still recorded. If it brings the total to the full amount, the checkout changes from expired to completed, the late flag is set, and checkout.completed is sent. Decide in advance what your system does when that event arrives for an order it already cancelled.

What does "Returned to sender" mean on a payment?

It is the dashboard label for a payment with the status refunded. The transfer could not be processed and was returned to the sender, with the reason recorded in fail_reason. A returned payment adds nothing to its checkout, and a payment.refunded event is sent. It is not a refund you made; those go from your own wallet.

Why is the amount received lower than the checkout's amount?

received is the USDC that actually reached your wallet, after the 0.8% fee. On a $200 checkout the fee is $1.60, so a fully paid checkout shows $198.40. That gap is expected, which is why the status, not the received amount, tells you whether a checkout is paid.

Should I fulfil an order on payment.completed?

No. payment.completed means one transfer's USDC reached your wallet, but that transfer may have covered only part of the amount, leaving the checkout partial. Fulfil on checkout.completed, or on checkout.resolved if you accept underpayments, and check the checkout's status when events arrive out of order.

More posts