Update a subscription fee
PUT
/subscription_fees/{id}Authorization
AuthorizationBearer token (JWT) · headerrequiredPath parameters
idintegerrequiredRequest body
requiredapplication/jsonpayment_intervalstringAllowed:
1_week1_month3_months6_months12_monthsrenewal_feeintegersetup_feeintegernumber_of_paymentsintegerpayment_dayintegerupdate_purchases_feesbooleanAlso apply the new fee terms to existing active purchases
notify_purchasesbooleanResponses
200Subscription fee updated
_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 PUT "https://api.onbolder.com/v2/subscription_fees/0" \
-H "Authorization: Bearer YOUR_TOKEN" \
-H "Content-Type: application/json" \
-d '{
"payment_interval": "1_week",
"renewal_fee": 0,
"setup_fee": 0,
"number_of_payments": 0,
"payment_day": 0,
"update_purchases_fees": true,
"notify_purchases": true
}'const response = await fetch("https://api.onbolder.com/v2/subscription_fees/0", {
method: "PUT",
headers: {
"Authorization": "Bearer YOUR_TOKEN",
"Content-Type": "application/json"
},
body: JSON.stringify({
"payment_interval": "1_week",
"renewal_fee": 0,
"setup_fee": 0,
"number_of_payments": 0,
"payment_day": 0,
"update_purchases_fees": true,
"notify_purchases": true
})
});import requests
response = requests.put(
"https://api.onbolder.com/v2/subscription_fees/0",
headers={
"Authorization": "Bearer YOUR_TOKEN",
"Content-Type": "application/json"
},
json={
"payment_interval": "1_week",
"renewal_fee": 0,
"setup_fee": 0,
"number_of_payments": 0,
"payment_day": 0,
"update_purchases_fees": True,
"notify_purchases": True
},
)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