Skip to main content

Create wallet

Quick Reference

WhatCreate a wallet scoped to a merchant and currency
WhyWallets are the foundation — no wallet, no charges, no payments
Reading Time5 min
DifficultyBeginner
PrerequisitesAuthentication → Entity UUID → Customer ID
POST/api/v1/bank/wallet/Bearer TokenCreate a new wallet

When to use this endpoint

Without a walletWith a wallet
Cannot process any chargesAccept payments via credit card, PIX, Boleto, SPEI, and 8 more methods
No balance trackingReal-time balance per merchant per currency
No settlement containerAutomatic settlement grouping and payout
No API credentials for the merchantOptional auto-generated client_id / client_secret for merchant self-service
Cannot separate funds by currencyIsolated BRL, MXN, CLP, ARS wallets for clean multi-currency accounting

Entity hierarchy


Authentication

Requires Bearer token. See Authentication.

Request body

FieldTypeRequiredDescription
entity_uuidstring (UUID)YesAccount entity identifier — your company's UUID
customer_idstringYesInternal customer ID in your system
currencystringYesISO 4217 currency code: BRL, MXN, CLP, or ARS
namestringYesWallet display name (shown in dashboard and reports)
emailstringYesEmail address associated with this wallet
create_credentialsbooleanYestrue to generate OAuth client_id and client_secret for this wallet
merchant_uuidstringNoAssociate this wallet with an existing merchant. Omit to auto-create

Code examples

curl -s -X POST https://core-manager.a55.tech/api/v1/bank/wallet/ \
-H "Authorization: Bearer $TOKEN" \
-H "Content-Type: application/json" \
-d '{
"entity_uuid": "550e8400-e29b-41d4-a716-446655440000",
"customer_id": "cust_12345",
"currency": "BRL",
"name": "Loja São Paulo — BRL",
"email": "financeiro@loja-sp.com.br",
"create_credentials": true,
"merchant_uuid": "6ba7b810-9dad-11d1-80b4-00c04fd430c8"
}'

Response

Success (200 OK)

When create_credentials: true, the response includes a credentials object with OAuth keys scoped to this wallet.

{
"wallet_uuid": "f47ac10b-58cc-4372-a567-0e02b2c3d479",
"entity_uuid": "550e8400-e29b-41d4-a716-446655440000",
"merchant_uuid": "6ba7b810-9dad-11d1-80b4-00c04fd430c8",
"customer_id": "cust_12345",
"currency": "BRL",
"name": "Loja São Paulo — BRL",
"email": "financeiro@loja-sp.com.br",
"credentials": {
"client_id": "3f8a2b1c-9d4e-5f6a-7b8c-0d1e2f3a4b5c",
"client_secret": "sk_live_a55_7k9m2nP4qR6sT8uV0wX1yZ3",
"grant_type": "client_credentials",
"scopes": [
"wallet:read",
"wallet:write",
"charge:create",
"charge:read"
]
}
}

Response fields

FieldTypeDescription
wallet_uuidstring (UUID)Unique wallet identifier — use this in all charge and balance calls
entity_uuidstring (UUID)Parent entity
merchant_uuidstring (UUID)Associated merchant
customer_idstringYour internal customer ID
currencystringISO 4217 currency code
namestringWallet display name
emailstringWallet email
credentialsobjectPresent only when create_credentials: true
credentials.client_idstringOAuth client ID for Cognito token exchange
credentials.client_secretstringOAuth client secret — store securely, shown only once
credentials.grant_typestringAlways client_credentials
credentials.scopesstring[]Permitted API scopes for this wallet

Error response

{
"error": "validation_error",
"message": "Wallet already exists for this merchant and currency",
"code": "errors.wallet.already_exists"
}
StatusCodeDescriptionResolution
400validation_errorMissing or invalid fieldsCheck required fields and types
401unauthorizedInvalid or expired Bearer tokenRefresh your access token
409errors.wallet.already_existsA wallet for this merchant + currency already existsUse the existing wallet or choose a different currency

Complete example — multi-currency setup

Create wallets for a merchant that operates in Brazil and Mexico:

# BRL wallet
curl -s -X POST https://core-manager.a55.tech/api/v1/bank/wallet/ \
-H "Authorization: Bearer $TOKEN" \
-H "Content-Type: application/json" \
-d '{
"entity_uuid": "550e8400-e29b-41d4-a716-446655440000",
"customer_id": "cust_12345",
"currency": "BRL",
"name": "LatAm Store — BRL",
"email": "finance@latamstore.com",
"create_credentials": true
}'

# MXN wallet (same entity, same customer)
curl -s -X POST https://core-manager.a55.tech/api/v1/bank/wallet/ \
-H "Authorization: Bearer $TOKEN" \
-H "Content-Type: application/json" \
-d '{
"entity_uuid": "550e8400-e29b-41d4-a716-446655440000",
"customer_id": "cust_12345",
"currency": "MXN",
"name": "LatAm Store — MXN",
"email": "finance@latamstore.com",
"create_credentials": false
}'

Tips

Store credentials immediately

When create_credentials: true, the client_secret is returned only once. Store it in a secrets manager (AWS Secrets Manager, HashiCorp Vault, Azure Key Vault) immediately after creation. A55 cannot retrieve it later — you would need to rotate credentials.

One wallet per merchant per currency

A55 enforces a unique constraint on merchant_uuid + currency. If your merchant operates in both BRL and MXN, create two wallets. This keeps balances, settlements, and reporting cleanly separated by currency.

Credentials vs. platform token

Wallet credentials let the merchant call the API directly (e.g., create charges, check balance). Your platform token (entity-level) can operate on all wallets. Choose based on your architecture: centralized platform calls vs. delegated merchant access.