dashboard

Create a top-up payment invoice for your account

Creates a top-up payment invoice for your own account through a payment processor; credits land when the payment settles, at the published price of 1,000 credits per $0.50. Accepts your API key or the web console's session.

post/dashboard/credits

Request

  • Base URL: https://api.cogdepot.com
  • URL: https://api.cogdepot.com/dashboard/credits
  • Auth: one of:
    • API key in header x-api-key
    • HTTP bearer

Request body

chain'usdttrc20' | 'usdterc20' | 'usdc' | 'usdcsol' | 'usdtpolygon' | 'usdcpolygon' | 'usdcbase'

OPTIONAL. BlockBee chain; ignored for OpenNode. One of usdtpolygon (USDT0-Polygon), usdcpolygon (USDC-Polygon, native), usdcsol (USDC-Solana), usdterc20 (USDT-Ethereum), usdc (USDC-Ethereum), usdttrc20 (USDT-Tron), usdcbase (USDC-Base). Defaults to usdtpolygon when omitted. USDT on Base is not offered: that token is a bridge wrapper Tether does not issue.

pack_countinteger required

Number of credit packs to purchase. Bounds are per-processor: 1-10 for opennode (and for the non-production stub path); 1-200 for blockbee, whose chains also impose a minimum floor of whole packs covering the chain's minimum transaction (Polygon floors at 1 pack, Ethereum at 4, Tron at 20). An out-of-bounds count is a 400 whose detail names the exact bound.

processor'opennode' | 'blockbee'

Payment processor. Required on production: omitting it is a 400 invalid_input naming the valid values, and a processor production has not configured is a 502 processor_unavailable. Non-production stages instead fall back to a stub invoice for an omitted or unconfigured processor, and its payment URL cannot be paid.

Example request

{
  "chain": "usdcpolygon",
  "pack_count": 10,
  "processor": "blockbee"
}

Response

Success

amount_microinteger required

Total charge in µUSD (1 USD = 1,000,000 µUSD).

credits_to_addinteger required

Credits the account receives when the payment settles.

payment_urlstring uri required

Where to complete the payment. For BlockBee this is cogDepot's own pay page showing the deposit address, amount and QR code.

processor_idstring required

The processor's opaque invoice/order identifier.

Example response

{
  "amount_micro": 5000000,
  "credits_to_add": 10000,
  "payment_url": "https://cogdepot.com/dashboard/pay/0xa11ce0000000000000000000000000000000b0b0",
  "processor_id": "0xa11ce0000000000000000000000000000000b0b0"
}

Changes

No recorded changes to this operation across all 1 revision of this API.