# Crypto payments for ecommerce stores

Canonical: https://apa.app/solutions/ecommerce-crypto-payments

Add hosted crypto checkout to an online store with API-created checkout sessions, order metadata, redirects and signed payment webhooks.

## Product fit

### Create a checkout session from your backend

For ecommerce, a checkout session is the core primitive. Your backend creates a session with amount, currency, payout wallet, order id and metadata, then redirects the customer to hosted checkout.

- Create sessions through REST API
- Attach order ids and metadata for reconciliation
- Redirect after success or cancellation

### Use webhooks to update the order

Crypto payments are asynchronous. Apa exposes payment states and signed webhooks so your store can move orders from pending to paid only after the payment settles.

- Listen for payment.created, payment.pending, payment.routing and payment.paid
- Handle failed, expired and refund-required states
- Reconcile by order id and metadata

## Key capabilities

- Hosted checkout: Keep wallet selection, QR/manual payment and payment status UX out of your store code.
- Developer contract: Checkout sessions, payment objects, errors and webhooks are documented for backend teams.
- Non-custodial settlement: Your store receives funds in its payout wallet instead of waiting for platform withdrawals.

## FAQ

### How does an ecommerce store use Apa?

The store backend creates a checkout session, redirects the customer to hosted checkout and listens for signed webhooks to update order state.

### Can I pass an order id?

Yes. Checkout sessions and payment links support merchant order references and metadata for reconciliation.

### Should I fulfil on pending or paid?

Fulfil after a terminal successful state such as paid. Pending and routing states mean the payment is still moving.
