Partial Balance Withdraw

Credentials

Overview

This endpoint is used to generate a new request to withdraw balance. (More information can be found in the main Platforms & Marketplaces APIs summary page)

Notes

Withdrawing Balance

Notifications

Notification Description
withdrawal-complete A withdrawal was completed successfully
Attribute Description
status_code 0 Status of the request (0 - success, 1 - error)
notify_type withdrawal-complete
seller_payme_id XXXXXXXX-XXXXXXXX-XXXXXXXX-XXXXXXXX
tran_payme_code 123456 Our unique Withdrawal code
tran_created 2016-01-01 15:15:15
tran_type 40 Financial Transaction type Bank Withdrawal
tran_currency USD
tran_total 10000
tran_description משיכה לבנק

Parameters

Name In Type Required Description
PayMe-Partner-Key header string no

Request body

Content type: application/json

Field Type Required Description
seller_payme_id string yes Our unique seller ID
withdrawal_currency string yes Withdrawal currency. 3-letter ISO 4217 name
transaction_ids array no An array that should contain the transaction guids received in pay-sale or get-transactions endpoints.

Request example

{
  "payme_client_key": "string",
  "seller_payme_id": "string",
  "withdrawal_currency": "string",
  "language": "string"
}

Code samples

curl

curl -X POST 'https://sandbox.payme.io/api/partial-withdraw' \
  -H 'Content-Type: application/json' \
  --data-raw '{
  "payme_client_key": "string",
  "seller_payme_id": "string",
  "withdrawal_currency": "string",
  "language": "string"
}'

Node.js

const response = await fetch("https://sandbox.payme.io/api/partial-withdraw", {
  method: "POST",
  headers: {
    "Content-Type": "application/json",
  },
  body: JSON.stringify({
    "payme_client_key": "string",
    "seller_payme_id": "string",
    "withdrawal_currency": "string",
    "language": "string"
  }),
});

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

Python

import requests

response = requests.post(
    "https://sandbox.payme.io/api/partial-withdraw",
    json={
        "payme_client_key": "string",
        "seller_payme_id": "string",
        "withdrawal_currency": "string",
        "language": "string",
    },
)

print(response.text)

PHP

<?php

$body = <<<'BODY'
{
  "payme_client_key": "string",
  "seller_payme_id": "string",
  "withdrawal_currency": "string",
  "language": "string"
}
BODY;

$ch = curl_init('https://sandbox.payme.io/api/partial-withdraw');
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 — Request Received Successfully (success)

Field Type Description
status_code integer Status code of the action. 0 - success, 1 - failure.
transaction_ids array The transactions that were included in the balance withdrawal request.
withdrawal_id integer The unique identifier of the withdrawal request.
{
  "status_code": 0,
  "transaction_ids": [
    "TRAN1",
    "TRAN2"
  ],
  "withdrawal_id": 1234567
}

400 — Unreleased transactions (error)

Field Type Description
status_code integer Status code of the action. 0 - success, 1 - failure.
status_error_code string The unique error code.
status_error_text string Error explained in text.
{
  "status_code": 1,
  "status_error_code": "x",
  "status_error_text": "The transactions or a part of the requested transactions are not released"
}

406 — Different currencies (error)

Field Type Description
status_code integer Status code of the action. 0 - success, 1 - failure.
status_error_code integer The unique error code.
status_error_text string Error explained in text.
{
  "status_code": 1,
  "status_error_code": 1234,
  "status_error_text": "The transactions or a part of the requested transactions are not released"
}

409 — Already settled transactions (error)

Field Type Description
status_code integer
status_error_code integer
status_error_text string
{
  "status_code": 1,
  "status_error_code": 1233,
  "status_error_text": "Some of the transactions were already settled"
}