cURL
basic
curl --request POST \ --url https://app.tagadapay.com/api/public/v1/subscriptions/create \ --header 'Authorization: Bearer <token>' \ --header 'Content-Type: application/json' \ --data ' { "customerId": "cust_123", "priceId": "price_456", "storeId": "store_789", "quantity": 1, "currency": "USD", "initiatePayment": false } '
{ "subscription": { "id": "sub_789", "customerId": "cust_123", "priceId": "price_456", "storeId": "store_789", "status": "active", "quantity": 1, "currency": "USD", "createdAt": "2024-03-20T10:30:00Z", "currentPeriodStart": "2024-03-20T10:30:00Z", "currentPeriodEnd": "2024-04-20T10:30:00Z", "nextBillingDate": "2024-04-20T10:30:00Z", "cancelAtPeriodEnd": false, "metadata": { "source": "api" } } }
Create a new subscription for a customer with specified product and pricing
Enter your API key as: Bearer your-api-key
Bearer your-api-key
x > 0
Show child attributes
day
week
month
year
Successful response