POST https://sandbox.payme.io/api/cancel-templatePOST https://live.payme.io/api/cancel-templateseller_payme_id (required): MPL. Your private key in PayMe system.This endpoint enable you to cancle a Multi Payment Page.
Multi Payment Page enables payments on a single sale link, by multiple buyers.
You can find more information in our Multi Payment Page Guide.
This endpoint takes no path, query or header parameters.
Content type: application/json
| Field | Type | Required | Description |
|---|---|---|---|
seller_payme_id |
string | yes | MPL. Your private key in PayMe system. |
payme_sale_id |
string | yes | Our unique sale ID. |
{
"payme_client_key": "XXXXXXXX",
"seller_payme_id": "MPL1DEMO-XXXXXXXX-XXXXXXXX-XXXXXXXX",
"payme_sale_id": "SALEDEMO-XXXXXXXX-XXXXXXXX-XXXXXXXX",
"sale_refund_amount": 1000,
"language": "he"
}
curl -X POST 'https://sandbox.payme.io/api/cancel-template' \
-H 'Content-Type: application/json' \
--data-raw '{
"payme_client_key": "XXXXXXXX",
"seller_payme_id": "MPL1DEMO-XXXXXXXX-XXXXXXXX-XXXXXXXX",
"payme_sale_id": "SALEDEMO-XXXXXXXX-XXXXXXXX-XXXXXXXX",
"sale_refund_amount": 1000,
"language": "he"
}'
const response = await fetch("https://sandbox.payme.io/api/cancel-template", {
method: "POST",
headers: {
"Content-Type": "application/json",
},
body: JSON.stringify({
"payme_client_key": "XXXXXXXX",
"seller_payme_id": "MPL1DEMO-XXXXXXXX-XXXXXXXX-XXXXXXXX",
"payme_sale_id": "SALEDEMO-XXXXXXXX-XXXXXXXX-XXXXXXXX",
"sale_refund_amount": 1000,
"language": "he"
}),
});
console.log(await response.text());
import requests
response = requests.post(
"https://sandbox.payme.io/api/cancel-template",
json={
"payme_client_key": "XXXXXXXX",
"seller_payme_id": "MPL1DEMO-XXXXXXXX-XXXXXXXX-XXXXXXXX",
"payme_sale_id": "SALEDEMO-XXXXXXXX-XXXXXXXX-XXXXXXXX",
"sale_refund_amount": 1000,
"language": "he",
},
)
print(response.text)
<?php
$body = <<<'BODY'
{
"payme_client_key": "XXXXXXXX",
"seller_payme_id": "MPL1DEMO-XXXXXXXX-XXXXXXXX-XXXXXXXX",
"payme_sale_id": "SALEDEMO-XXXXXXXX-XXXXXXXX-XXXXXXXX",
"sale_refund_amount": 1000,
"language": "he"
}
BODY;
$ch = curl_init('https://sandbox.payme.io/api/cancel-template');
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;
| Field | Type | Description |
|---|---|---|
status_code |
integer | Status of the request (0 - success, 1 - error). |
{
"status_code": 0,
"status_error_code": 0,
"payme_status": "success",
"refunded_from_creditcard": false,
"sale_invoice_number": null,
"sale_invoice_url": null,
"sale_refund_buffer": 18800,
"sale_status": "partial-refund",
"payme_transaction_total": 1000,
"payme_transaction_total_aft_deduction": 1000,
"payme_transaction_id": "TRANDEMO-XXXXXXXX-XXXXXXXX-XXXXXXXX",
"payme_transaction_card_brand": "XXXXXXXX",
"payme_transaction_auth_number": "72****4",
"payme_transaction_voucher": "24****9",
"payme_signature": "b71e**************ca5a",
"payme_transaction_arn": null
}
| Field | Type | Description |
|---|---|---|
status_code |
integer | Status of the request (0 - success, 1 - error). |
status_error_details |
string | |
status_additional_info |
string | |
status_error_code |
integer | |
session |
string |
{
"status_code": 1,
"status_error_details": "מוכר לא נמצא",
"status_additional_info": "seller_payme_id",
"status_error_code": 251,
"session": "MfH3Hc80"
}
| Field | Type | Description |
|---|---|---|
status_code |
integer | Status of the request (0 - success, 1 - error). |
status_error_details |
string | |
status_additional_info |
string | |
status_error_code |
integer | |
session |
string |
{
"status_code": 1,
"status_error_details": "לא ניתן להשלים פעולה זו עקב סטטוס מכירה לא מתאים",
"status_additional_info": "canceled",
"status_error_code": 305,
"session": "NGQ1QpYB"
}