Collect Negative Wallet

Credentials

No credentials are documented for this endpoint.

Overview

This API endpoint will allow you as a partner / user to collect a negative account for your sellers.

You can collect all negative wallets using the following request:

{
"payme_seller_id": "MPLDEMO-MPLDEMO-MPLDEMO-MPLDEMO"
}

You can also collect a specific wallet (specific currency) using the following request specifing the currency:

{
"payme_seller_id": "MPLDEMO-MPLDEMO-MPLDEMO-MPLDEMO",
"currency": "ILS"
}

Parameters

Name In Type Required Description
PayMe-Partner-Key header string no PayMe's Secret Client Key

Request body

Content type: application/json

Field Type Required Description
payme_seller_id string yes The MPL of the seller
currency string no Sale currency. 3-letter ISO 4217 name.
installments string no Amount of installments for the customer deposit transaction. Setting a fixed number of installments is simply entering a number between 1 and 12.

Request example

{
  "payme_seller_id": "MPLDEMO-MPLDEMO-MPLDEMO-MPLDEMO"
}

Code samples

curl

curl -X POST 'https://sandbox.payme.io/api/collect-negative-wallet' \
  -H 'Content-Type: application/json' \
  --data-raw '{
  "payme_seller_id": "MPLDEMO-MPLDEMO-MPLDEMO-MPLDEMO"
}'

Node.js

const response = await fetch("https://sandbox.payme.io/api/collect-negative-wallet", {
  method: "POST",
  headers: {
    "Content-Type": "application/json",
  },
  body: JSON.stringify({
    "payme_seller_id": "MPLDEMO-MPLDEMO-MPLDEMO-MPLDEMO"
  }),
});

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

Python

import requests

response = requests.post(
    "https://sandbox.payme.io/api/collect-negative-wallet",
    json={
        "payme_seller_id": "MPLDEMO-MPLDEMO-MPLDEMO-MPLDEMO",
    },
)

print(response.text)

PHP

<?php

$body = <<<'BODY'
{
  "payme_seller_id": "MPLDEMO-MPLDEMO-MPLDEMO-MPLDEMO"
}
BODY;

$ch = curl_init('https://sandbox.payme.io/api/collect-negative-wallet');
curl_setopt_array($ch, [
    CURLOPT_CUSTOMREQUEST => 'POST',
    CURLOPT_RETURNTRANSFER => true,
    CURLOPT_HTTPHEADER => [
        'Content-Type: application/json',
    ],
    CURLOPT_POSTFIELDS => $body,
]);

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

echo $response;

Responses

200 — OK (success)

Field Type Description
status_code integer Status of the request (0 - success, 1 - error)
items array
items[].currency string Sale currency. 3-letter ISO 4217 name.
items[].total integer The total wallet balance
{
  "status_code": 0,
  "items": [
    {
      "currency": "ILS",
      "total": 12345
    },
    {
      "currency": "USD",
      "total": 0
    }
  ]
}

400 — Payment Failed (error)

Field Type Description
status_code integer
status_error_code integer
status_error_text string
{
  "status_code": 1,
  "status_error_code": 123,
  "status_error_text": "Payment failed - no funds added"
}

403 — Wallet is not negative (error)

Field Type Description
status_code integer
status_error_code integer
status_error_text string
{
  "status_code": 1,
  "status_error_code": 123,
  "status_error_text": "The wallet is not negative"
}