VENLY_MANAGED) and self-custody (SELF_CUSTODY) companies differ. The difference is one extra step — self-custody wallets need a one-time permit before they can be charged.
Base URL (staging):
https://api-staging.venlyfinance.com/v1
Auth: OAuth2 Bearer token in the Authorization header. Tokens expire after 5 minutes — see the Authentication guide.Dedicated card-management endpoints (issue, freeze, list transactions) are on the roadmap. The authorization → settlement plumbing this guide uses is live today on the Finance API.
Prerequisites
A client provisioned for the card program
Your
client_id must carry the finance-api-card role plus manage:payment-requests (and manage:all-payment-requests if you authorize by card-provider reference). Your Venly contact enables these.An HTTP client and a UUID generator
Examples use
curl. Money-moving calls need an idempotencyKey (UUID v4) — uuidgen, [guid]::NewGuid(), or crypto.randomUUID().The flow
Venly-managed accounts skip step 4 entirely — their wallets are permitted automatically.Step 1 — Authenticate
Response
Step 2 — Create the cardholder account
The account represents the cardholder; its wallet funds the card. Optionally attach acardProviderReference so authorizations arriving by card-provider reference resolve to this account.
The only structural difference between company types is the wallet address:
- Venly-managed — Venly creates and holds the wallet. Omit
address. - Self-custody — the cardholder controls the wallet. Send their
address(required).
Response (201)
Step 3 — Verify the account
A new account iskycStatus: VERIFICATION_PENDING. A Venly admin reviews and verifies it — there’s no API call to trigger this. Poll until it flips:
Response (200)
VERIFIED, authorizations fail with account-not-active (“KYC status must be VERIFIED”). See Account verification.
Step 4 — Fund the wallet
The account wallet must hold the stablecoin the card spends. Read its address and balance:Response (200)
- Venly-managed — fund the returned Venly address with the stablecoin. Gas is covered by Venly’s orchestration wallet; the account wallet only needs the token.
- Self-custody — the cardholder funds their own
addresswith the stablecoin.
Step 5 — Activate the wallet (self-custody only)
Venly-managed wallets are permitted automatically — skip to Step 6.
PENDING. Before it can be charged, the owner signs a one-time permit for every supported asset on the wallet, and the wallet becomes ACTIVE only once all of them are CONFIRMED. Until then authorizations fail with account-wallet-not-active.
Get the messages to sign
GET /accounts/{accountId}/wallets/{walletId}/permits returns, per asset, a supportedAssetId and an EIP-712 typedData object.Sign each with the owner's key
Sign
typedData with the wallet owner key (off-chain, no gas). The signature must recover to the owner or the permit becomes FAILED. Produces v, r, s.Submit each signature
POST .../permits with the supportedAssetId and signature → HTTP 200 with result.status.Step 6 — Create the authorization
With the accountVERIFIED, funded, and (self-custody) ACTIVE, reserve funds. There are two endpoints:
Response
reserved balance. Amounts carry both fiat and crypto — see Payment requests.
The reservation runs on-chain. On fast chains the response is
RESERVED straight away; on others it returns PENDING and flips to RESERVED once the authorization transaction confirms. There’s no GET endpoint — re-send the create with the same idempotencyKey and body to read the latest state, and match on your externalId.Step 7 — Settle or reverse
When the card transaction clears, resolve the hold:- Settle — money moves from escrow to the company’s settlement wallet (
SETTLING→SETTLED). The settle amount can be equal to, below, or above the authorized amount. - Reverse — the full reserved amount returns to the cardholder (
REVERSING→REVERSED). Use it to release a hold you won’t charge.
cardProviderReference instead of the accountId.
Managed vs self-custody at a glance
| Step | Venly-managed (VENLY_MANAGED) | Self-custody (SELF_CUSTODY) |
|---|---|---|
| Create account | No address | address required |
| Wallet custody | Venly holds the key | Cardholder holds the key |
| Funding | Fund the Venly-created address | Cardholder funds their own address |
| Gas | Paid by Venly orchestration | Paid by Venly orchestration |
| Wallet activation | Automatic | Sign a permit for every supported asset |
| Verify KYC | Required | Required |
| Authorize / settle / reverse | Identical | Identical |
Common pitfalls
escrow-wallet-missing on the authorization
escrow-wallet-missing on the authorization
account-wallet-not-active (status PENDING)
account-wallet-not-active (status PENDING)
A self-custody wallet that isn’t
ACTIVE yet. Confirm a permit for every supported asset on the wallet — the wallet only activates once they’re all CONFIRMED. A raw approve() doesn’t count. See Permits & allowances.account-not-active (KYC status must be VERIFIED)
account-not-active (KYC status must be VERIFIED)
The account is still
VERIFICATION_PENDING. A Venly admin must verify it — poll GET /accounts/{id} until kycStatus is VERIFIED.Address is required for SELF_CUSTODY wallet type
Address is required for SELF_CUSTODY wallet type
Self-custody accounts must include the cardholder’s wallet
address on creation. Venly-managed accounts must not.Token expired mid-flow
Token expired mid-flow
Tokens last 5 minutes. Catch
401, refresh, and retry — don’t pre-authenticate every request.Next steps
Payment requests
The full reserve → settle/reverse/adjust lifecycle.
Permits & allowances
Gasless wallet activation for self-custody accounts.
Create a payment request
Endpoint reference, fields, and error codes.
Card Issuance overview
The white-label card program and its roadmap.

