Skip to main content
Apocor is pay-as-you-go. You maintain a platform credit balance; per-card issuance fees are debited from it. Top up by sending stablecoin to a deposit address tied to your organization.

Overview

cURL
curl -s 'https://sandbox.apocor.ai/v1/billing' \
  -H 'Authorization: Bearer YOUR_TOKEN'
{
  "data": {
    "balanceCents": 250000,
    "currency": "USD",
    "wallets": [{ "id": "wal_1", "chain": "base", "address": "0xabc…", "isPrimary": true }],
    "pricing": { "issuanceFeeCents": 200, "enforced": true }
  }
}
FieldMeaning
balanceCentsCurrent credit balance in cents
pricing.issuanceFeeCentsFee charged per card issued
pricing.enforcedWhether issuance is blocked when underfunded

Adding credit

1

Create a deposit address

cURL
curl -s -X POST 'https://sandbox.apocor.ai/v1/billing/deposit-address' \
  -H 'Authorization: Bearer YOUR_TOKEN' -H 'Content-Type: application/json' \
  -d '{ "amount_cents": 50000 }'
Returns a depositAddress (render it as a QR) and a flowId to track settlement.
2

Send funds

Send the stablecoin amount to the returned address from any wallet.
3

Poll for settlement

cURL
curl -s 'https://sandbox.apocor.ai/v1/billing/flow/FLOW_ID' \
  -H 'Authorization: Bearer YOUR_TOKEN'
Your balance is credited when status becomes COMPLETED.

Insufficient credit

When issuance fees are enforced and your balance is too low, POST /v1/cards returns 402:
{ "error": { "code": "INSUFFICIENT_CREDIT", "message": "Top up your balance to issue cards" } }
Top up and retry — no card is created and no fee is charged when this occurs.