POST /api/v1/checkouts
Create a checkout scope: checkouts:write
Returns a hosted checkout `url`; redirect the buyer there. After payment they land on `success_url?checkout_id=<id>`. Sessions expire after 24 hours.
Request body
| Field | Type | Notes |
|---|---|---|
product_id required | string | |
price_id | string | Defaults to the product's first active price. |
currency | string | Picks the product's price in this currency. |
seats | integer | |
amount | integer | Pay-what-you-want amount in minor units. |
discount_id | string | null | |
allow_discount_codes | boolean | |
affiliate_code | string | |
customer_email | string | null (email) | |
customer_name | string | null | |
external_customer_id | string | null | Your own user id; becomes the customer's external_id. |
success_url | string | null (uri) | |
metadata | object | Up to 20 flat keys. Echoed in webhooks. |
curl -X POST https://api.sleetpay.com/api/v1/checkouts \
-H "Authorization: Bearer $SLEET_API_KEY" \
-H "Content-Type: application/json" \
-d '{ ... }'