Skip to content

Search is only available in production builds. Try building and previewing the site to test it out locally.

Get Available Countries

This endpoint retrieves a list of countries where the PAYIN service is supported.

It is typically the first step when integrating the PAYIN module, as the list of available payment methods depends on the destination country.


Purpose

  • Identify supported countries for deposit creation.
  • Ensure the requested country is valid before moving forward.
  • Prevent unnecessary errors when fetching payment methods or initiating deposits.

Endpoint

Method: GET
URL:

/api/v1/pay-in/deposit-creation/countries

Authentication:
This endpoint requires Basic Authentication with your Cashela Business Key and Business Secret.

Required Headers:

Authorization: Basic Base64({business_key}:{business_secret})
Content-Type: application/json
Accept: application/json

Request Parameters

This endpoint does not require query parameters or request body content.


Example cURL Request

Terminal window
curl -X GET "https://api.cashela.com/api/v1/pay-in/deposit-creation/countries" \
-H "Authorization: Basic BASE64_ENCODED_KEY_SECRET" \
-H "Content-Type: application/json" \
-H "Accept: application/json"

Example Response

{
"success": true,
"data": [
{ "id": 1, "name": "Mexico", "iso_b": "MEX" },
{ "id": 2, "name": "Colombia", "iso_b": "COL" },
{ "id": 3, "name": "Brazil", "iso_b": "BRA" }
],
"message": "Countries retrieved successfully"
}

Response Fields

FieldTypeDescription
successbooleanIndicates if the request was successful.
dataarrayList of supported countries.
data.idintegerInternal ID of the country in Cashela’s system.
data.namestringFull country name.
data.iso_bstringISO 3-letter country code.
messagestringAdditional message, usually confirming success.

Common Use Case

  1. Call Get Available Countries.
  2. Display the list to the user or system.
  3. Pass the selected country’s iso_b value into Get Available Payment Methods.

Possible Errors

HTTP CodeError CodeMessage
401UNAUTHORIZEDInvalid or missing authentication credentials.
500SERVER_ERRORAn unexpected error occurred.