This guide shows how to load funds into PayCA, distribute them to users, and double-check that balances reflect each operation.
What You Control
- Master accounts – Primary client accounts PayCA holds on behalf of your organisation per currency.
- User wallets – Balances tied to individual users (
userAccountId). - Card transactions – Authorisations, settlements, refunds, and declines generated by your customers.
Everything else (provider clearing accounts, scheme fees, reconciliations) is managed by PayCA and surfaced back to you via APIs and webhooks.
Workflow Overview
- Prefund your master accounts through the finance channel agreed with PayCA.
- Transfer funds from a master account into a user wallet using the API.
- Simulate card spend (sandbox) or let production traffic run.
- Reconcile balances and events using API endpoints and webhook payloads.
Step 1 – List Master Accounts and Check Balance
curl -s "$PAYCA_BASE_URL/v2/accounts" \
-H "x-client-id: $PAYCA_CLIENT_ID" \
-H "x-client-secret: $PAYCA_CLIENT_SECRET"
Focus on:
accounts[].balance.available– Available funds per currency.accounts[].balance.pending– Holds from outstanding authorisations.
Set an alerting threshold so operations teams know when to top up master accounts.
Step 2 – Allocate Funds to a User
curl -s -X POST "$PAYCA_BASE_URL/v1/users/transfer" \
-H "Content-Type: application/json" \
-H "x-client-id: $PAYCA_CLIENT_ID" \
-H "x-client-secret: $PAYCA_CLIENT_SECRET" \
-H "Idempotency-Key: transfer-user-123-20250602" \
-d '{
"fromAccountId": "<master-account-id>",
"toAccountId": "<user-account-id>",
"amount": "250.00",
"currency": "USD"
}'
Success response returns a transaction identifier. Store it together with the idempotency key so you can safely retry if the network fails.
Expect a user_account_transaction webhook describing the movement. Use it to update downstream systems (CRM, ERP, customer notifications).
Step 3 – Observe Card Activity
In sandbox, trigger transactions via POST /sandbox/transactions. In production, ingest live webhooks.
Watch for:
card_transactionwebhooks (authorization,cleared,refunded,declined).user_account_transactionupdates reflecting balance changes.- Optional
account_transactionevents that show master-account movements such as fees.
Step 4 – Reconcile
Daily or weekly, pull the data you need for reconciliation:
- Balances –
GET /v2/accountsfor master accounts plus per-userGET /v1/users/{id}. - Activity – Export webhooks keyed by
data.idfor the relevant date range. - Fees – Sum
account_transactionevents wheretype=fee, or queryGET /v1/accounts/{id}/transactionsfor backfill. - Variance – Compare API totals with your internal ledger. Investigate difference by tracing back through
referenceIdand idempotency keys.
Best Practices
- Always include an
Idempotency-Keyon transfers to guard against double posting. - Store webhooks before processing to ensure you can replay or audit them later.
- Automate alerts for low master account balance and high decline rates.
- Tag transfers with metadata (e.g., statement period, campaign) to simplify reporting.
Troubleshooting
| Issue | Likely Cause | Next Step |
|---|---|---|
Transfer rejected with ErrInvalidArg |
Currency mismatch or bad account ID. | Verify both accounts use the same currency and exist. |
Authorization denied with insufficient_liquidity |
Master account too low. | Top up via finance channel and retry. |
| Duplicate transfer detected | Same idempotency key already used. | Reuse the key only when replaying the same intent. |
| Missing webhook | Receiver returned non-2xx or timed out. | Fix the receiver and call /v1/webhooks/resend. |
For more about webhook ingestion, head to Webhook Handling Patterns. To learn how fees are reported back to you, see Fees & Revenue Recognition. For a consolidated flow map, see Money Movement Overview.