Create a checkout session
Creates a payment order and hosted checkout session in one idempotent request. The request must include an `Idempotency-Key` header so retries are safe.
/v1/checkout-sessionsAuthorization
bearerAuth Paste your API key from the dashboard.
In: header
Header Parameters
Stable client-supplied key. Replays return the original response.
Request Body
application/json
TypeScript Definitions
Use the request body type in TypeScript.
Response Body
application/json
application/json
application/json
curl -X POST "https://example.com/v1/checkout-sessions" \ -H "Idempotency-Key: string" \ -H "Content-Type: application/json" \ -d '{ "merchant_order_id": "string", "amount": "string", "accepted_assets": [ { "chain": "ethereum", "asset": "USDC" } ], "expires_at": "2019-08-24T14:15:22Z" }'{
"id": "string",
"client_secret": "stringstringstri",
"status": "open",
"title": "string",
"description": "string",
"success_url": "http://example.com",
"cancel_url": "http://example.com",
"walletconnect_project_id": "string",
"expires_at": "2019-08-24T14:15:22Z",
"created_at": "2019-08-24T14:15:22Z",
"payment_order": {
"id": "string",
"merchant_order_id": "string",
"amount": "string",
"requested_amount": "string",
"settlement_asset": "USDC",
"status": "created",
"expires_at": "2019-08-24T14:15:22Z",
"created_at": "2019-08-24T14:15:22Z",
"accepted_assets": [
{
"chain": "ethereum",
"asset": "USDC"
}
],
"payment_instructions": [
{
"chain": "ethereum",
"asset": "USDC",
"address": "string"
}
],
"tx_hash": "string",
"tx_chain": "ethereum"
}
}{
"statusCode": -9007199254740991,
"message": "string",
"error": "string"
}{
"statusCode": -9007199254740991,
"message": "string",
"error": "string"
}How is this guide?
Last updated