API reference · Credits
Claim a deposit by transaction hash
POST/api/credits/depositSigned in session
Live, and the only way to fund an account: there are no card payments. An accepted stablecoin on one of the accepted networks, verified against the receipt over RPC and credited once; with no chain named, every accepted network is asked in turn. A repeat claim of a transaction already credited to the caller answers 200 with alreadyCredited and its receipt numbers, and credits nothing. Still confirming answers 409 unconfirmed with retryAfterS. Every other refusal is recorded for the operator. The transfer must have gone to the deposit address, from the signed in wallet, in a token contract listed for that network. GET /api/credits carries the address, the networks and the contracts. Disabled with 503 unconfigured until the operator sets ANTIMATTER_DEPOSIT_ADDRESS. With chain "solana", txHash is the transaction signature and the claim carries the sender's public key and an Ed25519 signature by that key over the claim message, which the bridge produces with the sender's wallet; the Solana address comes from ANTIMATTER_DEPOSIT_ADDRESS_SOLANA. While ANTIMATTER_PAY_WITH is anti, the one accepted token is $ANTI on Robinhood Chain, credited in dollars at the credit price when it is claimed: the lower of the newest price sample (fresh) and the median of the window's samples. With no price it answers 503 pricing_unavailable with retryAfterS, credits nothing and the transaction stays claimable; a claim over the cap answers 400 too_large and is credited not at all; a stablecoin, Solana or x402 payment is refused by name (400 not_accepted on Solana).
Request body
application/json, required
| Field | Type | What it is |
|---|---|---|
| txHashrequired | string | 0x plus 64 hex characters, or a base58 signature on Solana. |
| chain | string or null | Network key, chain id, or solana. Unnamed, every accepted network is asked. |
| orgId | integer or null | Fund an organization instead of yourself. |
| sender | string | Solana only: the sender's public key, base58. |
| proof | string | Solana only: the sender's Ed25519 signature over the claim message, base58. |
Example
{
"txHash": "string"
}Answer 200
Credited, or already credited to the caller (alreadyCredited, with the receipt numbers).
| Field | Type | What it is |
|---|---|---|
| ok | boolean | |
| creditedMicros | integer | |
| chain | string | |
| chainId | integer | |
| tokens | array of object | |
| tokens[] | string | |
| tokens[] | integer | |
| balanceMicros | integer | |
| alreadyCredited | boolean | |
| receiptNumbers | array of string |
Errors
- 400A deposit that could not be credited. The type is one of unconfigured, unknown_chain, wrong_chain, invalid_hash, not_found, reverted, unconfirmed, no_transfer, wrong_sender, dust, already_claimed, too_large, rpc_error, bad_proof, pricing_unavailable ($ANTI only: no credit price right now, nothing credited, retry later), not_accepted (a stablecoin door while $ANTI is the one way in).
- 403A deposit that could not be credited. The type is one of unconfigured, unknown_chain, wrong_chain, invalid_hash, not_found, reverted, unconfirmed, no_transfer, wrong_sender, dust, already_claimed, too_large, rpc_error, bad_proof, pricing_unavailable ($ANTI only: no credit price right now, nothing credited, retry later), not_accepted (a stablecoin door while $ANTI is the one way in).
- 404A deposit that could not be credited. The type is one of unconfigured, unknown_chain, wrong_chain, invalid_hash, not_found, reverted, unconfirmed, no_transfer, wrong_sender, dust, already_claimed, too_large, rpc_error, bad_proof, pricing_unavailable ($ANTI only: no credit price right now, nothing credited, retry later), not_accepted (a stablecoin door while $ANTI is the one way in).
- 409A deposit that could not be credited. The type is one of unconfigured, unknown_chain, wrong_chain, invalid_hash, not_found, reverted, unconfirmed, no_transfer, wrong_sender, dust, already_claimed, too_large, rpc_error, bad_proof, pricing_unavailable ($ANTI only: no credit price right now, nothing credited, retry later), not_accepted (a stablecoin door while $ANTI is the one way in).
- 502A deposit that could not be credited. The type is one of unconfigured, unknown_chain, wrong_chain, invalid_hash, not_found, reverted, unconfirmed, no_transfer, wrong_sender, dust, already_claimed, too_large, rpc_error, bad_proof, pricing_unavailable ($ANTI only: no credit price right now, nothing credited, retry later), not_accepted (a stablecoin door while $ANTI is the one way in).
- 503A deposit that could not be credited. The type is one of unconfigured, unknown_chain, wrong_chain, invalid_hash, not_found, reverted, unconfirmed, no_transfer, wrong_sender, dust, already_claimed, too_large, rpc_error, bad_proof, pricing_unavailable ($ANTI only: no credit price right now, nothing credited, retry later), not_accepted (a stablecoin door while $ANTI is the one way in).
Every error answers in one shape, with its type, code and the field it names. The whole list is in the docs' Errors section.