Quickstart
Create your first invoice and open hosted checkout in under five minutes.
1. Get an API key
In the Ulasend dashboard, create a test key (pk_test_…). Store it as an environment variable on your server — never in frontend code:
export ULASEND_API_KEY="pk_test_xxxxxxxx"
2. Create an invoice for this order
Call Ulasend from your backend when the buyer is ready to pay. Pass this cart's dollar total as usd_amount:
curl -X POST https://ulasend.com/api/v1/invoices \
-H "Authorization: Bearer $ULASEND_API_KEY" \
-H "Content-Type: application/json" \
-H "Idempotency-Key: order-12345" \
-d '{
"usd_amount": "49.99",
"asset": "USDC_BASE",
"customer_email": "buyer@example.com",
"external_reference": "order-12345",
"allow_asset_selection": true
}'3. Send the buyer to checkout
Redirect them to checkout_url in the response. They pay with a wallet QR, or (when enabled) buy crypto with a card. Card purchases default to USDC unless they pick another coin first. Choose which coins you accept under Settings → Accepted coins.
4. Fulfill on the webhook
Listen for invoice.paid. Match external_reference or customer_email to your order, then fulfill in your system. See Webhooks.