Assinar ou mudar plano
curl --request POST \
--url https://api.notifique.dev/v1/platform/workspaces/{id}/subscription \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"tierIndex": 1,
"billingType": "PIX",
"cpfCnpj": "string",
"mobilePhone": "5511999999999",
"paymentMethodId": "clxx...",
"couponCode": "string"
}
'const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
tierIndex: 1,
billingType: 'PIX',
cpfCnpj: 'string',
mobilePhone: '5511999999999',
paymentMethodId: 'clxx...',
couponCode: 'string'
})
};
fetch('https://api.notifique.dev/v1/platform/workspaces/{id}/subscription', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://api.notifique.dev/v1/platform/workspaces/{id}/subscription"
payload = {
"tierIndex": 1,
"billingType": "PIX",
"cpfCnpj": "string",
"mobilePhone": "5511999999999",
"paymentMethodId": "clxx...",
"couponCode": "string"
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.notifique.dev/v1/platform/workspaces/{id}/subscription"
payload := strings.NewReader("{\n \"tierIndex\": 1,\n \"billingType\": \"PIX\",\n \"cpfCnpj\": \"string\",\n \"mobilePhone\": \"5511999999999\",\n \"paymentMethodId\": \"clxx...\",\n \"couponCode\": \"string\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}{
"success": true,
"data": {
"tierIndex": 1,
"status": "ACTIVE",
"billingType": "CREDIT_CARD",
"paymentMethodId": "pm_01H..."
}
}Billing
Assinar ou mudar plano
Cria ou altera assinatura. tierIndex: 0=Free, 1=Basic, 2=Pro, 3=Business. Com cartão salvo use paymentMethodId; com PIX a resposta pode incluir QR/copia-e-cola.
POST
/
v1
/
platform
/
workspaces
/
{id}
/
subscription
Assinar ou mudar plano
curl --request POST \
--url https://api.notifique.dev/v1/platform/workspaces/{id}/subscription \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"tierIndex": 1,
"billingType": "PIX",
"cpfCnpj": "string",
"mobilePhone": "5511999999999",
"paymentMethodId": "clxx...",
"couponCode": "string"
}
'const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
tierIndex: 1,
billingType: 'PIX',
cpfCnpj: 'string',
mobilePhone: '5511999999999',
paymentMethodId: 'clxx...',
couponCode: 'string'
})
};
fetch('https://api.notifique.dev/v1/platform/workspaces/{id}/subscription', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://api.notifique.dev/v1/platform/workspaces/{id}/subscription"
payload = {
"tierIndex": 1,
"billingType": "PIX",
"cpfCnpj": "string",
"mobilePhone": "5511999999999",
"paymentMethodId": "clxx...",
"couponCode": "string"
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.notifique.dev/v1/platform/workspaces/{id}/subscription"
payload := strings.NewReader("{\n \"tierIndex\": 1,\n \"billingType\": \"PIX\",\n \"cpfCnpj\": \"string\",\n \"mobilePhone\": \"5511999999999\",\n \"paymentMethodId\": \"clxx...\",\n \"couponCode\": \"string\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}{
"success": true,
"data": {
"tierIndex": 1,
"status": "ACTIVE",
"billingType": "CREDIT_CARD",
"paymentMethodId": "pm_01H..."
}
}Autorizações
ntfPlatformBearerAuthntfPlatformApiKeyHeader
API key (sk_live_...) ou sessionToken de login.
Parâmetros de caminho
Corpo
application/json
Índice do tier em PRICING_TIERS (0–10). Índice 0 = BASIC, não Free.
Intervalo obrigatório:
0 <= x <= 10Forma de pagamento.
Opções disponíveis:
PIX, CREDIT_CARD CPF ou CNPJ do titular.
Exemplo:
"5511999999999"
ID de cartão já tokenizado (pm_...). Obrigatório com CREDIT_CARD se não envia dados de cartão novos.
Esta página foi útil?

