Create Subscription Plan
POST /subscription-plans
Request
{
"amount_currency": "IDR",
"amount_value": 1000.0,
"code": "my-weekly-subscription",
"name": "My Weekly-subscription",
"free_charge_frequency": 1,
"recurrence" :{
"type": "weekly",
"frequency": 5,
}
}Response Subscription Plan Object
{
"id": "sbp_sg189b9a705040000",
'created_by": "par_sgksuegribw000",
'created_at": 1691036883,
"amount_currency": "IDR",
"amount_value": 1000.0,
"code": "my-weekly-subscription",
"name": "My Weekly Subscription",
"free_charge_frequency": 1,
"recurrence" :{
"type": "weekly"
"frequency": 5
}
}Request Parameters
Parameter name
Type
Required
Description
amount_currency
String
Yes
The currency of the amount charge via subscription plans.
amount_value
Number
Yes
The amount value charge via subscription plan.
code
String
Yes
The subscription plan code.
name
String
Yes
The subscription plan name.
free_charge_frequency
Number
Optional
The duration for which no charge shall occur or “free trial” depends on the recurrence object field.
recurrence
Object
Yes
Details of the subscription recurrence
recurrence.type
String
Yes
The recurrence of the charges in the subscription plan includes weekly, monthly, quarterly, and yearly.
recurrence.frequency
Number
Optional
The lifetime of the subscription if not specified. The subscription will continue indefinitely until canceled.
Last updated
Was this helpful?