Skip to main content
PATCH
/
v1
/
subscription-plans
/
{id}
/
status
Update plan status
curl --request PATCH \
  --url https://api-global.fastpaybrasil.com/v1/subscription-plans/{id}/status \
  --header 'Authorization: Basic <encoded-value>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "status": "inactive"
}
'
{
  "id": "2RhQg9M7ZCg3X3nMb9W1kX8Q",
  "merchantId": "2RhQg9M7ZCg3X3nMb9W1kX8Q",
  "name": "Plano Premium Mensal",
  "price": 99.9,
  "currency": "BRL",
  "recurrenceType": "monthly",
  "recurrenceInterval": null,
  "endDate": null,
  "buyerMessage": "Bem-vindo ao Plano Premium!",
  "paymentMethods": [
    "credit_card"
  ],
  "imageUrl": "https://storage.example.com/plans/image.png",
  "status": "active",
  "activeSubscriptionsCount": 150,
  "createdAt": "2024-01-15T10:30:00.000Z",
  "updatedAt": "2024-01-15T10: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 plan identifier

Body

application/json
status
enum<string>
required

New plan status

Available options:
active,
inactive
Example:

"inactive"

Response

Status updated or confirmation required

id
string

Unique plan identifier

Example:

"2RhQg9M7ZCg3X3nMb9W1kX8Q"

merchantId
string

Merchant ID

Example:

"2RhQg9M7ZCg3X3nMb9W1kX8Q"

name
string

Plan name

Example:

"Plano Premium Mensal"

price
number

Plan price

Example:

99.9

currency
string

Currency code

Example:

"BRL"

recurrenceType
enum<string>

Recurrence type

Available options:
weekly,
biweekly,
monthly,
custom
Example:

"monthly"

recurrenceInterval
integer | null

Custom recurrence interval in months

Example:

null

endDate
string<date-time> | null

Plan end date

Example:

null

buyerMessage
string | null

Message displayed to buyer

Example:

"Bem-vindo ao Plano Premium!"

paymentMethods
string[]

Accepted payment methods

Example:
["credit_card"]
imageUrl
string | null

Plan image URL

Example:

"https://storage.example.com/plans/image.png"

status
enum<string>

Plan status

Available options:
active,
inactive
Example:

"active"

activeSubscriptionsCount
integer

Number of active subscriptions

Example:

150

createdAt
string<date-time>

Creation timestamp

Example:

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

updatedAt
string<date-time>

Last update timestamp

Example:

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