Cancel a subscription
Asks the source's endpoint to cancel a subscription, at the end of the paid period unless isImmediate is true, then records the state it answers with like a reported one.
Only a payment source records purchases.
Guide: Payment sources
Errors
| Status | type | code | When |
|---|---|---|---|
| 400 | invalid_request | invalid_subscription | For a state that cannot be recorded. |
| 400 | invalid_request | payment_source_required | For a store. |
| 404 | not_found | payment_provider_not_found | For an unknown provider. |
| 409 | conflict | payment_source_disabled | For a disabled source. |
| 409 | conflict | payment_source_endpoint_not_configured | When the source's endpoint is not configured, does not support the action or refuses it. |
| 409 | conflict | payment_source_endpoint_unsupported | When the source's endpoint is not configured, does not support the action or refuses it. |
| 409 | conflict | payment_source_endpoint_rejected | When the source's endpoint is not configured, does not support the action or refuses it. |
| 503 | unavailable | payment_source_endpoint_unavailable | When it does not answer or answers outside the protocol; the message says why. |
| 503 | unavailable | payment_source_endpoint_invalid_response | When it does not answer or answers outside the protocol; the message says why. |
It can also fail with the errors every operation shares, such as unauthenticated; see Errors.
More in Payment sources
Something wrong or missing on this page? Tell us by email or on Discord.