Skip to main content
POST
/
merchant
/
subscription
/
cancel
Cancel Subscription Immediately
curl --request POST \
  --url https://api.unibee.dev/merchant/subscription/cancel \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "invoiceNow": true,
  "productId": 123,
  "prorate": true,
  "reason": "<string>",
  "subscriptionId": "<string>",
  "userId": 123
}
'
{
  "code": 123,
  "data": {},
  "message": "<string>",
  "redirect": "<string>",
  "requestId": "<string>"
}

Authorizations

Authorization
string
header
required

Bearer authentication header of the form Bearer <token>, where <token> is your auth token.

Body

application/json

Cancel subscription immediately, no proration invoice will generate

invoiceNow
boolean<bool>
deprecated

Default false

productId
integer<int64>

default product will use if productId not specified and subscriptionId is blank

prorate
boolean<bool>
deprecated

Prorate Generate Invoice,Default false

reason
string<string>

Reason

subscriptionId
string<string>

SubscriptionId, id of subscription, either SubscriptionId or UserId needed, The only one active subscription of userId will effect

userId
integer<int64>

UserId, either SubscriptionId or UserId needed, The only one active subscription will effect if userId provide instead of subscriptionId

Response

200 - application/json
code
integer<int>
data
object
message
string<string>
redirect
string<string>
requestId
string<string>