Skip to content

Accept your first payment

This is the deeper version of the Quickstart, going through every step you’ll handle in production.

ModelWhen to use
Hosted CheckoutWeb checkout, customer chooses currency from your catalog. ParaSta hosts the payment page.
QR SessionIn-store / POS / kiosk. Customer scans a QR with their wallet.
Direct PaymentYou control the UI fully and handle the address display yourself.

This guide uses Hosted Checkout. See Hosted Checkout, QR Payments for the others.

Terminal window
curl https://api.parasta.io/v1/checkout/sessions \
-H "Authorization: Bearer sk_test_..." \
-H "Content-Type: application/json" \
-d '{
"line_items": [{"name":"T-shirt","amount":10000000,"currency":"USDT"}],
"success_url": "https://your-site.com/success?session_id={CHECKOUT_SESSION_ID}",
"cancel_url": "https://your-site.com/cancel"
}'

session.url is a hosted ParaSta page. The customer picks their network, sends crypto, and is redirected to success_url after payment confirms.

4. Verify on your server (don’t trust the redirect alone)

Section titled “4. Verify on your server (don’t trust the redirect alone)”

After the customer returns to success_url, fetch the session server-side to confirm:

Terminal window
curl https://api.parasta.io/v1/checkout/sessions/cs_abc123 \
-H "Authorization: Bearer sk_test_..."

But fulfillment from the redirect alone is fragile (customer may close the tab). The reliable signal is the checkout.session.completed webhook.

See Webhooks → Overview. At minimum, listen for checkout.session.completed and use id for idempotent fulfillment.