Abrir o portal de cobrança
curl --request POST \
--url https://api.validator.blubash.io/v1/billing/portal \
--header 'Authorization: Bearer <token>'const options = {method: 'POST', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api.validator.blubash.io/v1/billing/portal', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://api.validator.blubash.io/v1/billing/portal"
headers = {"Authorization": "Bearer <token>"}
response = requests.post(url, headers=headers)
print(response.text){
"url": "https://billing.example.com/p/session/ghi789"
}Recargas e cobrança
Abrir o portal de cobrança
Devolve o link do portal de cobrança, onde o cliente gerencia cartões e vê recibos. Abra o link logo: ele expira em pouco tempo. Liberada para workspace suspenso. Sem corpo nem query.
Escopo exigido: billing. Liberada para workspace suspenso.
POST
/
v1
/
billing
/
portal
Abrir o portal de cobrança
curl --request POST \
--url https://api.validator.blubash.io/v1/billing/portal \
--header 'Authorization: Bearer <token>'const options = {method: 'POST', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api.validator.blubash.io/v1/billing/portal', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://api.validator.blubash.io/v1/billing/portal"
headers = {"Authorization": "Bearer <token>"}
response = requests.post(url, headers=headers)
print(response.text){
"url": "https://billing.example.com/p/session/ghi789"
}