Create subscription
POST {{url}}/{{tenantName}}/{{instanceName}}/payment/subscriptions
This endpoint allows you to create a new subscription for payment within a specific tenant and instance.
Request Body
name
(string): The name of the subscription.billingPeriod
(string): The billing period for the subscription.careMember
(object): An object containing the ID of the care member.id
(string): The ID of the care member.
patient
(object): An object containing the ID of the patient.id
(string): The ID of the patient.
paymentTypeInfo
(object): An object containing the type of payment.paymentType
(string): The type of payment for the subscription.
price
(object): An object containing the amount and currency of the subscription.amount
(number): The amount of the subscription.currency
(string): The currency of the subscription.
startDate
(string): The start date of the subscription.numberOfCycles
(number): The number of billing cycles for the subscription.
Response
Upon successful creation of the subscription, the response will contain the details of the newly created subscription.
Request Body
{"name"=>"Test Cancel Subscription Local", "billingPeriod"=>"MONTHLY", "careMember"=>{"id"=>"087cfe51-f8e5-48e7-8bcc-7ccfa470bfc1"}, "patient"=>{"id"=>"116c667f-2102-4c11-b28d-d71000ca34f2"}, "paymentTypeInfo"=>{"paymentType"=>"AUTO_CHARGE"}, "price"=>{"amount"=>2500, "currency"=>"USD"}, "startDate"=>"2024-08-22T00:00:00.000Z", "numberOfCycles"=>6}