Get Available Payment Methods
This endpoint returns a list of available payment methods for a specific country and deposit amount.
It is typically called after retrieving the list of available countries to determine the exact payment channels the customer can use.
Purpose
- Identify the payment methods available for a given
countryandamount. - Get detailed fee, total, and currency information before creating a deposit.
- Dynamically present payment options to the customer.
Endpoint
Method: POST
URL:
/api/v1/pay-in/deposit-creation/available-payment-methodsAuthentication:
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/jsonIdempotency-Key: <uuid-v4>Request Parameters
| Field | Type | Required | Description |
|---|---|---|---|
country | string | Yes | ISO 3-letter country code obtained from Get Available Countries. |
amount | number | Yes | Deposit amount. |
fee_on_payer | boolean | No | If true, payer covers transaction fees. Defaults to false. |
Example cURL Request
curl -X POST "https://api.cashela.com/api/v1/pay-in/deposit-creation/available-payment-methods" \ -H "Authorization: Basic BASE64_ENCODED_KEY_SECRET" \ -H "Content-Type: application/json" \ -H "Accept: application/json" \ -H "Idempotency-Key: 7c3f5f1e-97a9-4a8a-a0f1-4b0a6f9d21a2" \ -d '{ "country": "MEX", "amount": 100.50, "fee_on_payer": false }'Example Response
{ "success": true, "data": [ { "payment_type": "CREDIT_CARD", "is_accredited": { "currency": "MXN", "amount": 100.5, "fee": 2.5, "total": 103.0 }, "option_payments": [ { "payment_method": "VI", "name": "Visa", "logo": "https://..." } ], "mandatory_fields": [ { "fieldName": "document_number", "fieldRegex": "^[0-9]{10,15}$", "type": "text", "required": true } ] } ]}Response Fields
| Field | Type | Description |
|---|---|---|
success | boolean | Indicates if the request was successful. |
data | array | List of available payment method objects. |
payment_type | string | Payment type category (e.g., CREDIT_CARD, BANK_TRANSFER). |
is_accredited.currency | string | Currency of the deposit. |
is_accredited.amount | number | Deposit amount without fees. |
is_accredited.fee | number | Fee amount. |
is_accredited.total | number | Total amount including fees. |
option_payments | array | List of specific payment method options. |
mandatory_fields | array | List of fields required for the selected method. |
fieldName | string | Name of the required field. |
fieldRegex | string | Regular expression pattern to validate input. |
type | string | Data type (e.g., text, number). |
required | boolean | Whether the field is mandatory. |
Common Use Case
- Retrieve supported countries using Get Available Countries.
- Select a country and pass its code here with the deposit amount.
- Present the returned payment options to the user for selection.
Possible Errors
| HTTP Code | Error Code | Message |
|---|---|---|
| 400 | INVALID_INPUT | One or more required fields are missing. |
| 401 | UNAUTHORIZED | Invalid or missing authentication credentials. |
| 422 | VALIDATION_ERROR | Validation failed for one or more fields. |
| 500 | SERVER_ERROR | An unexpected error occurred. |