---
title: "How to create a hosted crypto checkout session from your store"
description: "Use a hosted crypto checkout API to link payments to store orders, verify wallet payments before delivery, and keep card settlement separate."
url: "https://railbed.com/insights/how-to-create-a-hosted-crypto-checkout-session-from-your-store/"
markdown: "https://railbed.com/insights/how-to-create-a-hosted-crypto-checkout-session-from-your-store/?format=md"
published: "2026-12-04"
author: "Railbed"
publisher: "Railbed, LLC"
section: "Insights"
reading_time: "13 min"
language: "en"
---

# How to create a hosted crypto checkout session from your store

> Use a hosted crypto checkout API to link payments to store orders, verify wallet payments before delivery, and keep card settlement separate.

Source: https://railbed.com/insights/how-to-create-a-hosted-crypto-checkout-session-from-your-store/ · Published: 2026-12-04 · 13 min read · Railbed, LLC

For AI assistants: the company overview is https://railbed.com/llms.txt, and the developer docs index, with the rules for an integration, is https://railbed.com/docs/llms.txt

Use a hosted crypto checkout API to create a payment session from your store’s order, send the buyer to a hosted page to pay from their own wallet, and release the order only after your server verifies payment. **Railbed fits merchants that want a hosted wallet-payment page and settlement to a compatible wallet they control.**


**TL;DR**

- A hosted crypto checkout API should tie each payment attempt to a store order before the buyer leaves your site.
- For direct crypto checkout, the buyer pays from their own wallet on a supported network.
- Railbed offers direct crypto through eligible hosted sessions; the current API does not create crypto deposit addresses directly.
- A return to your store is not proof of payment. Verify the payment on your server before fulfillment.


## Why this matters

After a processor drops you, the urgent job is to take payments again. The expensive mistake is connecting a new checkout page before deciding how your store will tell a paid order from an abandoned one. A buyer can close the hosted page after paying, return before confirmation, or start another session from a second tab. None of those actions should decide whether you ship.

