API reference
Create a transfer
/transfersSends funds from your wallet to a bank account or mobile money destination. Requires an Idempotency-Key. The amount and fees are reserved atomically before the provider is called; on failure the reservation is released. In the Sandbox the outcome is simulated deterministically from the destination identifier — see Sandbox testing.
- Required scope
- transfers:write
- Idempotency-Key
- Required
- Environments
- Sandbox; Live when authorized
live_operations_disabled or provider_not_configured until a payment provider is authorized for this deployment.Request body
amountintegerrequiredAmount in the currency's minor unit (for example cents). Integer.
max 100,000,000,000
currencyenumrequiredISO 4217 currency code.
"USD", "EUR", "GBP", "XOF", "XAF", "NGN", "GHS", "KES"
destinationone ofrequireddestination.typeenumwhen type = bank_accountrequired"bank_account"
destination.account_numberstringwhen type = bank_accountrequiredpattern ^[A-Za-z0-9]{6,34}$
destination.bank_codestringwhen type = bank_accountrequiredpattern ^[A-Za-z0-9]{2,16}$
destination.account_namestringwhen type = bank_accountrequiredmin length 2 · max length 140
destination.countrystringwhen type = bank_accountrequiredpattern ^[A-Z]{2}$
destination.typeenumwhen type = mobile_moneyrequired"mobile_money"
destination.phone_numberstringwhen type = mobile_moneyrequiredpattern ^\+[1-9][0-9]{7,14}$
destination.networkstringwhen type = mobile_moneyrequiredpattern ^[A-Za-z0-9_-]{2,32}$
destination.account_namestringwhen type = mobile_moneyrequiredmin length 2 · max length 140
destination.countrystringwhen type = mobile_moneyrequiredpattern ^[A-Z]{2}$
referencestringoptionalYour own reference, returned on the transfer and in webhooks.
max length 64
descriptionstringoptionalmax length 255
metadatamap of stringoptionalUp to 20 string key/value pairs stored with the object.
Example request
curl -X POST "https://api.gloresend.com/sandbox/v1/transfers" \
-H "Authorization: Bearer $GLORESEND_TEST_KEY" \
-H "Idempotency-Key: $(uuidgen)" \
-H "Content-Type: application/json" \
-d '{
"amount": 125000,
"currency": "XOF",
"destination": {
"type": "bank_account",
"account_number": "GS0000000001",
"bank_code": "GSBANK",
"account_name": "Ada Example",
"country": "BJ"
},
"reference": "INV-2026-0042",
"description": "Supplier payout",
"metadata": {
"order_id": "A-1042"
}
}'Response · 201
{
"id": "tr_4k2m9q8w7e6r5t3y",
"object": "transfer",
"environment": "sandbox",
"amount": 125000,
"fee": 0,
"currency": "XOF",
"status": "succeeded",
"destination": {
"type": "bank_account",
"account_name": "Ada Example",
"country": "BJ",
"bank_code": "GSBANK",
"last4": "0001"
},
"reference": "INV-2026-0042",
"description": "Supplier payout",
"metadata": {
"order_id": "A-1042"
},
"failure_code": null,
"failure_message": null,
"created_at": "2026-10-15T09:30:00.000Z",
"completed_at": "2026-10-15T09:30:00.120Z",
"test_data": true
}Response fields
idstringrequiredobjectenumrequired"transfer"
environmentenumrequired"sandbox", "live"
amountintegerrequiredfeeintegerrequiredFee charged by GLORESEND in minor units. Pricing is not yet configured, so this is currently 0.
currencyenumrequiredISO 4217 currency code.
"USD", "EUR", "GBP", "XOF", "XAF", "NGN", "GHS", "KES"
statusenumrequired"processing", "succeeded", "failed"
destinationobjectrequireddestination.typeenumrequired"bank_account", "mobile_money"
destination.account_namestringrequireddestination.countrystringrequireddestination.bank_codestringoptionaldestination.networkstringoptionaldestination.last4stringrequiredLast four characters of the account or phone number. Full identifiers are never returned or stored after the request.
referencestring | nullrequireddescriptionstring | nullrequiredmetadatamap of stringrequiredfailure_codestring | nullrequiredfailure_messagestring | nullrequiredcreated_atstringrequireddate-time
completed_atstring | nullrequireddate-time
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-Afterheader. - 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. - 409idempotency_in_progressA request with the same
Idempotency-Keyis still being processed. Retry later. - 403insufficient_scopeThe API key does not have the scope required for this endpoint.
- 402insufficient_fundsThe wallet's available balance is lower than the amount plus fees.
- 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.
- 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.