Skip to main content

Pause Subscription

POST/subscriptions//pause
Pauses an active subscription. Auto-renewal is suspended and is_active becomes false. The remaining days in the current period are stored internally and will be restored when the subscription is unpaused.

Authentication

Headers

HeaderValueRequired
AuthorizationBearer YOUR_API_TOKENYes
Acceptapplication/jsonRecommended

Path Parameters

ParameterTypeRequiredDescription
idintegerYesThe subscription ID

Example Request

curl -X POST "https://merchant-api.rmz.gg/shawarma/subscriptions/501/pause" \
  -H "Authorization: Bearer YOUR_API_TOKEN"

Success Response

Returns the full subscription object in the standard SubscriptionResource shape — identical to Get Subscription, List Subscriptions, and Lookup Subscriptions. The fields most relevant to pausing are shown below — see Get Subscription for the complete field list.
{
  "message": "Subscription paused successfully",
  "data": {
    "id": 501,
    "status": "paused",
    "external_customer_id": "usr_abc123",
    "is_active": false,
    "current_period_end": "2025-07-01T00:00:00.000000Z"
  },
  "api": "rmz.shawarma",
  "timestamp": 1699999999
}

Behavior

  • Only active subscriptions can be paused
  • Auto-renewal is suspended — no payment attempts will be made
  • is_active is set to false
  • The remaining days in the current period are stored in metadata
  • When unpaused, the period is extended by the stored remaining days
  • A subscription.paused webhook event is dispatched
Pausing a subscription does not refund any charges. It simply stops auto-renewal and marks the subscription as inactive. Use this for temporary holds, not cancellations.

Error Responses

CodeDescription
401Unauthorized — invalid or missing token
404Subscription not found
422Only active subscriptions can be paused