Skip to main content
GET
https://sandbox.dcash.africa
/
merchants
/
accounts
/
providers
Get Payment Providers
curl --request GET \
  --url https://sandbox.dcash.africa/merchants/accounts/providers \
  --header 'Authorization: <authorization>' \
  --header 'x-api-key: <x-api-key>'
{
  "default_deposit_provider": "<string>",
  "default_withdraw_provider": "<string>",
  "payment_providers": {
    "mobile_payment_providers": [
      {
        "provider_name": "<string>",
        "phone_number": "<string>"
      }
    ]
  }
}

Endpoint

GET /merchants/accounts/providers

Description

Retrieves a list of all payment providers available to the current user and their chosen defaults. Only the listed payment providers can be used to initiate a transaction.

Headers

x-api-key
string
required
Merchant API key for authentication
Authorization
string
required
Bearer token of the authenticated userFormat: Bearer {token}

Response

default_deposit_provider
string
User’s default provider for deposits
default_withdraw_provider
string
User’s default provider for withdrawals
payment_providers
object
Object containing available payment providers

Example Request

curl --request GET \
  --url https://sandbox.dcash.africa/merchants/accounts/providers \
  --header 'Authorization: Bearer YOUR_USER_TOKEN' \
  --header 'x-api-key: YOUR_MERCHANT_API_KEY'

Example Response

{
  "default_deposit_provider": "mpesa",
  "default_withdraw_provider": "airtel",
  "payment_providers": {
    "mobile_payment_providers": [
      {
        "provider_name": "mpesa",
        "phone_number": "254797954425"
      },
      {
        "provider_name": "airtel",
        "phone_number": "254780764974"
      }
    ]
  }
}
The providers returned by this endpoint are the only ones that can be used when initiating deposit or withdrawal transactions for this user.

Use Cases

This endpoint is useful for:
  • Displaying available payment options to users
  • Pre-selecting the user’s default payment provider
  • Validating payment provider selections before initiating transactions
  • Building dynamic payment forms based on user preferences