Important: Save referencefrom the create response. Use it for retrieve, cancel, and webhook correlation.
curl --location '/api/v1/subscriptions' \
--header 'Accept: application/json' \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data-raw '{
"email": "Malcolm_Sauer30@gmail.com",
"amount": 868,
"interval": "day",
"reference": "ullamco elit est reprehenderit",
"country_code": "SL",
"callback_url": "https://trained-dusk.org/",
"ip_address": "5af4:6e40:efdc:3789:be1a:e9eb:24dc:d8cd",
"metadata": {
"order_id": 82
},
"idempotency_key": "ullamco commodo",
}'{
"status": true,
"message": "Subscription created",
"data": {
"authorization_url": "http://127.0.0.1:8000/subscriptions/checkout/JuLTmNHD3Q6swch",
"reference": "SUB-01KY2CFJWSJZNCZMTDDFF0KNE4"
}
}