Skip to content

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

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 country and amount.
  • 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-methods

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
Idempotency-Key: <uuid-v4>

Request Parameters

FieldTypeRequiredDescription
countrystringYesISO 3-letter country code obtained from Get Available Countries.
amountnumberYesDeposit amount.
fee_on_payerbooleanNoIf true, payer covers transaction fees. Defaults to false.

Example cURL Request

Terminal window
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

FieldTypeDescription
successbooleanIndicates if the request was successful.
dataarrayList of available payment method objects.
payment_typestringPayment type category (e.g., CREDIT_CARD, BANK_TRANSFER).
is_accredited.currencystringCurrency of the deposit.
is_accredited.amountnumberDeposit amount without fees.
is_accredited.feenumberFee amount.
is_accredited.totalnumberTotal amount including fees.
option_paymentsarrayList of specific payment method options.
mandatory_fieldsarrayList of fields required for the selected method.
fieldNamestringName of the required field.
fieldRegexstringRegular expression pattern to validate input.
typestringData type (e.g., text, number).
requiredbooleanWhether the field is mandatory.

Common Use Case

  1. Retrieve supported countries using Get Available Countries.
  2. Select a country and pass its code here with the deposit amount.
  3. Present the returned payment options to the user for selection.

Possible Errors

HTTP CodeError CodeMessage
400INVALID_INPUTOne or more required fields are missing.
401UNAUTHORIZEDInvalid or missing authentication credentials.
422VALIDATION_ERRORValidation failed for one or more fields.
500SERVER_ERRORAn unexpected error occurred.