Cancel payway-provisioned subscription
/subscription_system/cancel_payway_provisioned_subscription
Target audience: Developers
Release version: 4.1.6
Cancel payway provisioned subscription¶
Introduction¶
This endpoint cancelling a single user product by id. It will put the user product in the cancelled state, which means it will be deactivated upon next renewal date.
Prerequisites and Constraints¶
- The user product must be controlled by Payway (provision_service == tulo)
- The package of the user product is configured to allow the user to cancel it. This is administered in PAP package administration.
- The user product must be recurring (subscription_type != limited)
URI¶
Environment | URI |
---|---|
Stage | https://payway-api.stage.adeprimo.se/external/api/v1/subscription_system/cancel_payway_provisioned_subscription |
Production | https://backend.worldoftulo.com/external/api/v1/subscription_system/cancel_payway_provisioned_subscription |
Requirements¶
Identity | Scope |
---|---|
No | /external/subscription_system/w |
Parameters¶
Field | Required | Description |
---|---|---|
account_id | Required | id of the customer account |
user_product_id | Required | id of the user product to cancel |
cancellation_reason_id | Optional | id of the cancellation reason to supply. Defaults to default cancellation reason if omitted. |
credit_invoice_if_sent | Optional | True/false value deciding whether any outstanding invoices belonging to the subscription should be automatically credited. Defaults to false if omitted. |
Curl Example¶
curl --request PUT \
--url https://payway-api.stage.adeprimo.se/external/api/v1/subscription_system/cancel_payway_provisioned_subscription \
--header 'accept: application/json' \
--header 'authorization: Bearer token' \
--header 'content-type: application/json' \
--data '{
"account_id": "50f3ac249f6aef294d000007"
"user_product_id": "50f3ac249f6aef294d000007"
"cancellation_reason_id": "24f26283220c48af88ebf2a8"
}'
Response¶
Field | Description |
---|---|
i d | id of the cancelled user product |
Example Response¶
HTTP 200
{
"id": "50f3ac249f6aef294d000007"
}
Errors¶
This API uses the common error conventions of the Payway API