PATCH https://sandbox.payme.io/api/sales/{guid}/external-market-feePATCH https://live.payme.io/api/sales/{guid}/external-market-feeNo credentials are documented for this endpoint.
This endpoint allows you to create a new charge (fee) that is connected to a sale and is limited by the transaction amount.
market_fee_percentage or market_fee_fixedmarket_fee_percentage - can be from 0.0 to 60.0market_fee_fixed - limited to the amount settled to the wallet and cannot be higher than that.| Name | In | Type | Required | Description |
|---|---|---|---|---|
PayMe-Partner-Key |
header | string | no | The partner secret key. |
PayMe-Merchant-Key |
header | string | no | The MPL of the seller. |
guid |
path | string | yes |
Content type: application/json
| Field | Type | Required | Description |
|---|---|---|---|
market_fee_percentage |
number | no | The percentage that will be charged. Limited to be between 0 to 60. |
market_fee_fixed |
integer | no | The fixed market fee - limited to the amount settled to the wallet. |
{
"market_fee_percentage": 10.2,
"market_fee_fixed": 15000
}
curl -X PATCH 'https://sandbox.payme.io/api/sales/<guid>/external-market-fee' \
-H 'Content-Type: application/json' \
--data-raw '{
"market_fee_percentage": 10.2,
"market_fee_fixed": 15000
}'
const response = await fetch("https://sandbox.payme.io/api/sales/<guid>/external-market-fee", {
method: "PATCH",
headers: {
"Content-Type": "application/json",
},
body: JSON.stringify({
"market_fee_percentage": 10.2,
"market_fee_fixed": 15000
}),
});
console.log(await response.text());
import requests
response = requests.patch(
"https://sandbox.payme.io/api/sales/<guid>/external-market-fee",
json={
"market_fee_percentage": 10.2,
"market_fee_fixed": 15000,
},
)
print(response.text)
<?php
$body = <<<'BODY'
{
"market_fee_percentage": 10.2,
"market_fee_fixed": 15000
}
BODY;
$ch = curl_init('https://sandbox.payme.io/api/sales/<guid>/external-market-fee');
curl_setopt_array($ch, [
CURLOPT_CUSTOMREQUEST => 'PATCH',
CURLOPT_RETURNTRANSFER => true,
CURLOPT_HTTPHEADER => [
'Content-Type: application/json',
],
CURLOPT_POSTFIELDS => $body,
]);
$response = curl_exec($ch);
curl_close($ch);
echo $response;
| Field | Type | Description |
|---|---|---|
status_code |
integer | 0 - Sucess 1 - Failure |
payme_status |
string | The status of the action. |
payme_sale_id |
string | The sale the fee was associated with. |
{
"status_code": 0,
"payme_status": "success",
"payme_sale_id": "SALEGUID-SALEGUID-SALEGUID-SALEGUID"
}