Update a subscription's price
- Sandbox:
PATCH https://sandbox.payme.io/api/subscriptions/{sub_payme_id}/set-price - Production:
PATCH https://live.payme.io/api/subscriptions/{sub_payme_id}/set-price
Credentials
- Request body field
seller_payme_id(required): The seller's MPL. You can send it in thePayMe-Merchant-Keyheader instead. - Request body field
payme_client_key(optional): Partners only: your partner key. You can send it in thePayMe-Partner-Keyheader instead. A seller authenticates withseller_payme_idalone.
Overview
Changes the price of future iterations. The call charges nothing and doesn't change sub_next_date, sub_start_date, sub_prev_date, the iteration counters or the status. The billing day stays anchored to sub_start_date.
You can update:
- an active subscription (status
2); - a template (
sub_type10) in status1: buyers who pay the link after the change get the new price, and subscriptions already created from it keep theirs; - a subscription in status
1whosesub_start_dateis still in the future.
Any other subscription returns error 377 (HTTP 400).
If the price changed and the subscription has a buyer email, PayMe emails the buyer about the new price, subject to the seller's email settings.
There is no proration: for a mid-cycle upgrade, charge the difference once with generate-sale and the subscription's buyer_key, then call this endpoint. Don't cancel and re-create the subscription: that resets sub_start_date and the counters.
Example: PATCH https://sandbox.payme.io/api/subscriptions/SUB16885-68336QPL-UQSSS1CC-SYKXI53N/set-price. More: Saved cards & recurring.
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 | 352 |
sub_price is outside your account's range. |
| 400 | 377 |
This subscription's price can't be updated in its current status or type. |
Parameters
| Name | In | Type | Required | Description |
|---|---|---|---|---|
sub_payme_id |
path | string | yes | The subscription to update: its sub_payme_id, returned by Create a subscription. Your own subscription_id doesn't work here (error 371). |
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_price |
integer | yes | New price of one iteration, in minor units (5075 = 50.75). Default range 500–4,000,000; your account may have different limits (error 352). |
Request example
{
"seller_payme_id": "MPLDEMO-MPLDEMO-MPLDEMO-1234567",
"sub_price": 7500
}
Code samples
curl
curl -X PATCH 'https://sandbox.payme.io/api/subscriptions/<sub_payme_id>/set-price' \
-H 'Content-Type: application/json' \
--data-raw '{
"seller_payme_id": "MPLDEMO-MPLDEMO-MPLDEMO-1234567",
"sub_price": 7500
}'
Node.js
const response = await fetch("https://sandbox.payme.io/api/subscriptions/<sub_payme_id>/set-price", {
method: "PATCH",
headers: {
"Content-Type": "application/json",
},
body: JSON.stringify({
"seller_payme_id": "MPLDEMO-MPLDEMO-MPLDEMO-1234567",
"sub_price": 7500
}),
});
console.log(await response.text());
Python
import requests
response = requests.patch(
"https://sandbox.payme.io/api/subscriptions/<sub_payme_id>/set-price",
json={
"seller_payme_id": "MPLDEMO-MPLDEMO-MPLDEMO-1234567",
"sub_price": 7500,
},
)
print(response.text)
PHP
<?php
$body = <<<'BODY'
{
"seller_payme_id": "MPLDEMO-MPLDEMO-MPLDEMO-1234567",
"sub_price": 7500
}
BODY;
$ch = curl_init('https://sandbox.payme.io/api/subscriptions/<sub_payme_id>/set-price');
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;
Responses
200 — The price was updated, or was already this value. (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": 2,
"sub_iteration_type": 3,
"sub_currency": "ILS",
"sub_price": 7500,
"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": null,
"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
}
400 — The price can't be updated (377). (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": "Subscription update failed",
"status_additional_info": "Subscription price can not be updated",
"status_error_code": 377,
"session": "FhT3aXe7"
}
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": "Invalid price, out of min-max bounds",
"status_additional_info": "100",
"status_error_code": 352,
"session": "FhT3aXe7"
}