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/countriesAuthentication:
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/jsonAccept: application/jsonRequest Parameters
This endpoint does not require query parameters or request body content.
Example cURL Request
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
| Field | Type | Description |
|---|---|---|
success | boolean | Indicates if the request was successful. |
data | array | List of supported countries. |
data.id | integer | Internal ID of the country in Cashela’s system. |
data.name | string | Full country name. |
data.iso_b | string | ISO 3-letter country code. |
message | string | Additional message, usually confirming success. |
Common Use Case
- Call Get Available Countries.
- Display the list to the user or system.
- Pass the selected country’s
iso_bvalue into Get Available Payment Methods.
Possible Errors
| HTTP Code | Error Code | Message |
|---|---|---|
| 401 | UNAUTHORIZED | Invalid or missing authentication credentials. |
| 500 | SERVER_ERROR | An unexpected error occurred. |