Payment Methods

Retrieve available payment methods for your integration

List Payment Methods

Returns the list of payment methods available for a given country and amount. Use this endpoint to display payment options to your users.

GET/payment-methods
Basic Auth
List available payment methods filtered by country and amount.

Query Parameters

countryCodestringrequired
ISO 3166-1 alpha-3 country code. Example: DZA, MAR, TUN
amountnumberrequired
Payment amount. Must be greater than 0.
actionCurrencyCodestringoptional
Currency code for the payment. Example: DZD, MAD
actionCountryCodestringoptional
Country code where the action takes place, if different from countryCode.

Required Headers

Authorizationstringrequired
Basic authentication. Format: Basic base64(client_id:client_secret)
x-platformstringrequired
The platform making the request.
Allowed values:
APIWEBANDROIDIOS
x-servicestringrequired
Your service identifier provided during onboarding.
x-country-codestringrequired
ISO 3166-1 alpha-3 country code.
x-localestringoptional
User locale for localized payment method names. Example: en-US, fr-FR, ar-DZ

Example Request

List Payment Methods
curl -X GET "https://api.payment.yassir.io/payment-methods?countryCode=DZA&amount=1500" \
  -H "Authorization: Basic $(echo -n 'your_client_id:your_client_secret' | base64)" \
  -H "Content-Type: application/json" \
  -H "x-platform: API" \
  -H "x-service: YOUR_SERVICE" \
  -H "x-country-code: DZA" \
  -H "x-locale: en-US"

Response

200 OK
{
  "code": 200,
  "status": "success",
  "message": "payment methods listed successfully",
  "data": [
    {
      "id": "a1b2c3d4-e5f6-7890-abcd-ef1234567890",
      "name": "Yassir Cash",
      "code": "WALLET_V2",
      "displayName": "Yassir Cash",
      "image": "https://assets.yassir.com/wallet-logo.png"
    }
  ]
}

Response Fields

data[].idstringrequired
Unique identifier for the payment method.
data[].namestringrequired
Internal name of the payment method.
data[].codestringrequired
Payment method code used in subsequent API calls. Use this value as paymentMethodCode when proceeding with a payment.
data[].displayNamestringrequired
Localized display name for the payment method. Changes based on x-locale header.
data[].imagestringrequired
URL of the payment method logo/icon.

Filtering by Country

Payment methods vary by country. Always pass the correct countryCode to get the relevant options for your user.