curl -X POST "https://api-sandbox.paywithsoap.com/api/v1/subscriptions/sub_7Hn2Kq9Wx4Lm8Pz3Rt6Vb1Ys5JdCfEaG/cancel" \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{"reason": "customer asked to cancel"}'
{
"error": "Subscription not found.",
"hint": "Please verify the subscription id is correct. \n subscription_id: sub_7Hn2Kq9Wx4Lm8Pz3Rt6Vb1Ys5JdCfEaG"
}
Cancel a Subscription
Cancels a subscription so it never renews again. A subscription with paid time left stays active until ends_at, the end of the period the customer paid for, and reads canceled after it. One with no paid period left (never paid, past due, or first paid while renewals were off for your account) ends now; if the customer hasn’t paid yet, their open checkout charges nothing. A renewal waiting to be charged is voided; one already being charged finishes, and if it is paid the customer keeps that period. Canceling a paused subscription ends the pause. Canceling again changes nothing and keeps the first ends_at. Sends the subscription.canceled webhook: always for a subscription whose first payment began renewals, otherwise only if you turned that event on.
curl -X POST "https://api-sandbox.paywithsoap.com/api/v1/subscriptions/sub_7Hn2Kq9Wx4Lm8Pz3Rt6Vb1Ys5JdCfEaG/cancel" \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{"reason": "customer asked to cancel"}'
{
"error": "Subscription not found.",
"hint": "Please verify the subscription id is correct. \n subscription_id: sub_7Hn2Kq9Wx4Lm8Pz3Rt6Vb1Ys5JdCfEaG"
}
curl -X POST "https://api-sandbox.paywithsoap.com/api/v1/subscriptions/sub_7Hn2Kq9Wx4Lm8Pz3Rt6Vb1Ys5JdCfEaG/cancel" \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{"reason": "customer asked to cancel"}'
{
"error": "Subscription not found.",
"hint": "Please verify the subscription id is correct. \n subscription_id: sub_7Hn2Kq9Wx4Lm8Pz3Rt6Vb1Ys5JdCfEaG"
}
Authorizations
Path Parameters
Body
Response
The subscription, with canceled_at and ends_at set and next_billing_at null.
A subscription as the merchant API returns it.
Derived from the billing dates each time you read it. incomplete until the first payment succeeds. active while billing runs, when the first payment went through while renewals were off for your account, and for a subscription canceled for the end of its paid period, until ends_at. past_due after a renewal failed, or while a declined renewal waits for its retry. paused while the merchant has paused billing: nothing renews until it is resumed. canceled once a canceled subscription's ends_at has passed.
incomplete, active, past_due, paused, canceled 
