List previous recipients

Credentials

Lists the recipients of this seller's earlier contracts that are registered PayMe sellers, so you can create a new contract for them without typing their details again. Authenticate with the initiator's MPL in the PayMe-Merchant-Key header.

Errors

HTTP status Error code Message When
500 1 Required parameter is missing The PayMe-Merchant-Key header is missing. status_additional_info is payme_client_key.
500 251 Seller was not found The seller key is unknown.
500 163 Account settings problem - please contact Customer Support The seller is not active.

Parameters

Name In Type Required Description
PayMe-Merchant-Key header string yes The initiator's seller_payme_id (MPL).

Code samples

curl

curl -X GET 'https://sandbox.payme.io/api/payment-contracts/recipients' \
  -H 'PayMe-Merchant-Key: <PayMe-Merchant-Key>'

Node.js

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

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

Python

import requests

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

print(response.text)

PHP

<?php

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

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

echo $response;

Responses

200 — Your previous recipients. An empty items array if there are none. (success)

Field Type Description
status_code integer 0 on success.
session string PayMe session ID. Quote it when you contact PayMe support.
page integer Always 1.
items_per_page integer The number of items.
items_total integer The number of items.
items array One entry per recipient seller account.
items[].name string The recipient name you sent. null if you didn't send one.
items[].phone string The phone number you sent. null if you didn't send one.
items[].business_code integer The business number you sent, as sent: a number, or a string if you sent a string. null if you didn't send one.
items[].email string The email address you sent.
items[].seller_payme_id_checksum string An encrypted reference to the recipient's seller account. Send it as recipient.payme_id when you create a contract. Treat it as opaque: it differs on every call, and every value works.
{
  "status_code": 0,
  "session": "FhT3aXe7",
  "page": 1,
  "items_per_page": 2,
  "items_total": 2,
  "items": [
    {
      "name": "Example Supplies Ltd",
      "phone": "0500000001",
      "business_code": 515555555,
      "email": "supplier@example.com",
      "seller_payme_id_checksum": "eyJpdiI6IkV4YW1wbGVJVjAwMDAwMDAwMDAwPT0iLCJ2YWx1ZSI6IkV4YW1wbGUxIn0="
    },
    {
      "name": null,
      "phone": null,
      "business_code": 516666666,
      "email": "billing@example.com",
      "seller_payme_id_checksum": "eyJpdiI6IkV4YW1wbGVJVjExMTExMTExMTExPT0iLCJ2YWx1ZSI6IkV4YW1wbGUyIn0="
    }
  ]
}

500 — A missing, unknown or inactive seller key. (error)

Field Type Description
status_code integer 1 on failure.
status_error_details string The error message.
status_additional_info string More detail, such as the field or value that failed.
status_error_code integer PayMe error code. See the error table above.
session string PayMe session ID. Quote it when you contact PayMe support.
{
  "status_code": 1,
  "status_error_details": "Required parameter is missing",
  "status_additional_info": "payme_client_key",
  "status_error_code": 1,
  "session": "FhT3aXe7"
}