2 min read
In brief
- A hosted checkout gives you session continuity, reliable purchase firing and refund events for free; a custom checkout means you implement all three.
- The most common failure is not a missing event but a purchase that fires before payment is confirmed, or twice on retry.
- Test with a real payment, a failed payment, and a retry — three scenarios that a happy-path test never covers.
What you inherit
| Responsibility | Hosted checkout | Custom checkout |
|---|---|---|
| Session continuity across checkout | Handled | Yours — cookies, storage, identifiers |
| Purchase fired once, after confirmation | Handled | Yours — and the hardest to get right |
| Refund events | Often automatic | Yours, with no default |
| Currency and value mapping | Handled | Yours |
| Retry and idempotency | Handled | Yours |
The failures that appear in the first fortnight
- Purchase fired on the redirect rather than on server confirmation, so a failed payment reports a sale.
- Purchase fired twice when the customer retries — same order, two events, two ids.
- Event id generated per request instead of per order, which breaks deduplication with the browser copy.
- Consent applied to the page but not to the server call, because the server has no banner to consult.
- Value sent before the final shipping and discount calculation, so every order is off by a predictable amount.
The test that catches most of it
- 1
Real payment, successful
One event, correct value, correct currency, id present.
- 2
Real payment, declined
No purchase event at all. This is the test most teams skip and the one that inflates reports fastest.
- 3
Retry after failure
One purchase event total, not two. If the retry creates a second order id, the id must come from the order, not the attempt.
- 4
Refund
A refund event, or deliberate documentation that refunds are handled elsewhere. Silence is not a decision.
Why this matters commercially
A custom checkout is usually built for conversion. A checkout that reports phantom purchases will show a better conversion rate than it has, and the improvement will be credited to the redesign.
A hosted checkout hid six responsibilities. If you have replaced it, you own all six — and the only one that will be noticed late is the purchase that fires on a payment that never completed.
