Create a subscription fee
Attaches recurring-payment terms to a product (and optionally a specific variant).
POST
/subscription_feesAuthorization
AuthorizationBearer token (JWT) · headerrequiredRequest body
requiredapplication/jsonproduct_idintegerrequiredvariant_idintegerpayment_intervalstringrequiredAllowed:
1_week1_month3_months6_months12_monthsrenewal_feeintegerIn cents
setup_feeintegerIn cents
number_of_paymentsintegerpayment_dayintegerby_percentagebooleanallow_non_recurring_paymentbooleanmin_days_for_cancellationintegerallow_changing_daybooleanextend_on_reenablebooleanon_first_renewalstringResponses
201Subscription fee created
_linksHalLinksidintegerseller_idintegerproduct_idintegervariant_idintegerpayment_intervalstringAllowed:
1_week1_month3_months6_months12_monthsrenewal_feeintegerIn cents
renewal_fee_priceintegerIn cents
setup_feeintegerIn cents
number_of_paymentsintegerpayment_dayintegerby_percentagebooleanallow_non_recurring_paymentbooleanmin_days_for_cancellationintegerallow_changing_daybooleanextend_on_reenablebooleanon_first_renewalstringcreated_onstring<date-time>updated_onstring<date-time>422Validation error
Request
curl -X POST "https://api.onbolder.com/v2/subscription_fees" \
-H "Authorization: Bearer YOUR_TOKEN" \
-H "Content-Type: application/json" \
-d '{
"product_id": 101,
"payment_interval": "1_month",
"renewal_fee": 2999
}'const response = await fetch("https://api.onbolder.com/v2/subscription_fees", {
method: "POST",
headers: {
"Authorization": "Bearer YOUR_TOKEN",
"Content-Type": "application/json"
},
body: JSON.stringify({
"product_id": 101,
"payment_interval": "1_month",
"renewal_fee": 2999
})
});import requests
response = requests.post(
"https://api.onbolder.com/v2/subscription_fees",
headers={
"Authorization": "Bearer YOUR_TOKEN",
"Content-Type": "application/json"
},
json={
"product_id": 101,
"payment_interval": "1_month",
"renewal_fee": 2999
},
)Response
{
"_links": {
"property1": {
"href": "string",
"templated": true,
"method": "get",
"title": "string",
"type": "string"
},
"property2": {
"href": "string",
"templated": true,
"method": "get",
"title": "string",
"type": "string"
}
},
"id": 0,
"seller_id": 0,
"product_id": 0,
"variant_id": 0,
"payment_interval": "1_week",
"renewal_fee": 0,
"renewal_fee_price": 0,
"setup_fee": 0,
"number_of_payments": 0,
"payment_day": 0,
"by_percentage": true,
"allow_non_recurring_payment": true,
"min_days_for_cancellation": 0,
"allow_changing_day": true,
"extend_on_reenable": true,
"on_first_renewal": "string",
"created_on": "2019-08-24T14:15:22Z",
"updated_on": "2019-08-24T14:15:22Z"
}Validation error