Skip to Content
LandedFXDocs

Create a checkout session

POST
/api/v1/checkout/sessions

A hosted page where a customer pays from any coin you allow, and you receive the exact amount in USDC on Base. Send them to url, then listen for checkout.session.completed.

Authorization

apiKey
headerx-api-key<token>

Header Parameters

Idempotency-Key?string

Retry safely: the same key and parameters return the first session. Different parameters are refused.

Request Body

application/json
  1. body
wallet*string

Your wallet on Base, which receives the money. Must be invited while checkout is closed.

amount*number

What you receive, in USD. It settles as exactly this much USDC on Base.

title*string

What the payment is for

description?string
acceptMode?string

Which coins the payer may use

Default"all"
Value in"all""stablecoins""majors""custom"
acceptAssets?array<string>

With custom: asset keys from GET /swap/assets

successUrl?string

Where to send the payer once paid. {CHECKOUT_SESSION_ID} is replaced with the id.

cancelUrl?string

Where the back link goes

clientReferenceId?string

Your own id, returned on the session and its webhooks

metadata?

Up to 20 text values, returned on the session and its webhooks

expiresInMinutes?number
Range30 <= value <= 1440
Default1440
branding?

Response Body

application/json
  1. response
code*number

HTTP status code

message*string

Human-readable message

data?

Response payload

metadata?
errors?array<string>

Validation errors, when the request was rejected

Example Request
curl -X POST 'https://api.landedfx.com/api/v1/checkout/sessions' \  -H 'Content-Type: application/json' \  -d '{  "wallet": "string",  "amount": 25,  "title": "Order 1042"}'
Example Response
{  "message": "string",  "metadata": {    "page": 1,    "limit": 20,    "totalDocs": 42,    "prevPage": null,    "nextPage": 2,    "totalPages": 3  },  "errors": [    "string"  ],  "code": 201,  "data": {    "id": "cs_C-uVukE6A_gp",    "object": "checkout.session",    "status": "open",    "paymentStatus": "unpaid",    "url": "string",    "amount": 0,    "currency": "usd",    "settlesIn": "USDC:base",    "clientReferenceId": "string",    "metadata": {},    "paymentId": "string",    "expiresAt": "string"  }}