Skip to main content

Pre-fund Balance

API Reference

To make testing easier, you can pre-fund your customer's balance without going through the full payment flow. This is the fastest way to see real-time billing in action!

You can use the Wallet Adjustment API to pre-fund a customer’s wallet. For the full overview of how top-ups work in production, check out the Top-ups and Wallets guide.

You can use this API for any kind of balance adjustment including external PSP payments, refunds, and promotional credits. A detailed explanation of this functionality is available in our Adjustments guide.

Example

POST https://api.credyt.ai/customers/:customerId/wallet/adjustments
{
"transaction_id": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
"asset": "USD",
"amount": 20,
"reason": "external_topup",
"metadata": {
"psp": "stripe",
"payment_intent": "pi_3RjbbNJNSIruR1rb0GwMGpH0"
}
}
Wallet Idempotency

Wallet adjustments can be safely retried by specifying the same unique transaction identifier (UUID)

Response

{
"id": "61e15192-a156-4af4-a3cc-ec6c937795fa",
"created_at": "2025-10-17T21:00:56.743379Z"
}