Skip to content
GLORESEND

API reference

Fund a card

POST/cards/{id}/fund

Loads 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 · pathrequired

    max length 64

Request body

  • amountintegerrequired

    Amount 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
  • idstringrequired
  • objectenumrequired

    "card_operation"

  • typeenumrequired

    "issue", "fund", "withdraw"

  • card_idstringrequired
  • amountintegerrequired
  • feeintegerrequired
  • fee_breakdownmap of stringrequired
  • statusenumrequired

    "succeeded", "failed"

  • cardobjectrequired
  • card.idstringrequired
  • card.objectenumrequired

    "card"

  • card.environmentenumrequired

    "sandbox", "live"

  • card.productstringrequired
  • card.networkenumrequired

    "Visa", "Mastercard"

  • card.currencyenumrequired

    "USD"

  • card.statusenumrequired

    "active", "frozen", "terminated"

  • card.cardholderobjectrequired
  • card.cardholder.first_namestringrequired

    min length 1 · max length 50 · pattern ^[\p{L} '\-.]+$/u

  • card.cardholder.last_namestringrequired

    min length 1 · max length 50 · pattern ^[\p{L} '\-.]+$/u

  • card.cardholder.emailstringrequired

    max length 254 · email

  • card.last4stringrequired
  • card.expiry_monthstringrequired
  • card.expiry_yearstringrequired
  • card.balanceintegerrequired

    Card balance in USD cents, as of the last operation through GLORESEND.

  • card.referencestring | nullrequired
  • card.metadatamap of stringrequired
  • card.created_atstringrequired

    date-time

  • card.test_databooleanrequired
  • created_atstringrequired
  • test_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-After header.
  • 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. param points at the first invalid field.
  • 400idempotency_key_requiredThis endpoint can create side effects and requires an Idempotency-Key header.
  • 422idempotency_key_reuseThe Idempotency-Key was 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.