API reference
Fund a card
POST
/cards/{id}/fundLoads funds onto an active card ($5.00–$2,500.00 per operation). The amount plus the product's top-up fee is debited from your USD wallet. Requires an Idempotency-Key.
- Required scope
- cards:write
- Idempotency-Key
- Required
- Environments
- Sandbox; Live when authorized
In Live this endpoint returns
live_operations_disabled or provider_not_configured until a payment provider is authorized for this deployment.Parameters
idstring · pathrequiredmax length 64
Request body
amountintegerrequiredAmount in USD cents.
min 500 · max 250,000
Example request
curl -X POST "https://api.gloresend.com/sandbox/v1/cards/card_9f8e7d6c5b4a3f2e1d0c/fund" \
-H "Authorization: Bearer $GLORESEND_TEST_KEY" \
-H "Idempotency-Key: $(uuidgen)" \
-H "Content-Type: application/json" \
-d '{
"amount": 2500
}'Response · 200
200 · application/json
{
"id": "cop_5t4r3e2w1q0p9o8i7u6y",
"object": "card_operation",
"type": "fund",
"card_id": "card_9f8e7d6c5b4a3f2e1d0c",
"amount": 2500,
"fee": 75,
"fee_breakdown": {
"topup": 75
},
"status": "succeeded",
"card": {
"id": "card_9f8e7d6c5b4a3f2e1d0c",
"object": "card",
"environment": "sandbox",
"product": "visa-404",
"network": "Visa",
"currency": "USD",
"status": "active",
"cardholder": {
"first_name": "Ada",
"last_name": "Example",
"email": "ada@example.com"
},
"last4": "4242",
"expiry_month": "10",
"expiry_year": "2029",
"balance": 7500,
"reference": "EMP-0042",
"metadata": {},
"created_at": "2026-10-15T09:30:00.000Z",
"test_data": true
},
"created_at": "2026-10-15T10:00:00.000Z",
"test_data": true
}Response fields
idstringrequiredobjectenumrequired"card_operation"
typeenumrequired"issue", "fund", "withdraw"
card_idstringrequiredamountintegerrequiredfeeintegerrequiredfee_breakdownmap of stringrequiredstatusenumrequired"succeeded", "failed"
cardobjectrequiredcard.idstringrequiredcard.objectenumrequired"card"
card.environmentenumrequired"sandbox", "live"
card.productstringrequiredcard.networkenumrequired"Visa", "Mastercard"
card.currencyenumrequired"USD"
card.statusenumrequired"active", "frozen", "terminated"
card.cardholderobjectrequiredcard.cardholder.first_namestringrequiredmin length 1 · max length 50 · pattern ^[\p{L} '\-.]+$/u
card.cardholder.last_namestringrequiredmin length 1 · max length 50 · pattern ^[\p{L} '\-.]+$/u
card.cardholder.emailstringrequiredmax length 254 · email
card.last4stringrequiredcard.expiry_monthstringrequiredcard.expiry_yearstringrequiredcard.balanceintegerrequiredCard balance in USD cents, as of the last operation through GLORESEND.
card.referencestring | nullrequiredcard.metadatamap of stringrequiredcard.created_atstringrequireddate-time
card.test_databooleanrequiredcreated_atstringrequiredtest_databooleanrequired
Errors
- 401authentication_requiredNo credentials were supplied. Send
Authorization: Bearer <api key>. - 401invalid_api_keyThe API key is unknown, revoked or expired.
- 401environment_mismatchThe API key belongs to a different environment than the base URL you called. Sandbox keys (
gs_test_) only work against the Sandbox base URL, Live keys (gs_live_) only against the Live base URL. - 429rate_limitedToo many requests. Wait for the number of seconds in the
Retry-Afterheader. - 403insufficient_scopeThe API key does not have the scope required for this endpoint.
- 404not_foundThe requested resource does not exist or is not visible to this API key.
- 400validation_errorThe request body, query or headers failed validation.
parampoints at the first invalid field. - 400idempotency_key_requiredThis endpoint can create side effects and requires an
Idempotency-Keyheader. - 422idempotency_key_reuseThe
Idempotency-Keywas already used with a different request body or endpoint. - 409card_state_conflictThe operation is not allowed in the card's current state (for example funding a frozen or terminated card, or terminating a card that still has a balance).
- 402insufficient_fundsThe wallet's available balance is lower than the amount plus fees.
- 403activation_requiredLive card programs require an activated account (business verification and setup fee).
- 503live_operations_disabledLive money movement is not enabled on this deployment. No provider has been authorized yet.
- 503provider_not_configuredNo payment provider is configured for this environment and operation.
- 502provider_errorThe downstream provider returned an error. The transfer was marked as failed and reserved funds were released.
- 504provider_timeoutThe downstream provider did not answer in time. The transfer was marked as failed and reserved funds were released.