Skip to main content

Unpause Subscription

POST/subscriptions//unpause
Resumes a paused subscription. The subscription returns to active status and the billing period is extended by the number of days that were remaining when the subscription was paused.

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/unpause" \
  -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 unpausing are shown below — see Get Subscription for the complete field list.
{
  "message": "Subscription unpaused successfully",
  "data": {
    "id": 501,
    "status": "active",
    "external_customer_id": "usr_abc123",
    "is_active": true,
    "current_period_start": "2025-06-20T00:00:00.000000Z",
    "current_period_end": "2025-07-10T00:00:00.000000Z"
  },
  "api": "rmz.shawarma",
  "timestamp": 1699999999
}

Behavior

  • Only paused subscriptions can be unpaused
  • Status returns to active and is_active is set to true
  • current_period_start is set to now
  • current_period_end is extended from now by the remaining days stored at pause time (minimum 1 day)
  • Auto-renewal resumes normally at the new period end
  • A subscription.unpaused webhook event is dispatched

Example Timeline

  1. Subscription active: Jan 1 - Feb 1 (31 days)
  2. Paused on Jan 20 (11 days remaining stored)
  3. Unpaused on Jan 25
  4. New period: Jan 25 - Feb 5 (11 days from unpause)

Error Responses

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