Withdraw Balance

Credentials

Overview

This endpoint is used to generate a new request to withdraw balance.

Notes

Parameter Description
transaction_ids The transaction GUIDs that will be included as a part of your withdrawal request.

Withdrawal Callback Notification Types

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

This endpoint takes no path, query or header parameters.

Request body

Content type: application/json

Field Type Required Description
payme_client_key string yes Your private key provided by us for authentication
seller_payme_id string yes Our unique seller ID
withdrawal_currency string yes Sale currency. 3-letter ISO 4217 name.
language string no Changes the error message language to English. Default value is Hebrew (he)
transaction_ids array no The transaction IDs that will be used for the partial withdrawal request. Transaction guids can be fetched using our get-transcations API endpoint. Example: TRANDEMO-XXXXXXXX-XXXXXXXX-XXXXXXXX

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/withdraw-balance' \
  -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/withdraw-balance", {
  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/withdraw-balance",
    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/withdraw-balance');
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 number Status of the request (0 - success, 1 - error)
{
  "status_code": 0
}

500 — Internal Server Error (error)

Field Type Description
status_code number
status_error_details string
status_additional_info string
status_error_code number
{
  "status_code": 0,
  "status_error_details": "string",
  "status_additional_info": null,
  "status_error_code": 0
}