Skip to main content
POST
/
v1
/
subscriptions
/
{id}
/
cancel
Cancel subscription
curl --request POST \
  --url https://api-global.fastpaybrasil.com/v1/subscriptions/{id}/cancel \
  --header 'Authorization: Basic <encoded-value>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "reason": "Customer requested cancellation"
}
'
{
  "id": "2RhQg9M7ZCg3X3nMb9W1kX8Q",
  "status": "cancelled",
  "cancellationType": "regret",
  "refunded": true,
  "refundId": "2RhQg9M7ZCg3X3nMb9W1kX8Q",
  "accessRevokedAt": "2024-01-16T10:30:00.000Z"
}

Authorizations

Authorization
string
header
required

HTTP Basic authentication. Use your secret key as the username and an empty string as password. The API key should be base64 encoded in the format 'username:' when sending the Authorization header.

Path Parameters

id
string
required

Unique subscription identifier

Body

application/json
reason
string

Cancellation reason (max 500 characters)

Maximum string length: 500
Example:

"Customer requested cancellation"

Response

Subscription successfully cancelled

id
string

Subscription ID

Example:

"2RhQg9M7ZCg3X3nMb9W1kX8Q"

status
enum<string>

Subscription status

Available options:
cancelled
Example:

"cancelled"

cancellationType
enum<string>

Type of cancellation

Available options:
regret
Example:

"regret"

refunded
boolean

Whether the subscription was refunded

Example:

true

refundId
string | null

Refund ID

Example:

"2RhQg9M7ZCg3X3nMb9W1kX8Q"

accessRevokedAt
string<date-time>

When access was revoked

Example:

"2024-01-16T10:30:00.000Z"