curl -X POST https://api.zbdpay.com/api/v1/widget/users/fund \
-H "apikey: YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"user_id": "4ac4fd8a-cc2c-4d03-af09-a76f4e89d652",
"amount": 1000,
"currency": "USDZ",
"idempotency_key": "90f9371e-c48a-4bc9-9075-ef7a4c6816ec"
}'
{
"success": true,
"message": "Point transfer completed successfully.",
"data": {
"transfer_id": "f4ba94c1-1234-5678-abcd-ef0123456789",
"status": "COMPLETED"
},
"error": null
}
API Reference
Fund User
Credit USDZ points to a widget user’s point balance.
POST
/
api
/
v1
/
widget
/
users
/
fund
curl -X POST https://api.zbdpay.com/api/v1/widget/users/fund \
-H "apikey: YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"user_id": "4ac4fd8a-cc2c-4d03-af09-a76f4e89d652",
"amount": 1000,
"currency": "USDZ",
"idempotency_key": "90f9371e-c48a-4bc9-9075-ef7a4c6816ec"
}'
{
"success": true,
"message": "Point transfer completed successfully.",
"data": {
"transfer_id": "f4ba94c1-1234-5678-abcd-ef0123456789",
"status": "COMPLETED"
},
"error": null
}
Description
Credit publisher points to a widget user’s point balance. Amount is in currency minor units. For USDZ,100 equals $1.00 worth of points.
This endpoint is idempotent on idempotency_key.
Reverse a fund
To take back points that you previously funded, callPOST /api/v1/widget/users/deplete. This creates a new
debit from the user’s currently available point balance back to your configured
sink/source account; it does not undo or mutate the original fund transfer.
Use a new idempotency_key for the deplete request. A deplete can only succeed
while the user has enough available points. It cannot recover points that have
already been spent or cashed out.
Configuration
Header Parameters
string
required
Your ZBD project API key (production scope).
string
Content Type
Body Parameters
string
required
The ZBD user ID returned by Create User.
integer
required
Amount in currency minor units. For USDZ:
100 = 1.00,‘1000‘=10.00.string
required
Point currency code. Use
USDZ unless your project has a different configured point currency.string
required
Unique key to prevent duplicate transfers. Use a UUID.
curl -X POST https://api.zbdpay.com/api/v1/widget/users/fund \
-H "apikey: YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"user_id": "4ac4fd8a-cc2c-4d03-af09-a76f4e89d652",
"amount": 1000,
"currency": "USDZ",
"idempotency_key": "90f9371e-c48a-4bc9-9075-ef7a4c6816ec"
}'
{
"success": true,
"message": "Point transfer completed successfully.",
"data": {
"transfer_id": "f4ba94c1-1234-5678-abcd-ef0123456789",
"status": "COMPLETED"
},
"error": null
}
Was this page helpful?