curl --request POST \
--url https://api.paygentic.io/v0/subscriptions \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '{
"customerId": "<string>",
"planId": "<string>",
"name": "<string>",
"startedAt": "2023-11-07T05:31:56Z",
"endingAt": "2023-11-07T05:31:56Z"
}'
{
"id": "<string>",
"object": "subscription",
"customerId": "<string>",
"planId": "<string>",
"walletId": "<string>",
"name": "<string>",
"status": "active",
"createdAt": "2023-11-07T05:31:56Z",
"startedAt": "2023-11-07T05:31:56Z",
"endingAt": "2023-11-07T05:31:56Z",
"terminatedAt": "2023-11-07T05:31:56Z"
}
Creates a subscription for a customer. The customer must already exist in the system. Currently this endpoint is only available for Paygentic admins as part of the subscription authorization flow.
curl --request POST \
--url https://api.paygentic.io/v0/subscriptions \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '{
"customerId": "<string>",
"planId": "<string>",
"name": "<string>",
"startedAt": "2023-11-07T05:31:56Z",
"endingAt": "2023-11-07T05:31:56Z"
}'
{
"id": "<string>",
"object": "subscription",
"customerId": "<string>",
"planId": "<string>",
"walletId": "<string>",
"name": "<string>",
"status": "active",
"createdAt": "2023-11-07T05:31:56Z",
"startedAt": "2023-11-07T05:31:56Z",
"endingAt": "2023-11-07T05:31:56Z",
"terminatedAt": "2023-11-07T05:31:56Z"
}
Bearer authentication header of the form Bearer <token>
, where <token>
is your auth token.
Subscription already exists
The response is of type object
.