Pause a subscription

Credentials

Overview

Pauses a subscription in status 2 (Active), 4 (Failed) or 7 (Failed, retry pending). Other statuses return error 305. PayMe sends a sub-pause callback, and sub_error_text holds the pause reason that PayMe writes (in Hebrew).

While the subscription is paused, nothing is charged. Each iteration whose date passes is skipped: it counts in sub_iterations_skipped, reduces sub_iterations_left and sends sub-iteration-skipped. Skipped iterations aren't charged after you resume. If every remaining iteration is skipped, the subscription becomes 6 (Completed) while paused.

Resume with Resume a subscription. A paused subscription can't be canceled: resume it first.

A subscription in status 4 has no working card. To fix it, have the buyer pay again with Pay a subscription rather than pausing and resuming it.

Authentication

Send seller_payme_id (the seller's MPL) in the JSON body or the PayMe-Merchant-Key header. Partners also send payme_client_key, in the body or the PayMe-Partner-Key header. The subscription must belong to the seller (error 370).

Errors

Errors return status_code 1 with HTTP 500 unless the table says otherwise.

HTTP Code When
500 1 A required field is missing, or no credential was sent. status_additional_info names the field.
500 251 The seller_payme_id matches no seller.
500 370 The subscription belongs to another seller.
500 371 No subscription has this sub_payme_id.
500 305 The subscription isn't in status 2, 4 or 7.

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 The seller's MPL. You can send it in the PayMe-Merchant-Key header instead.
payme_client_key string no Partners only: your partner key. You can send it in the PayMe-Partner-Key header instead. A seller authenticates with seller_payme_id alone.
sub_payme_id string yes The subscription to pause (sub_payme_id from Create a subscription).
language string no Language of error messages: he (default), en, es, ru or ar.

Request example

{
  "seller_payme_id": "MPLDEMO-MPLDEMO-MPLDEMO-1234567",
  "sub_payme_id": "SUB16885-68336QPL-UQSSS1CC-SYKXI53N"
}

Code samples

curl

curl -X POST 'https://sandbox.payme.io/api/pause-subscription' \
  -H 'Content-Type: application/json' \
  --data-raw '{
  "seller_payme_id": "MPLDEMO-MPLDEMO-MPLDEMO-1234567",
  "sub_payme_id": "SUB16885-68336QPL-UQSSS1CC-SYKXI53N"
}'

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": "MPLDEMO-MPLDEMO-MPLDEMO-1234567",
    "sub_payme_id": "SUB16885-68336QPL-UQSSS1CC-SYKXI53N"
  }),
});

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

Python

import requests

response = requests.post(
    "https://sandbox.payme.io/api/pause-subscription",
    json={
        "seller_payme_id": "MPLDEMO-MPLDEMO-MPLDEMO-1234567",
        "sub_payme_id": "SUB16885-68336QPL-UQSSS1CC-SYKXI53N",
    },
)

print(response.text)

PHP

<?php

$body = <<<'BODY'
{
  "seller_payme_id": "MPLDEMO-MPLDEMO-MPLDEMO-1234567",
  "sub_payme_id": "SUB16885-68336QPL-UQSSS1CC-SYKXI53N"
}
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 — The subscription is paused. (success)

Field Type Description
status_code integer 0 on success.
payme_status string success.
status_error_code integer 0 on success.
seller_payme_id string The seller's MPL.
seller_id string The partner's own reference for the seller, if the partner set one. Otherwise null.
sub_payme_id string PayMe's subscription ID (SUB…). Use it in every other subscription call.
sub_payme_code integer PayMe's numeric subscription ID.
subscription_id string Your own reference, as sent when the subscription was created. null if you didn't send one.
sub_created string When the subscription was created, YYYY-MM-DD HH:MM:SS.
sub_start_date string Date of the first charge, YYYY-MM-DD HH:MM:SS.
sub_prev_date string When the last successful charge ran. null until the first charge.
sub_next_date string When the next charge is due. Ignore it on a canceled or completed subscription.
sub_status integer Current status. See Subscription statuses.
sub_iteration_type integer Billing interval. See Subscription iteration types.
sub_currency string ISO 4217 currency code, e.g. ILS.
sub_price integer Price of one iteration, in minor units (5000 = 50.00).
sub_description string What the buyer is paying for.
sub_iterations integer Total number of iterations. -1 means unlimited.
sub_iterations_completed integer Iterations charged successfully.
sub_iterations_skipped integer Iterations skipped while the subscription was paused. They are never charged.
sub_iterations_left integer sub_iterations minus completed and skipped iterations. -1 when unlimited.
sub_paid boolean true once a card (buyer token) is attached to the subscription. It does not mean the current iteration was charged.
sub_error_text string The last failure, pause or cancel reason. null if there is none. Reasons that PayMe writes are in Hebrew.
sub_payment_date string Returned only when a card is attached: when the card was attached.
buyer_card_mask string Returned only when a card is attached: the masked card number.
buyer_card_exp string Returned only when a card is attached: card expiry, MMYY.
buyer_name string Returned only when a card is attached: the card holder's name.
buyer_email string Returned only when a card is attached: the card holder's email.
buyer_phone string Returned only when a card is attached: the card holder's phone, or null.
buyer_social_id string Returned only when a card is attached: the card holder's national ID, or null.
{
  "status_code": 0,
  "payme_status": "success",
  "status_error_code": 0,
  "seller_payme_id": "MPLDEMO-MPLDEMO-MPLDEMO-1234567",
  "seller_id": null,
  "sub_payme_id": "SUB16885-68336QPL-UQSSS1CC-SYKXI53N",
  "sub_payme_code": 477004,
  "subscription_id": "order-1001",
  "sub_created": "2026-11-09 10:15:00",
  "sub_start_date": "2026-12-01 00:00:00",
  "sub_prev_date": null,
  "sub_next_date": "2026-12-01 00:00:00",
  "sub_status": 3,
  "sub_iteration_type": 3,
  "sub_currency": "ILS",
  "sub_price": 5000,
  "sub_description": "Monthly plan",
  "sub_iterations": 12,
  "sub_iterations_completed": 0,
  "sub_iterations_skipped": 0,
  "sub_iterations_left": 12,
  "sub_paid": true,
  "sub_error_text": "הושהה על ידי המשתמש בתאריך 09/11/2026 10:30:00",
  "sub_payment_date": "2026-11-09 10:20:00",
  "buyer_card_mask": "532610******5846",
  "buyer_card_exp": "1230",
  "buyer_name": "Israel Israeli",
  "buyer_email": "buyer@example.com",
  "buyer_phone": null,
  "buyer_social_id": null
}

500 — The request was refused. See the error table. (error)

Field Type Description
status_code integer 1 on failure.
status_error_details string What went wrong, in the language you asked for (Hebrew by default).
status_additional_info string The field or value concerned. Can be null.
status_error_code integer PayMe error code. See the error table above and Errors.
session string PayMe session ID. Quote it when you contact support.
{
  "status_code": 1,
  "status_error_details": "Required parameter is missing",
  "status_additional_info": "sub_payme_id",
  "status_error_code": 1,
  "session": "FhT3aXe7"
}