Skip to main content
POST
/
checkout
cURL
curl --request POST \
  --url https://checkout.fanfare.io/api/checkout \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "cancelUrl": "<string>",
  "checkoutClaim": "<string>",
  "idempotencyKey": "<string>",
  "successUrl": "<string>"
}
'
{
  "checkoutUrl": "<string>",
  "expiresAt": "<string>",
  "orderId": "<string>",
  "paymentId": "<string>"
}

Authorizations

Authorization
string
header
required

Fanfare secret key. Keep secret credentials on your server.

Body

application/json
cancelUrl
string
required
checkoutClaim
string
required
idempotencyKey
string
required
mode
enum<string>
required
Available options:
hosted,
embedded
successUrl
string
required

Response

Checkout session created

checkoutUrl
string
required
expiresAt
string
required
orderId
string
required
paymentId
string
required