# List a seller's public keys Building with an AI agent? Start at https://docs.payme.io/agents.md - 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](/payments/getting-started/authentication#the-public-key). ### 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 ```bash curl -X GET 'https://sandbox.payme.io/api/sellers//public-keys' \ -H 'PayMe-Partner-Key: ' ``` ### Node.js ```javascript const response = await fetch("https://sandbox.payme.io/api/sellers//public-keys", { method: "GET", headers: { "PayMe-Partner-Key": "", }, }); console.log(await response.text()); ``` ### Python ```python import requests response = requests.get( "https://sandbox.payme.io/api/sellers//public-keys", headers={ "PayMe-Partner-Key": "", }, ) print(response.text) ``` ### PHP ```php /public-keys'); curl_setopt_array($ch, [ CURLOPT_CUSTOMREQUEST => 'GET', CURLOPT_RETURNTRANSFER => true, CURLOPT_HTTPHEADER => [ '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. | ```json { "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](/payments/getting-started/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. | ```json { "status_code": 1, "status_error_details": "Validation error", "status_additional_info": "Partner-Seller inconsistency", "status_error_code": 20, "session": "a1B2c3D4" } ``` ### 500 — Error, for example error `1`: the `PayMe-Partner-Key` header is missing (error) | Field | Type | Description | | --- | --- | --- | | `status_code` | integer | `1` on failure. | | `status_error_code` | integer | PayMe error code. See [Errors](/payments/getting-started/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. | ```json { "status_code": 1, "status_error_details": "Required parameter is missing", "status_additional_info": "PayMe-Partner-Key", "status_error_code": 1, "session": "a1B2c3D4" } ```