List banks

Credentials

Returns the bank codes for a country. Use them as seller_bank_code when you create or update a seller. Only Israel (IL) has banks today; other countries return an empty list. The same list is on Banks in Israel.

Send your partner key in the PayMe-Partner-Key header, or a seller's MPL in the PayMe-Merchant-Key header. One of them is required: without either, the call fails with error 1. The list isn't paged.

Parameters

Name In Type Required Description
PayMe-Partner-Key header string no Partner key. Send this or PayMe-Merchant-Key.
PayMe-Merchant-Key header string no A seller's MPL. Send this or PayMe-Partner-Key.
country_iso_code path string yes ISO 3166-1 alpha-2 country code, case-insensitive, for example IL. An unknown code returns HTTP 422 with error 912.

Code samples

curl

curl -X GET 'https://sandbox.payme.io/api/banks/<country_iso_code>' \
  -H 'PayMe-Partner-Key: <PayMe-Partner-Key>' \
  -H 'PayMe-Merchant-Key: <PayMe-Merchant-Key>'

Node.js

const response = await fetch("https://sandbox.payme.io/api/banks/<country_iso_code>", {
  method: "GET",
  headers: {
    "PayMe-Partner-Key": "<PayMe-Partner-Key>",
    "PayMe-Merchant-Key": "<PayMe-Merchant-Key>",
  },
});

console.log(await response.text());

Python

import requests

response = requests.get(
    "https://sandbox.payme.io/api/banks/<country_iso_code>",
    headers={
        "PayMe-Partner-Key": "<PayMe-Partner-Key>",
        "PayMe-Merchant-Key": "<PayMe-Merchant-Key>",
    },
)

print(response.text)

PHP

<?php

$ch = curl_init('https://sandbox.payme.io/api/banks/<country_iso_code>');
curl_setopt_array($ch, [
    CURLOPT_CUSTOMREQUEST => 'GET',
    CURLOPT_RETURNTRANSFER => true,
    CURLOPT_HTTPHEADER => [
        'PayMe-Partner-Key: <PayMe-Partner-Key>',
        'PayMe-Merchant-Key: <PayMe-Merchant-Key>',
    ],
]);

$response = curl_exec($ch);
curl_close($ch);

echo $response;

Responses

200 — OK (success)

Field Type Description
status_code integer 0 on success.
page integer Always 1.
items_per_page integer Number of banks returned.
items_total integer Number of banks returned.
country_iso_code string The country code you sent.
items array The banks.
items[].code string Bank code. Send it as seller_bank_code.
items[].local_name string Bank name in the local language.
items[].international_name string Bank name in English.
{
  "status_code": 0,
  "page": 1,
  "items_per_page": 1,
  "items_total": 1,
  "country_iso_code": "IL",
  "items": [
    {
      "code": "12",
      "local_name": "בנק הפועלים",
      "international_name": "Bank Hapoalim"
    }
  ]
}

500 — Error. A missing key returns HTTP 500 with error 1. An unknown country code returns HTTP 422 with error 912. See Errors. (error)

Field Type Description
status_code integer 1 on failure.
status_error_code integer PayMe error code.
status_error_details string Error message.
status_additional_info string The field the error refers to, when there is one.
{
  "status_code": 1,
  "status_error_details": "Required parameter is missing",
  "status_additional_info": "payme_client_key",
  "status_error_code": 1
}