Create a Subscription
Prerequisites
Step 1: Create a Product
curl -X POST https://api.ikawaari.com/api/v1/merchant/products \
-H "Authorization: Bearer ik_test_your_key" \
-H "Content-Type: application/json" \
-d '{ "name": "Premium Plan", "description": "Full access to all features" }'
Step 2: Prepare billing configuration
The /api/v1/prices family is not currently exposed. Use the billing fields accepted by /api/v1/billing/subscriptions and check the generated reference before adding a standalone price example.
Step 3: Create the Subscription
curl -X POST https://api.ikawaari.com/api/v1/billing/subscriptions \
-H "Authorization: Bearer ik_test_your_key" \
-H "Content-Type: application/json" \
-d '{
"customer": "cus_abc123",
"items": [{ "price": "price_abc123" }]
}'
With a Free Trial
{
"customer": "cus_abc123",
"items": [{ "price": "price_abc123" }],
"trial_period_days": 14
}