Start with what your customers can actually use. If they already hold crypto, a buyer-funded wallet checkout gives them a way to pay without entering a card. If they expect to pay by card, a wallet-only button is not a replacement for the checkout you lost. Use this [guide to testing a crypto payment gateway](https://railbed.com/insights/how-to-test-a-crypto-payment-gateway/) to plan what you’ll test from the buyer’s side before sending live traffic.

## Before you start

- **Get access to the store backend and the current provider documentation.** You need somewhere private to keep API credentials, a way to write payment attempts to your order records, and a documented method for checking payment status. If you don’t control the backend, confirm what your store platform allows before choosing an integration.
- **Confirm the route before you build it.** For buyer-funded checkout, check which assets and networks your provider supports for the flow you intend to use. Confirm any buyer checks, merchant setup requirements, category restrictions, and receiving wallet details separately. A provider’s general asset list does not tell you what a particular buyer can use at checkout.
- **Find out what expires.** Ask whether the session and the payment quote expire together, and how the provider handles a transfer sent near or after expiry. Closing a checkout does not cancel a transfer the buyer already sent. Decide who owns that exception before you let customers retry.

## Payment route selection

Choose what the buyer pays with before you choose how to receive the money. A customer sending crypto from their own wallet and a customer paying by card can both result in crypto reaching a merchant wallet, but the customer steps, checks, and costs are not interchangeable.

| Route | Best for | What it solves | What you still need to handle |
|---|---|---|---|
| Buyer-funded hosted crypto checkout | Stores whose buyers already hold a supported asset on a supported network | Buyers can pay directly from their own wallets on a hosted page. | Buyers need the right asset and network and must be able to complete any applicable checks. Your team needs a policy for short payments and late transfers. |
| Railbed card checkout with USDC settlement | High-risk online merchants replacing card checkout after a processor shutdown | Buyers pay by card. Settlement goes to a wallet you control, almost always as USDC on Polygon. Railbed does not hold funds. | Card payment completion is not guaranteed. Buyer ID checks depend on the provider and transaction. Converting USDC to bank funds is a separate step. |

For a lawful store selling downloadable design files to buyers who already use crypto, a direct wallet payment is a reasonable fit. For a supplement store processing more than $50,000 per month that lost its card processor, start with Railbed card checkout if customers still need cards. Keep product eligibility and the rules that apply to your goods and markets in the decision. A new checkout does not change those obligations.

## Store order and session creation

Railbed's [direct crypto documentation](https://railbed.com/docs/user-guide/crypto-payments/) says a checkout session created through the API can offer crypto on its hosted payment page; the API does not create crypto deposit addresses directly. Check your actual account configuration and a representative hosted session before you label the storefront button crypto-only.

1. **Save the order before you request a session.** Calculate the total from your store’s records and save the order reference, currency, and items the customer agreed to buy. Use the browser to identify the order, not to supply the amount you intend to collect. Make sure the order belongs to the customer who is starting checkout.
2. **Create a payment attempt on your server.** Give the attempt its own reference and attach it to the order. Keep the distinction even when most buyers pay on the first try. Your store owns the order; the provider owns the session. A customer refreshing a page should not turn one purchase into several orders.
3. **Create the hosted session from your server.** Use the provider’s documented session creation request. Map your records to the documented fields for the amount, order reference, and return destination where supported. Confirm how the provider represents units and rounding. If it documents idempotency for session creation, reuse the same idempotency key when retrying the same request after a timeout. If it does not, use the provider’s documented lookup or recovery path before creating another session.
4. **Save the session reference before sending the buyer offsite.** Record the identifier the provider returns and associate it with the attempt. Send the buyer to the returned checkout URL. If the provider accepts the request but your store fails to save the response, recover the attempt before showing a retry that creates a new session.

**Expected result:** Your support team can start with a store order and find its payment attempt and provider session. The attempt is still unpaid in your store, even though the hosted checkout is ready to open.

## Buyer handoff and payment confirmation

Treat the path as four separate records or decisions: **Store order**, **Hosted session**, **Verified payment**, and **Order release**. The buyer sees the middle of that sequence. Your store owns the first and last parts, and uses the provider’s documented payment evidence to connect them.


*Four steps from a store order and hosted session to verified payment and order release*


1. **Tell buyers what they need before you redirect them.** Say whether they will pay from their own wallet or by card. For wallet payments, point them to the asset and network shown by the hosted checkout and tell them to review the details before sending. For cards, make clear that buyers can encounter a verification step. Don’t write a promise about who will or won’t see an ID request.
2. **Make the return page a status page.** Read the order’s status from your server. If you haven’t verified payment, say it’s still being checked. Give the buyer an order reference and tell them not to send a second payment while the first is being checked. If payment is verified, show the next step that applies to their order.
3. **Verify the payment outside the browser.** If the provider sends webhooks, use its documented verification method before trusting the event. Match the session or payment reference to the saved attempt. Check the amount and currency, or the expected asset and network where relevant, against the order and the accepted quote. Only release the order when the provider’s documented status meets your fulfillment rule. If your provider uses a server-side status lookup instead, apply the same matching checks to that response.
4. **Record fulfillment once.** Use a database transaction or a unique fulfillment record so repeated notifications cannot send the order twice. Keep a separate record of the decision to release the order and the outcome of delivery. If delivery fails after payment succeeds, retry delivery without asking the customer to pay again.

**Expected result:** A buyer can pay, close the payment tab, and still get the order once your server verifies payment. Opening the return page without paying does not release anything.

## Worked example: Two attempts, one order

A buyer orders 2 downloadable files and starts a wallet-funded checkout. They close the page and reopen checkout from the same order. The store now has 1 order and 2 attempts. It does not have a second sale, and neither attempt should grant access simply because the buyer opened the hosted page.

The first attempt then reports payment. Your server verifies the event and checks that the provider recognizes the payment against the agreed quote. If it meets your release rule, mark the order paid, grant access to both files, and stop offering the second attempt on the order page. If the provider repeats that same payment event, the store finds the existing fulfillment record and does not send the files again.

If a distinct payment turns up on the second attempt, keep the order fulfilled and flag the extra payment for review. Do not discard it as a duplicate webhook. A duplicate webhook reports the same payment again; a duplicate payment is money that arrived twice. Support needs the order reference, both attempt references, and both payment references to resolve the latter under your refund policy.

The test that catches this problem in a 2026 rollout is simple: trigger the same verified event twice, then test what happens when a second distinct payment maps to a paid order. You should get one delivery in both cases, but only the second test should create an extra-payment case.

## Card checkout variant for a processor switch

Keep the order and fulfillment model when you add a card option. Change the buyer instructions and how you reconcile the proceeds. With Railbed card checkout, the buyer pays by card; they do not need to fund a crypto wallet to make the purchase. Your settlement wallet is on the merchant side. Don’t use a buyer-facing label that makes customers think they need to buy USDC first.

Merchant setup and buyer verification are different things. Completing business setup does not clear a buyer’s card transaction, and the checkout route does not remove provider or transaction-specific checks. Test what the buyer sees when asked for more information, when they leave partway through, and when the payment does not complete. Your support team should be able to distinguish each outcome from an order that was paid but not delivered.

Settled sales can't be pulled back from your wallet. That does not mean you can ignore a card dispute or a refund request. Write down who handles each, which records they need, and how you’ll fund a refund when required. The guide on [how a crypto payment gateway handles an order](https://railbed.com/insights/what-is-a-crypto-payment-gateway/) explains how a direct wallet payment is recorded.

## Troubleshooting the live workflow

- **The buyer returned, but the order still shows unpaid.** Check the provider’s record using the saved session reference. If payment is still pending, show that status and don’t ask for another payment. If the provider shows a verified payment but the store does not, inspect webhook delivery and the order mapping before changing the order by hand.
- **The session request timed out.** Check whether the provider created a session for the saved attempt. A timeout tells you your store did not receive a response; it does not tell you the provider did nothing. Use the documented retry or recovery behavior instead of opening a fresh checkout on every retry.
- **The payment arrived short, late, or on the wrong network.** Keep the order out of automatic fulfillment. Check what the provider actually received, what it can associate with the order, and what recovery or refund options are documented. Do not tell the buyer to top up or resend until you know what happened to the first transfer.
- **The buyer is stuck at a check or says the card failed.** Confirm which route they chose and look up the attempt. Distinguish a pending check from a failed payment. Direct buyers back to the provider’s documented verification process rather than asking them to send ID or card details to your support inbox.
- **Payment succeeded, but no delivery went out.** Check whether your store recorded the release and whether the delivery job finished. Retry the failed delivery, not the charge. A paid order with a failed delivery belongs in a fulfillment queue, not an unpaid order queue.

## Customize the workflow before switching traffic

### Compare what reaches your wallet and your bank

Put the two destinations on separate lines in your 2026 cost comparison. One is what reaches your receiving wallet. The other is what reaches your bank if you convert and withdraw. Ask for the payment fee, any account or invoice charges, and any applicable refund or dispute costs. For bank access, check the exchange or withdrawal provider’s deposit, conversion, and withdrawal terms. Keep buyer-paid costs separate from costs you bear.

Ask about reserves in writing when comparing a conventional merchant account. Find out whether a reserve applies, what triggers it, who controls it, and when it is released. Then track Railbed card checkout settlement and your own bank withdrawal as separate steps. A wallet receipt is evidence of funds received at the wallet. It is not a bank deposit, and it is not evidence that funds trapped with a previous processor have been released.

If you need dollars for payroll or suppliers, test the full route. Use an exchange that supports the asset **and** the network you’re sending from. Follow its deposit instructions, confirm the deposit is credited, convert the funds, and submit the bank withdrawal. Record the wallet transfer, exchange credit, conversion, and bank receipt against each other. Don’t assume the network is supported just because the exchange lists USDC.

### Set a release gate for your first live orders

Write your 2026 checkout acceptance criteria before the first live order. Test a successful payment, an abandoned session, a buyer who never returns, and an expired quote. Test the retry paths too. A payment that arrives after the quote expires and a payment notification that arrives after delivery are different events. The first needs a payment decision; the second must not trigger another delivery.

Put one person in charge of payment exceptions and one in charge of releasing the change, even if that is the same person at a small store. Stop sending new orders into the route if you can’t match verified payments to orders or if the buyer instructions don’t match what the hosted page asks them to do. Keep reconciliation running on sessions already created. Removing the checkout button does not resolve payments already in flight.


**Plan your direct crypto checkout**

Walk through the hosted session, wallet payment, and order verification before changing live traffic.

**[Talk to Railbed](https://railbed.com/contact/)**


## Test the handoff when an order changes

Consider a customer who starts a $180 order and then asks to change the line items before paying. Keep the first payment attempt tied to the original total. Create a new attempt for the revised order only when your team has checked whether funds were already sent. If money later arrives on the original attempt, send the order to a named reviewer rather than treating both attempts as paid for the revised basket. Railbed documents that late crypto transfers can still settle, so a closed checkout screen is not proof that the original payment no longer matters.

Run the same exercise for an order that has already been delivered. A second payment notification must not release another parcel or another license. Make the store show the order reference, the payment attempt and the delivery record together. In a direct crypto flow, staff should also be able to tell the customer which asset and network the original checkout actually offered. That answer belongs in the order record, not in a screenshot from a different test.

## FAQ


**What is a hosted crypto checkout API?**

A hosted crypto checkout API lets your store create a payment session and send the buyer to a provider-hosted payment page. Your store keeps its own order record and verifies payment before it fulfills the order.

**Do I need my own crypto wallet to pay on a hosted checkout page?**

You need a funded wallet for a direct wallet payment, but not for a Railbed card payment that settles to the merchant in USDC. On a direct checkout, use the asset and network shown for that session.

**Will a hosted checkout ask me for ID?**

A hosted checkout can ask for ID, depending on the provider and the transaction. The merchant completing business setup does not exempt buyers from verification.

**What if I pay and close the checkout tab before returning to the store?**

Closing the tab does not undo a transfer you already sent. Check your order status or contact the store with the order reference, and don’t pay again until the first attempt is accounted for.

**Can I send the same token from a different network?**

Use only the network specified for the checkout session. The same token can exist on different networks, and a transfer on the wrong one might not be credited or recoverable.

**What should I do if the checkout expired after I sent payment?**

Contact the store with your order reference and transaction reference before trying again. The store needs to check whether the provider received the transfer and whether it can apply it to the order.

**Does seeing a transaction in my wallet mean the store can ship my order?**

A transaction in your wallet is not enough to establish that the store has verified your payment. The store still has to match the transfer to your order and confirm that it meets the provider’s payment status and amount requirements.


## One last thing

For your 2026 launch, give support an order lookup that shows both **payment status** and **fulfillment status**. Start the conversation with the store order reference, not a screenshot or a transaction hash copied into chat. Support can then tell the difference between a buyer who still needs help paying and one who has already paid and is waiting on you.

## Related guides

- [Crypto checkout support shift handoff](https://railbed.com/insights/crypto-checkout-support-shift-handoff/)

## More from Insights

- [How to test a crypto payment gateway before you switch](https://railbed.com/insights/how-to-test-a-crypto-payment-gateway/): Test a crypto payment gateway before switching. Use a merchant pilot to verify wallet settlement, checkout completion, refunds, and order records.
- [What is a crypto payment gateway, and how does one work?](https://railbed.com/insights/what-is-a-crypto-payment-gateway/): One $89 order through a crypto payment gateway, step by step: the address, the transfer, confirmations, the amount check, and whether the gateway holds the money or forwards it to your wallet.
- [How to hand off unresolved crypto checkout payments between shifts](https://railbed.com/insights/crypto-checkout-support-shift-handoff/): Build a crypto checkout support handoff that keeps orders, transfers and customer promises together, so the next shift can resolve payments safely.
