Pause

Credentials

Overview

Relevant only for Direct API Integration

This endpoint is used to pause subscriptions. You can find more information in our guide - How to create a subscription .

Parameters

This endpoint takes no path, query or header parameters.

Request body

Content type: application/json

Field Type Required Description
seller_payme_id string no MPL. Your private key in PayMe system.
sub_payme_id string no PayMe's unique subscription ID

Request example

{
  "seller_payme_id": "MPL00007-00007EXM-EXAMPLE0-EXAMPLE7",
  "sub_payme_id": "SUB16999-507640UD-83RNQDGN-YHSXHXHG"
}

Code samples

curl

curl -X POST 'https://sandbox.payme.io/api/pause-subscription' \
  -H 'Content-Type: application/json' \
  --data-raw '{
  "seller_payme_id": "MPL00007-00007EXM-EXAMPLE0-EXAMPLE7",
  "sub_payme_id": "SUB16999-507640UD-83RNQDGN-YHSXHXHG"
}'

Node.js

const response = await fetch("https://sandbox.payme.io/api/pause-subscription", {
  method: "POST",
  headers: {
    "Content-Type": "application/json",
  },
  body: JSON.stringify({
    "seller_payme_id": "MPL00007-00007EXM-EXAMPLE0-EXAMPLE7",
    "sub_payme_id": "SUB16999-507640UD-83RNQDGN-YHSXHXHG"
  }),
});

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

Python

import requests

response = requests.post(
    "https://sandbox.payme.io/api/pause-subscription",
    json={
        "seller_payme_id": "MPL00007-00007EXM-EXAMPLE0-EXAMPLE7",
        "sub_payme_id": "SUB16999-507640UD-83RNQDGN-YHSXHXHG",
    },
)

print(response.text)

PHP

<?php

$body = <<<'BODY'
{
  "seller_payme_id": "MPL00007-00007EXM-EXAMPLE0-EXAMPLE7",
  "sub_payme_id": "SUB16999-507640UD-83RNQDGN-YHSXHXHG"
}
BODY;

$ch = curl_init('https://sandbox.payme.io/api/pause-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 integer
payme_status string
status_error_code integer
seller_payme_id string
seller_id string
sub_payme_id string
sub_payme_code integer
subscription_id string
sub_created string
sub_start_date string
sub_prev_date string
sub_next_date string
sub_status integer
sub_iteration_type integer
sub_currency string
sub_price integer
sub_description string
sub_iterations integer
sub_iterations_completed integer
sub_iterations_skipped integer
sub_iterations_left integer
sub_paid boolean
sub_error_text string
sub_payment_date string
buyer_card_mask string
buyer_card_exp string
buyer_name string
buyer_email string
buyer_phone string
buyer_social_id string
{
  "status_code": 0,
  "payme_status": "success",
  "status_error_code": 0,
  "seller_payme_id": "MPL00007-00007EXM-EXAMPLE0-EXAMPLE7",
  "seller_id": null,
  "sub_payme_id": "SUB16999-507640UD-83RNQDGN-YHSXHXHG",
  "sub_payme_code": 343324,
  "subscription_id": null,
  "sub_created": "2023-11-14 10:32:44",
  "sub_start_date": "2023-11-14 08:00:00",
  "sub_prev_date": null,
  "sub_next_date": "2023-11-14 08:00:00",
  "sub_status": 3,
  "sub_iteration_type": 1,
  "sub_currency": "ILS",
  "sub_price": 10000,
  "sub_description": "blablabla",
  "sub_iterations": 1,
  "sub_iterations_completed": 0,
  "sub_iterations_skipped": 0,
  "sub_iterations_left": 1,
  "sub_paid": true,
  "sub_error_text": "הושהה על ידי המשתמש בתאריך 14/11/2023 10:33:35",
  "sub_payment_date": "2023-10-31 14:23:49",
  "buyer_card_mask": "532610******5846",
  "buyer_card_exp": "0426",
  "buyer_name": "Ran Tester",
  "buyer_email": "TestTest@paymeservice.com",
  "buyer_phone": "05222222",
  "buyer_social_id": "123456789"
}