CheckoutLive
Checkout Sessions
Create hosted checkout sessions for customer payments and redirect customers to Yera Connect Checkout.
Implemented route
POST /api/v1/checkout/sessions creates a hosted checkout session for an authenticated merchant. GET /api/v1/checkout/sessions/{sessionId} retrieves public checkout details for that session.
Create checkout session
curl -X POST https://app.yeraconnect.io/api/v1/checkout/sessions \
-H "Authorization: Bearer yera_test_sk_your_secret_key" \
-H "Content-Type: application/json" \
-d '{
"amount": 250,
"currency": "EUR",
"destinationAsset": "USDC",
"network": "polygon",
"countryCode": "DE",
"customerEmail": "customer@example.com",
"merchantOrderId": "ORDER-1001",
"successUrl": "https://merchant.com/success",
"cancelUrl": "https://merchant.com/cancel",
"webhookUrl": "https://merchant.com/webhooks/yera"
}'Important status rule
Do not mark an order paid from success URLs, cancel URLs, or frontend redirects. Use backend payment status and webhooks.
Common fields
- amount
- currency
- destinationAsset
- network
- countryCode
- merchantOrderId
- successUrl
- cancelUrl
- webhookUrl