Kazawallet API
Accept payments, manage wallets, run payouts and issue virtual cards. One reference for every Kazawallet endpoint.
BASE URL
https://outdoor.kasroad.com/wallet
Introduction
The Kazawallet API lets merchants accept payments, manage wallets, run payouts, and issue virtual cards programmatically.
Overview
All requests are made over HTTPS to the base URL below. Requests and responses use JSON. Authenticate every request with your API key and secret, which you can request from the support team.
Base URL
bash
Keep your credentials secret
Authentication
Authentication is handled through request headers. Most merchant endpoints require all three headers below; the payment-link endpoint only needs the API key.
Headers
| Field | Type | Description |
|---|---|---|
x-api-keyrequired | string | Your API key. |
x-api-secretrequired | string | Your API secret key. |
merchant-emailrequired | string | The merchant account email. |
Payment Methods
Some endpoints require a payment method id. The most common method ids per environment are listed below.
Development
USDT-TRC20
15USDT-BEP20
13Production
USDT-TRC20
118USDT-ERC20
116USDT-SOL
117USDT-BEP20
115Payment Links
Create hosted payment links and verify the webhooks they send back to you.
Create Payment Link
POST
/createPaymentLink
Create a payment link to initiate a payment for a specified amount and currency. Share the returned link with your customer to collect the payment.
Headers
| Field | Type | Description |
|---|---|---|
x-api-keyrequired | string | Your API key. |
Content-Typerequired | string | application/json |
Request Body
json
cURL Example
bash
Payment Link Webhook
To be notified when a customer completes a payment, set a webhook URL in your profile. Once the payment is made, a POST request with the payment details is sent to your webhook URL ONLY ONE TIME.
Webhook Payload
| Field | Type | Description |
|---|---|---|
order_id | string | The id of the payment link. |
secret | string | A secret code for verification. |
amount | string | The amount paid. |
ref | string | Sent back with the payload — for example, use it to reference the user id in your system. |
status | string | Either "fulfilled" or "timed_out", indicating whether the link was paid. |
currency | string | The code of the currency used. |
Webhook Signature Verification
To verify the authenticity of a webhook request, calculate a verification code and compare it with the secret received from the API.
PHP Example
php
1. Receive the webhook POST request with the order_id, secret, status and amount. 2. Use the example above to calculate the HMAC-SHA512 signature from the received order_id, status and amount, plus your API key and secret. 3. Compare the calculated signature with the secret received from the webhook. 4. If they match, the request is authentic and you can process the payment confirmation.
Withdrawals
Create withdrawal requests from a user wallet to a supported payment method.
Create Withdrawal Request
POST
/createWithdrawalRequest
Create a withdrawal request from a user wallet. The request includes the user email, currency, amount, a note, the payment method, and any custom fields required by that method.
Headers
| Field | Type | Description |
|---|---|---|
x-api-keyrequired | string | Your API key. |
x-api-secretrequired | string | Your API secret (request it from the support team). |
Content-Typerequired | string | application/json |
Request Body
| Field | Type | Description |
|---|---|---|
emailrequired | string | The email address of the merchant. |
currencyrequired | string | The currency code (e.g. USD). |
amountrequired | string | The amount to withdraw. |
note | string | A note for the withdrawal request. |
paymentMethodrequired | string | The id of the payment method. |
fields | object | A set of custom fields based on the payment method. |
Example Request Body
json
Example Pending Response
json
Example Success Response
json
Example Error Response
json
Withdrawal Webhook Content
json
cURL Example
bash
PHP Example
php
Notes
Merchant Wallet
Read rates and balances, inspect payment method fields, and move funds.
Get Rates
GET
/get-rate
Get the current exchange rates.
Headers
| Field | Type | Description |
|---|---|---|
x-api-keyrequired | string | Your API key. |
x-api-secretrequired | string | Your API secret key. |
merchant-emailrequired | string | The merchant account email. |
Response Success
json
Response Error
json
Usage Example
javascript
Get Balance
GET
/get-merchant-wallets
Get the merchant wallet balances.
Headers
| Field | Type | Description |
|---|---|---|
x-api-keyrequired | string | Your API key. |
x-api-secretrequired | string | Your API secret key. |
merchant-emailrequired | string | The merchant account email. |
Response Success
json
Response Error
json
Usage Example
javascript
Get Payment Method Fields
GET
/get-payment-method-fields?id={payment method Id}&field={slug name}
Get deposit and withdraw fields for a specific payment method.
Headers
| Field | Type | Description |
|---|---|---|
x-api-keyrequired | string | Your API key. |
x-api-secretrequired | string | Your API secret key. |
merchant-emailrequired | string | The merchant account email. |
Response Success
json
Response Error
json
Usage Example
javascript
Create Deposit
POST
/createDepositRequest
Create a deposit request for a user.
Headers
| Field | Type | Description |
|---|---|---|
x-api-keyrequired | string | Your API key. |
x-api-secretrequired | string | Your API secret key. |
Request Payload
json
Response Success
json
Response Error
json
Webhook Request Content
json
Usage Example
javascript
Create Transfer
POST
/transfer-from-merchant-to-user
Create a transfer from the merchant to a user.
Headers
| Field | Type | Description |
|---|---|---|
x-api-keyrequired | string | Your API key. |
x-api-secretrequired | string | Your API secret key. |
Request Payload
json
Response Success
json
Response Error
json
Usage Example
javascript
Cards
Issue and manage Kazawallet virtual cards for your users.
Issue Card
POST
/wallet-cards/create-then-topup
Create a card for a user. Use cardType to choose the tier — basic (default) or plus. The issue fee and top-up fees may differ per tier and per merchant plan.
Headers
| Field | Type | Description |
|---|---|---|
x-api-keyrequired | string | Your API key. |
x-api-secretrequired | string | Your API secret key. |
merchant-emailrequired | string | The merchant account email. |
Request Payload
javascript
Response Success
json
Response Error
json
Usage Example
javascript
Top up Card
PUT
/wallet-cards/topup
Top up a card for a user.
Headers
| Field | Type | Description |
|---|---|---|
x-api-keyrequired | string | Your API key. |
x-api-secretrequired | string | Your API secret key. |
merchant-emailrequired | string | The merchant account email. |
Request Payload
javascript
Response Success
json
Response Error
json
Usage Example
javascript
Cancel Card
PUT
/wallet-cards/cancel
Cancel a card for a user.
Headers
| Field | Type | Description |
|---|---|---|
x-api-keyrequired | string | Your API key. |
x-api-secretrequired | string | Your API secret key. |
merchant-emailrequired | string | The merchant account email. |
Request Payload
javascript
Response Success
json
Response Error
json
Usage Example
javascript
Lock Card
PUT
/wallet-cards/lock
Lock a card for a user.
Headers
| Field | Type | Description |
|---|---|---|
x-api-keyrequired | string | Your API key. |
x-api-secretrequired | string | Your API secret key. |
merchant-emailrequired | string | The merchant account email. |
Request Payload
javascript
Response Success
json
Response Error
json
Usage Example
javascript
Unlock Card
PUT
/wallet-cards/unlock
Unlock a card for a user.
Headers
| Field | Type | Description |
|---|---|---|
x-api-keyrequired | string | Your API key. |
x-api-secretrequired | string | Your API secret key. |
merchant-emailrequired | string | The merchant account email. |
Request Payload
javascript
Response Success
json
Response Error
json
Usage Example
javascript
Get Cards List
GET
/get-merchant-wallets-cards
Get the list of wallet cards.
Headers
| Field | Type | Description |
|---|---|---|
x-api-keyrequired | string | Your API key. |
x-api-secretrequired | string | Your API secret key. |
merchant-emailrequired | string | The merchant account email. |
Response Success
json
Response Error
json
Usage Example
javascript
Get Card Details
GET
/wallet-cards/get-card-details
Get the details of a card.
Headers
| Field | Type | Description |
|---|---|---|
x-api-keyrequired | string | Your API key. |
x-api-secretrequired | string | Your API secret key. |
merchant-emailrequired | string | The merchant account email. |
Request Query
javascript
Response Success
json
Response Error
json
Usage Example
javascript
Get Card Transactions
GET
/wallet-cards/get-transactions
Get the transactions of a card.
Headers
| Field | Type | Description |
|---|---|---|
x-api-keyrequired | string | Your API key. |
x-api-secretrequired | string | Your API secret key. |
merchant-emailrequired | string | The merchant account email. |
Request Query
javascript
Response Success
json
Response Error
json
Transaction State
SUCCESSFUL
1FAILED
2IN_PROCESS
3POSTED
4NOT_POSTED
5PAYMENT_FAILED
6CANCELLED
7Usage Example
javascript
Validate Code
POST
/wallet-cards/validate-code
Validate a 3DS confirmation code for a card payment.
Headers
| Field | Type | Description |
|---|---|---|
x-api-keyrequired | string | Your API key. |
x-api-secretrequired | string | Your API secret key. |
merchant-emailrequired | string | The merchant account email. |
Request Payload
javascript
Response Success
json
Response Error
json
Usage Example
javascript
Create Card (without top-up)
Deprecated
POST
/wallet-cards/create
Create a card request for a user without an initial top-up. This endpoint is deprecated — use Issue Card (POST /wallet-cards/create-then-topup) for new integrations.
Deprecated
Headers
| Field | Type | Description |
|---|---|---|
x-api-keyrequired | string | Your API key. |
x-api-secretrequired | string | Your API secret key. |
merchant-emailrequired | string | The merchant account email. |
Request Payload
javascript
Response Success
json
Response Error
json
Usage Example
javascript
Gift Cards
Issue gift cards for a set amount and currency, then redeem them into a user account.
Create Gift Card
POST
/gift-card/create
Create a gift card for a specified amount and currency. The expiry date is fixed at 1 year from the creation date and cannot be set by the merchant.
Headers
| Field | Type | Description |
|---|---|---|
x-api-keyrequired | string | Your API key. |
x-api-secretrequired | string | Your API secret key. |
merchant-emailrequired | string | The merchant account email. |
Request Body
| Field | Type | Description |
|---|---|---|
giftCardCurrencyrequired | string | The currency code (e.g. usd). |
amountrequired | string | The gift card amount. |
The gift card expiry date is set automatically to 1 year from the creation date. It cannot be provided in the request; any expiry sent in the body is ignored.
Request Body
json
Response Success
json
Response Error
json
Usage Example
javascript
Redeem Gift Card
POST
/gift-card/redeem
Redeem a gift card into a user account using its code.
Headers
| Field | Type | Description |
|---|---|---|
x-api-keyrequired | string | Your API key. |
x-api-secretrequired | string | Your API secret key. |
merchant-emailrequired | string | The merchant account email. |
Request Body
| Field | Type | Description |
|---|---|---|
giftCardCoderequired | string | The gift card code to redeem. |
userEmailrequired | string | The email of the user redeeming the gift card. |
Request Body
json
Response Success
json
Response Error
json
Usage Example
javascript
Card Webhooks
Events Kazawallet sends to your webhook URL for card activity.
Overview
When a merchant sets a webhookUrl in their profile, Kazawallet sends a POST request to that URL for the following card events. These webhooks are sent after Kazawallet receives the event from the card issuer.
Events
CC_CONSUME
Card consumptionCC_REFUND
Card refundCC_RECHARGE
Card recharge3DS_CONFIRM
3DS confirmationWebhook Body (always)
json
Card Transaction Events
Common shape for CC_CONSUME, CC_REFUND and CC_RECHARGE events.
Example (CC_CONSUME)
json
Field Notes
| Field | Type | Description |
|---|---|---|
reason | — | Provider reason code (example: R7). |
amount | — | Transaction amount as string. |
transactionAt | — | Unix time in milliseconds. |
type | — | Transaction type code (see mapping below). |
originalAmount | — | Original amount before FX conversion (if applicable). |
originalCurrency | — | Original currency before FX conversion (if applicable). |
currency | — | Settlement currency. |
status | — | Transaction status code (see mapping below). Webhooks are not sent when status = 4 (POSTED). |
direction | — | Transaction direction code (see mapping below). |
cardNumber | — | Masked card number (last 4 digits). |
merchantName | — | Merchant name (if available). |
Status (details.status)
1
Successful2
Failed3
In Process4
Posted5
Not Posted6
Payment Failed7
CancelledType (details.type)
1
Recharge / Mortgage2
Consumption3
Refund4
Cash Withdrawal5
Redemption6
Management Fee7
Other8
Replacement9
Deactivate10
Refund ReversalDirection (details.direction)
1
Income2
Expense3DS Confirmation Event
Sent as the 3DS_CONFIRM event when a card payment requires 3DS confirmation.
Example (3DS_CONFIRM)
json
Field Notes
| Field | Type | Description |
|---|---|---|
amount | — | Transaction amount. |
type | — | 3DS confirmation type from provider (commonly "code"). |
cardNumber | — | Masked card number (last 4 digits). |
merchants | — | Merchant name provided by the processor. |
transactionCurrency | — | Transaction currency. |
transactionDate | — | Unix time in milliseconds. |
validateCode | — | Code used with POST /wallet-cards/validate-code to confirm the payment. |
