Deprecated — use POST /api/payment/create for one-time payments or POST /api/subscription/create for subscriptions.
POST /api/payment/create
POST /api/subscription/create
This endpoint still works but does not validate the product type.
cURL
curl --request POST \ --url https://api.suby.fi/api/payment/initiate \ --header 'Content-Type: application/json' \ --header 'X-Suby-Api-Key: <api-key>' \ --data ' { "productId": "<string>", "customerEmail": "jsmith@example.com", "externalRef": "<string>", "metadata": {}, "successUrl": "<string>", "cancelUrl": "<string>", "priceCents": "<string>", "currency": "USD" } '
{ "success": true, "data": { "paymentId": "<string>", "paymentUrl": "<string>", "metadata": {} } }
API key authentication
USD
EUR
Payment initiated
true
Show child attributes