Checkout API
Programmatically get a hosted checkout URL to redirect buyers.
Create checkout session
POST /api/checkout — returns a redirect_url. No API key required.
Request body
JSON
{
"productId": "your-product-uuid",
"success_url": "https://yoursite.com/thank-you",
"cancel_url": "https://yoursite.com/cancelled",
"email": "[email protected]"
}Only productId is required. Do not pass payment method fields — the buyer chooses on checkout.
Response
200 OK
{
"redirect_url": "https://flintpay.cc/checkout/your-product-uuid?success_url=..."
}Example
cURL
curl -X POST https://flintpay.cc/api/checkout \
-H "Content-Type: application/json" \
-d '{
"productId": "your-product-uuid",
"success_url": "https://yoursite.com/success",
"cancel_url": "https://yoursite.com/cancel",
"email": "[email protected]"
}'