POST
/api/Subscriptions
const url = 'https://example.com/api/Subscriptions';const options = { method: 'POST', headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'}, body: '{"merchantId":"2489E9AD-2EE2-8E00-8EC9-32D5F69181C0","memberId":"2489E9AD-2EE2-8E00-8EC9-32D5F69181C0","planId":"2489E9AD-2EE2-8E00-8EC9-32D5F69181C0","paymentMethodId":"2489E9AD-2EE2-8E00-8EC9-32D5F69181C0","startDate":"2026-04-15T12:00:00Z"}'};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}curl --request POST \ --url https://example.com/api/Subscriptions \ --header 'Authorization: Bearer <token>' \ --header 'Content-Type: application/json' \ --data '{ "merchantId": "2489E9AD-2EE2-8E00-8EC9-32D5F69181C0", "memberId": "2489E9AD-2EE2-8E00-8EC9-32D5F69181C0", "planId": "2489E9AD-2EE2-8E00-8EC9-32D5F69181C0", "paymentMethodId": "2489E9AD-2EE2-8E00-8EC9-32D5F69181C0", "startDate": "2026-04-15T12:00:00Z" }'Enrols a member in a plan and creates the recurring subscription at the payment gateway. If the plan has trial days, the subscription starts in Trial status. Otherwise it starts Active.
POST /api/subscriptions
{
"merchantId": "...",
"memberId": "...",
"planId": "...",
"paymentMethodId": "..."
}Authorizations
Section titled “Authorizations ”Request Body
Section titled “Request Body ”Subscription creation payload.
object
merchantId
required
string format: uuid
memberId
required
string format: uuid
planId
required
string format: uuid
paymentMethodId
string format: uuid
startDate
string format: date-time
Example generated
{ "merchantId": "2489E9AD-2EE2-8E00-8EC9-32D5F69181C0", "memberId": "2489E9AD-2EE2-8E00-8EC9-32D5F69181C0", "planId": "2489E9AD-2EE2-8E00-8EC9-32D5F69181C0", "paymentMethodId": "2489E9AD-2EE2-8E00-8EC9-32D5F69181C0", "startDate": "2026-04-15T12:00:00Z"}object
merchantId
required
string format: uuid
memberId
required
string format: uuid
planId
required
string format: uuid
paymentMethodId
string format: uuid
startDate
string format: date-time
Example generated
{ "merchantId": "2489E9AD-2EE2-8E00-8EC9-32D5F69181C0", "memberId": "2489E9AD-2EE2-8E00-8EC9-32D5F69181C0", "planId": "2489E9AD-2EE2-8E00-8EC9-32D5F69181C0", "paymentMethodId": "2489E9AD-2EE2-8E00-8EC9-32D5F69181C0", "startDate": "2026-04-15T12:00:00Z"}object
merchantId
required
string format: uuid
memberId
required
string format: uuid
planId
required
string format: uuid
paymentMethodId
string format: uuid
startDate
string format: date-time
Example generated
{ "merchantId": "2489E9AD-2EE2-8E00-8EC9-32D5F69181C0", "memberId": "2489E9AD-2EE2-8E00-8EC9-32D5F69181C0", "planId": "2489E9AD-2EE2-8E00-8EC9-32D5F69181C0", "paymentMethodId": "2489E9AD-2EE2-8E00-8EC9-32D5F69181C0", "startDate": "2026-04-15T12:00:00Z"}Responses
Section titled “ Responses ”Subscription created successfully.
Media type application/json
object
id
string format: uuid
merchantId
string format: uuid
memberId
string format: uuid
memberName
string
planId
string format: uuid
planName
string
planFrequency
string
planPrice
number format: double
paymentMethodId
string format: uuid
status
string
startDate
string format: date-time
trialEndsAt
string format: date-time
nextBillingDate
string format: date-time
nextBillingAmount
number format: double
pausedAt
string format: date-time
cancelledAt
string format: date-time
cancellationReason
string
createdAt
string format: date-time
updatedAt
string format: date-time
Example
{ "planFrequency": "OneOff", "status": "Trial"}Validation failed — check the errors object.
Media type application/json
object
type
string
title
string
status
integer format: int32
detail
string
instance
string
key
additional properties
Example generated
{ "type": "example", "title": "example", "status": 1, "detail": "example", "instance": "example"}