Payments

Exemplos curl por método via POST /v1/transparents/create. Valores em centavos BRL. Auth: Bearer sk_test_….

Pix

curl -s https://api.aporta.cc/v1/transparents/create \
  -H "Authorization: Bearer sk_test_…" \
  -H "Content-Type: application/json" \
  -d '{
    "method": "PIX",
    "amount": 2500,
    "customerId": "cust_…",
    "expiresIn": 3600,
    "ensureSameTaxId": true
  }'
  • Resposta: brCode, brCodeBase64, expiresAt
  • ensureSameTaxId — DX/parity; exige customer com taxId (mock sandbox não rejeita)

Boleto

curl -s https://api.aporta.cc/v1/transparents/create \
  -H "Authorization: Bearer sk_test_…" \
  -H "Content-Type: application/json" \
  -d '{
    "method": "BOLETO",
    "amount": 9900,
    "customer": {
      "name": "Ana Silva",
      "email": "ana@exemplo.com",
      "taxId": "529.982.247-25"
    },
    "dueDate": "2026-10-15",
    "interest": { "value": 100 },
    "fine": { "value": 200, "type": "FIXED" }
  }'
  • Resposta: barCode, dueDate, opcional Pix no boleto
  • fine.type: PERCENTAGE | FIXED

Card

curl -s https://api.aporta.cc/v1/transparents/create \
  -H "Authorization: Bearer sk_test_…" \
  -H "Content-Type: application/json" \
  -d '{
    "method": "CARD",
    "amount": 14990,
    "customerId": "cust_…",
    "installments": 3
  }'
  • installments: 1–12
  • Sandbox: adapter mock — sem PCI real; use simulate-payment para PAID

Crypto

curl -s https://api.aporta.cc/v1/transparents/create \
  -H "Authorization: Bearer sk_test_…" \
  -H "Content-Type: application/json" \
  -d '{
    "method": "CRYPTO",
    "amount": 5000,
    "customerId": "cust_…",
    "asset": "USDT"
  }'
  • Também: POST /v1/crypto/receive/create e /v1/crypto/send/create
  • Sandbox: POST /v1/crypto/receive/simulate-payment → crypto.receive.completed

Sandbox tip

Hosted equivalente: POST /v1/checkouts/create com methods: ["PIX"] etc., depois /checkouts/simulate-payment. Veja checkouts.