Paycose Docs
Subscription
POST/subscriptions/{subscription_id}/cancel

Cancel Subscription

Body — CancelSubscriptionDTO (request.go:367). cancel_at_period_end=true defers cancellation to the cycle boundary; cancellation_details.feedback ∈ customer_service|low_quality|missing_features|other|switched_service|too_complex|too_expensive|unused.

Request

Example

curl -X POST 'https://api.paycose.com/api/v1/app1/platform/wallet/subscriptions/{{subscription_id}}/cancel' \
  -H 'X-Session-Token: {{session_token}}' \
  -H 'X-Country: {{country}}' \
  -d '{
  "cancel_at_period_end": false,
  "cancellation_details": {
    "feedback": "too_expensive",
    "comment": ""
  }
}'

Headers

NameValue
X-Session-Token{{session_token}}
X-Country{{country}}

Body

NameTypeValue
cancel_at_period_endbooleanfalse
cancellation_detailsobject{…}
{
  "cancel_at_period_end": false,
  "cancellation_details": {
    "feedback": "too_expensive",
    "comment": ""
  }
}

Responses

200200 OK

Headers

NameValue
Content-Typeapplication/json

Body

{
  "id": "<string>",
  "object": "<string>",
  "resource": "<string>",
  "created_at": "<RFC3339 timestamp>",
  "errors": [
    {
      "code": "<string>",
      "message": "<string>"
    }
  ],
  "next_action": [
    {
      "type": "<string>",
      "title": "<string>",
      "description": "<string>",
      "i18n_key": "<string>",
      "url": "<string>",
      "client_secret": "<string>",
      "payment_method": "<string>",
      "qr_data": "<string>"
    }
  ]
}
400400 Bad Request

Headers

NameValue
Content-Typeapplication/json

Body

{
  "object": "error",
  "code": "<string>",
  "key": "<string>",
  "i18n_key": "<string>",
  "message": "<string>",
  "request_id": "<string>"
}
500500 Internal Server Error

Headers

NameValue
Content-Typeapplication/json

Body

{
  "object": "error",
  "code": "<string>",
  "key": "<string>",
  "i18n_key": "<string>",
  "message": "<string>",
  "request_id": "<string>"
}

On this page