Credits API

await fetch("https://api.accend.now/v1/customers/cus_123/credits?currency=USDC", {
  headers: { Authorization: `Bearer ${process.env.ACCEND_API_KEY}` }
});

Endpoints

  • GET /v1/customers/{customerId}/credits

GET /v1/customers//credits

Scopes: read Query params:
  • currency enum optional: BRL | USDC (default USDC)
Response 200
{
  "data": {
    "customerId": "cus_abc123",
    "currency": "BRL",
    "balance": "5000",
    "grants": [
      {
        "id": "grant_abc123",
        "amount": "10000",
        "remaining": "5000",
        "source": "purchase",
        "expiresAt": "2025-07-15T00:00:00Z",
        "createdAt": "2025-01-15T10:00:00Z"
      }
    ]
  },
  "error": null,
  "success": true
}
To add credits, create a checkout session with mode: "credits".