Recarga de la billetera (tarjeta o Pix) / agregar una tarjeta
Recarga la billetera prepaga o guarda una tarjeta; no se cobra nada hasta que una persona pague. purpose:“wallet_topup” (requiere amount > 0, en la moneda de la cuenta) con method “card” (por defecto) devuelve una url alojada de Stripe; con method “pix” (solo BRL) devuelve orderId y pix { transactionId, copyPaste, qrCode, expiresAt }: el Pix vence en 1 hora. Sigue la orden con GET /v1/billing/topups/{orderId}. purpose:“add_card” devuelve una página alojada para guardar una tarjeta en el workspace, que luego respalda la billetera en cada cobro. Acción a nivel de cuenta: requiere una clave de alcance TENANT (403 NUMBER_SCOPE_NOT_ALLOWED para una clave de número); solo Owner con una clave de cuenta o token OAuth. Los demás campos del cuerpo se ignoran (no se rechazan).
Requiere una clave de alcance tenant: una clave de workspace, o una clave de cuenta con x-workspace-id.
Los errores son bilingües (English | Português) desde 2026-10-29: INVALID_PURPOSE, INVALID_AMOUNT, NO_BILLING_EMAIL (400) y CHECKOUT_FAILED (500) antes eran solo en inglés. Los códigos y status no cambiaron; decide según code.
curl --request POST \
--url https://pilotstatus.com.br/v1/billing/checkout \
--header 'Content-Type: application/json' \
--header 'x-api-key: <api-key>' \
--data '
{
"purpose": "wallet_topup",
"amount": 50,
"successUrl": "https://app.acme.com/billing/ok",
"cancelUrl": "https://app.acme.com/billing",
"method": "pix"
}
'import requests
url = "https://pilotstatus.com.br/v1/billing/checkout"
payload = {
"purpose": "wallet_topup",
"amount": 50,
"successUrl": "https://app.acme.com/billing/ok",
"cancelUrl": "https://app.acme.com/billing",
"method": "pix"
}
headers = {
"x-api-key": "<api-key>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {'x-api-key': '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({
purpose: 'wallet_topup',
amount: 50,
successUrl: 'https://app.acme.com/billing/ok',
cancelUrl: 'https://app.acme.com/billing',
method: 'pix'
})
};
fetch('https://pilotstatus.com.br/v1/billing/checkout', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://pilotstatus.com.br/v1/billing/checkout",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'purpose' => 'wallet_topup',
'amount' => 50,
'successUrl' => 'https://app.acme.com/billing/ok',
'cancelUrl' => 'https://app.acme.com/billing',
'method' => 'pix'
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json",
"x-api-key: <api-key>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://pilotstatus.com.br/v1/billing/checkout"
payload := strings.NewReader("{\n \"purpose\": \"wallet_topup\",\n \"amount\": 50,\n \"successUrl\": \"https://app.acme.com/billing/ok\",\n \"cancelUrl\": \"https://app.acme.com/billing\",\n \"method\": \"pix\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("x-api-key", "<api-key>")
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))
}HttpResponse<String> response = Unirest.post("https://pilotstatus.com.br/v1/billing/checkout")
.header("x-api-key", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"purpose\": \"wallet_topup\",\n \"amount\": 50,\n \"successUrl\": \"https://app.acme.com/billing/ok\",\n \"cancelUrl\": \"https://app.acme.com/billing\",\n \"method\": \"pix\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://pilotstatus.com.br/v1/billing/checkout")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["x-api-key"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"purpose\": \"wallet_topup\",\n \"amount\": 50,\n \"successUrl\": \"https://app.acme.com/billing/ok\",\n \"cancelUrl\": \"https://app.acme.com/billing\",\n \"method\": \"pix\"\n}"
response = http.request(request)
puts response.read_body{
"url": "https://checkout.stripe.com/c/pay/cs_live_...",
"purpose": "wallet_topup",
"method": "card",
"orderId": "cmh2b5m2p0002to8example6r",
"amount": 50,
"currency": "BRL"
}Encabezados
Cuerpo
Solo para wallet_topup. card (por defecto) devuelve una página alojada de Stripe; pix (solo workspaces en BRL, si no 400 PIX_NOT_ELIGIBLE) devuelve en su lugar un código Pix copia y pega y un código QR (data:image/png;base64,…). successUrl/cancelUrl con pix, o method con add_card → 400 FIELD_NOT_APPLICABLE.
card, pix "pix"
Respuesta
Checkout creado
¿Esta página le ayudó?
curl --request POST \
--url https://pilotstatus.com.br/v1/billing/checkout \
--header 'Content-Type: application/json' \
--header 'x-api-key: <api-key>' \
--data '
{
"purpose": "wallet_topup",
"amount": 50,
"successUrl": "https://app.acme.com/billing/ok",
"cancelUrl": "https://app.acme.com/billing",
"method": "pix"
}
'import requests
url = "https://pilotstatus.com.br/v1/billing/checkout"
payload = {
"purpose": "wallet_topup",
"amount": 50,
"successUrl": "https://app.acme.com/billing/ok",
"cancelUrl": "https://app.acme.com/billing",
"method": "pix"
}
headers = {
"x-api-key": "<api-key>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {'x-api-key': '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({
purpose: 'wallet_topup',
amount: 50,
successUrl: 'https://app.acme.com/billing/ok',
cancelUrl: 'https://app.acme.com/billing',
method: 'pix'
})
};
fetch('https://pilotstatus.com.br/v1/billing/checkout', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://pilotstatus.com.br/v1/billing/checkout",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'purpose' => 'wallet_topup',
'amount' => 50,
'successUrl' => 'https://app.acme.com/billing/ok',
'cancelUrl' => 'https://app.acme.com/billing',
'method' => 'pix'
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json",
"x-api-key: <api-key>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://pilotstatus.com.br/v1/billing/checkout"
payload := strings.NewReader("{\n \"purpose\": \"wallet_topup\",\n \"amount\": 50,\n \"successUrl\": \"https://app.acme.com/billing/ok\",\n \"cancelUrl\": \"https://app.acme.com/billing\",\n \"method\": \"pix\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("x-api-key", "<api-key>")
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))
}HttpResponse<String> response = Unirest.post("https://pilotstatus.com.br/v1/billing/checkout")
.header("x-api-key", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"purpose\": \"wallet_topup\",\n \"amount\": 50,\n \"successUrl\": \"https://app.acme.com/billing/ok\",\n \"cancelUrl\": \"https://app.acme.com/billing\",\n \"method\": \"pix\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://pilotstatus.com.br/v1/billing/checkout")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["x-api-key"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"purpose\": \"wallet_topup\",\n \"amount\": 50,\n \"successUrl\": \"https://app.acme.com/billing/ok\",\n \"cancelUrl\": \"https://app.acme.com/billing\",\n \"method\": \"pix\"\n}"
response = http.request(request)
puts response.read_body{
"url": "https://checkout.stripe.com/c/pay/cs_live_...",
"purpose": "wallet_topup",
"method": "card",
"orderId": "cmh2b5m2p0002to8example6r",
"amount": 50,
"currency": "BRL"
}