curl --request POST \
--url https://api.validator.blubash.io/v1/topups \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"amount": "1000.00"
}
'const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({amount: '1000.00'})
};
fetch('https://api.validator.blubash.io/v1/topups', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://api.validator.blubash.io/v1/topups"
payload = { "amount": "1000.00" }
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text){
"amount": "1000.0000",
"checkout_url": "https://checkout.example.com/c/pay/abc123",
"expires_at": "2026-12-01T15:00:00.000Z",
"id": "top_01JF3V8K0M2P4R6T8W0Y2A4C6E",
"status": "pending"
}Criar uma recarga
Cria uma recarga pending e devolve o checkout_url, a página onde o pagamento é feito (válida por 1 hora). Criar a recarga não muda o saldo: o crédito entra quando o pagamento é confirmado, e você recebe o evento topup.succeeded. Liberada para workspace suspenso, para que uma dívida possa ser paga.
Escopo exigido: billing. Liberada para workspace suspenso. Aceita o header opcional Idempotency-Key (veja o guia de idempotência).
curl --request POST \
--url https://api.validator.blubash.io/v1/topups \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"amount": "1000.00"
}
'const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({amount: '1000.00'})
};
fetch('https://api.validator.blubash.io/v1/topups', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://api.validator.blubash.io/v1/topups"
payload = { "amount": "1000.00" }
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text){
"amount": "1000.0000",
"checkout_url": "https://checkout.example.com/c/pay/abc123",
"expires_at": "2026-12-01T15:00:00.000Z",
"id": "top_01JF3V8K0M2P4R6T8W0Y2A4C6E",
"status": "pending"
}Authorizations
Headers
Chave sua, de 1 a 255 caracteres A-Z a-z 0-9 _ - (um UUID serve). Repetir a mesma chave com o mesmo corpo em até 24 h devolve a mesma resposta (header Idempotent-Replayed: true) sem repetir a operação nem cobrar de novo. Só respostas de sucesso ficam guardadas: depois de um erro, a mesma chave executa de novo.
255^[A-Za-z0-9_-]{1,255}$"7f1c9a52-3d4e-4b8a-9c21-5e6f7a8b9c0d"
Body
Response
Recarga criada; abra o checkout_url para pagar.