curl --request POST \
--url https://api.tagada.io/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"
}
}
}{
"message": "<string>",
"code": "<string>",
"issues": [
{
"message": "<string>"
}
]
}subscriptions
Create subscription
Create a new subscription for a customer with specified product and pricing. billingCycleAnchor is a Unix timestamp in milliseconds, as a number or a string of digits, and sets the first billing date; a value below 100000000000 is read as Unix seconds, and a date string is rejected. When omitted the subscription bills immediately. initiatePayment is deprecated and rejected — it was never implemented.
POST
/
api
/
public
/
v1
/
subscriptions
/
create
curl --request POST \
--url https://api.tagada.io/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"
}
}
}{
"message": "<string>",
"code": "<string>",
"issues": [
{
"message": "<string>"
}
]
}Authorizations
Enter your API key as: Bearer your-api-key
Body
application/json
Required range:
x > 0Show child attributes
Show child attributes
Unix timestamp in milliseconds of the first charge, as a number or a string of digits. A value below 100000000000 is read as Unix seconds. Date strings are rejected.
Show child attributes
Show child attributes
Response
Successful response
