Palbase Payments · API
POST
/payments/subscriptions/{subscription_id}/cancelCancel subscription
Cancels a customer subscription at period end or immediately.
Called by your server, with the project's secret key.
Path
subscription_idstring · requiredSubscription UUID.Request body
at_period_endboolean · optionalCancel at the end of the current period (default true); false cancels immediately.curl
curl -X POST "https://<your-ref>.palbase.studio/payments/subscriptions/<subscription_id>/cancel" \
-H "apikey: $PALBASE_SECRET_KEY" \
-H "content-type: application/json" \
-d '{"at_period_end":false}'Responses
200OK
defaultStandard Palbase JSON error envelope (`error` and `error_description`).
Operation CancelSubscription of payments's contract.