Cancel

Credentials

Overview

This endpoint is used to cancel existing subscriptions.

Parameters

This endpoint takes no path, query or header parameters.

Request body

Content type: application/json

Field Type Required Description
seller_payme_id string yes Our unique seller ID
sub_payme_id string yes Our unique subscription ID
language string no Changes the error message language to English. Default value is Hebrew (he)

Request example

{
  "seller_payme_id": "string",
  "sub_payme_id": "string",
  "language": "string"
}

Code samples

curl

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

Node.js

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

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

Python

import requests

response = requests.post(
    "https://sandbox.payme.io/api/cancel-subscription",
    json={
        "seller_payme_id": "string",
        "sub_payme_id": "string",
        "language": "string",
    },
)

print(response.text)

PHP

<?php

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

$ch = curl_init('https://sandbox.payme.io/api/cancel-subscription');
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 string Cancellation status code ( 0 - Success, 1 - Failure)
{
  "status_code": "string"
}

500 — Internal Server Error (error)

Field Type Description
status_code string Cancellation status code ( 0 - Success, 1 - Failure)
{
  "status_code": "string"
}