List a seller's public keys
- Sandbox:
GET https://sandbox.payme.io/api/sellers/{seller_payme_id}/public-keys
- Production:
GET https://live.payme.io/api/sellers/{seller_payme_id}/public-keys
Credentials
- Header
PayMe-Partner-Key (API key)
Returns the public keys of one of your sellers, including deactivated ones. Use a public key in browser code, for example to create Hosted Fields with PayMe.create. Never put the seller's MPL in browser code. Partners only: send your partner key in the PayMe-Partner-Key header.
create-seller also returns the new seller's key as seller_public_key. See Authentication.
Errors
| HTTP status |
Code |
When |
500 |
1 |
The PayMe-Partner-Key header is missing. |
500 |
200 |
The partner key matches no partner. |
400 |
20 |
The seller belongs to another partner ("Partner-Seller inconsistency"). |
404 |
– |
No seller has this MPL. The body is {"message": "…"}, not the PayMe error fields. |
Parameters
| Name |
In |
Type |
Required |
Description |
PayMe-Partner-Key |
header |
string |
yes |
Your partner key (payme_client_key). |
seller_payme_id |
path |
string |
yes |
The seller's MPL (seller_payme_id). An unknown MPL returns HTTP 404. |
Code samples
curl
curl -X GET 'https://sandbox.payme.io/api/sellers/<seller_payme_id>/public-keys' \
-H 'PayMe-Partner-Key: <PayMe-Partner-Key>'
Node.js
const response = await fetch("https://sandbox.payme.io/api/sellers/<seller_payme_id>/public-keys", {
method: "GET",
headers: {
"PayMe-Partner-Key": "<PayMe-Partner-Key>",
},
});
console.log(await response.text());
Python
import requests
response = requests.get(
"https://sandbox.payme.io/api/sellers/<seller_payme_id>/public-keys",
headers={
"PayMe-Partner-Key": "<PayMe-Partner-Key>",
},
)
print(response.text)
PHP
<?php
$ch = curl_init('https://sandbox.payme.io/api/sellers/<seller_payme_id>/public-keys');
curl_setopt_array($ch, [
CURLOPT_CUSTOMREQUEST => 'GET',
CURLOPT_RETURNTRANSFER => true,
CURLOPT_HTTPHEADER => [
'PayMe-Partner-Key: <PayMe-Partner-Key>',
],
]);
$response = curl_exec($ch);
curl_close($ch);
echo $response;
Responses
200 — OK (success)
| Field |
Type |
Description |
status_code |
integer |
0 on success. |
session |
string |
PayMe session ID. |
page |
integer |
Always 1. The list isn't paginated. |
items_total |
integer |
Number of keys. |
items_per_page |
integer |
Number of keys (same as items_total). |
seller_payme_id |
string |
The seller's MPL. |
items |
array |
The seller's public keys, active and deactivated. |
items[].uuid |
string |
The public key. |
items[].description |
string |
Name of the key. |
{
"status_code": 0,
"session": "a1B2c3D4",
"page": 1,
"items_total": 1,
"items_per_page": 1,
"seller_payme_id": "MPLDEMO-MPLDEMO-MPLDEMO-1234567",
"items": [
{
"uuid": "12345678-1234-4abc-9def-123456789012",
"description": "PayMe-Public-Key"
}
]
}
400 — Bad request: the seller belongs to another partner (error 20) (error)
| Field |
Type |
Description |
status_code |
integer |
1 on failure. |
status_error_code |
integer |
PayMe error code. See Errors. |
status_error_details |
string |
Error message, in the request's language. |
status_additional_info |
string |
Extra detail, such as the name of the missing or invalid field. Can be null. |
session |
string |
PayMe session ID. Quote it when you contact support. |
{
"status_code": 1,
"status_error_details": "Validation error",
"status_additional_info": "Partner-Seller inconsistency",
"status_error_code": 20,
"session": "a1B2c3D4"
}
| Field |
Type |
Description |
status_code |
integer |
1 on failure. |
status_error_code |
integer |
PayMe error code. See Errors. |
status_error_details |
string |
Error message, in the request's language. |
status_additional_info |
string |
Extra detail, such as the name of the missing or invalid field. Can be null. |
session |
string |
PayMe session ID. Quote it when you contact support. |
{
"status_code": 1,
"status_error_details": "Required parameter is missing",
"status_additional_info": "PayMe-Partner-Key",
"status_error_code": 1,
"session": "a1B2c3D4"
}