Subscriptions
Cancel subscription
Used to cancel a subscription.
POST
/
admin
/
v1
/
subscriptions
/
{subscriptionId}
/
cancel
Copy
curl --request POST \
--url https://api.juo.io/admin/v1/subscriptions/{subscriptionId}/cancel \
--header 'Content-Type: application/json' \
--header 'X-Juo-Admin-Api-Key: <api-key>' \
--data '{
"cancellationReason": "<string>",
"notifyCustomer": true
}'
Copy
{
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"resource": "subscription",
"serial": "<string>",
"status": "active",
"createdAt": "2023-11-07T05:31:56Z",
"updatedAt": "2023-11-07T05:31:56Z",
"canceledAt": null,
"customer": "<string>",
"nextBillingDate": null,
"currentCycle": 1,
"items": [
{
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"resource": "subscription-item",
"title": "<string>",
"subtitle": null,
"quantity": 2,
"totalPrice": 1,
"variant": "<string>",
"recurringCycleLimit": null
}
],
"discounts": [
{
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"resource": "subscription-discount",
"title": null,
"target": {
"type": "shipping"
},
"value": {
"amount": 123,
"type": "fixed-amount",
"appliesOnEachItem": true
},
"recurringCycleLimit": null
}
],
"paymentMethod": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"currencyCode": "<string>",
"deliveryAddress": null,
"deliveryMethod": null,
"deliveryPrice": 1
}
Authorizations
Path Parameters
The subscription identifier
Body
application/json
Response
200 - application/json
Default Response
The response is of type object
.
Copy
curl --request POST \
--url https://api.juo.io/admin/v1/subscriptions/{subscriptionId}/cancel \
--header 'Content-Type: application/json' \
--header 'X-Juo-Admin-Api-Key: <api-key>' \
--data '{
"cancellationReason": "<string>",
"notifyCustomer": true
}'
Copy
{
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"resource": "subscription",
"serial": "<string>",
"status": "active",
"createdAt": "2023-11-07T05:31:56Z",
"updatedAt": "2023-11-07T05:31:56Z",
"canceledAt": null,
"customer": "<string>",
"nextBillingDate": null,
"currentCycle": 1,
"items": [
{
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"resource": "subscription-item",
"title": "<string>",
"subtitle": null,
"quantity": 2,
"totalPrice": 1,
"variant": "<string>",
"recurringCycleLimit": null
}
],
"discounts": [
{
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"resource": "subscription-discount",
"title": null,
"target": {
"type": "shipping"
},
"value": {
"amount": 123,
"type": "fixed-amount",
"appliesOnEachItem": true
},
"recurringCycleLimit": null
}
],
"paymentMethod": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"currencyCode": "<string>",
"deliveryAddress": null,
"deliveryMethod": null,
"deliveryPrice": 1
}
Assistant
Responses are generated using AI and may contain mistakes.