Skip to main content

Pause subscription

METHODURL
POST/subscriptions/{subscriptionId}/pause
EXAMPLEhttps://test.api.revuppayments.com/v2/subscriptions/{subscriptionId}/pause

Endpoint to pause a subscription.


SUCCESS RESPONSES - PAUSE SUBSCRIPTION

HTTP CODEDESCRIPTION
200Subscription has been paused and the response is in the body in JSON format.

SUCCESS RESPONSE EXAMPLE - PAUSE SUBSCRIPTION

{
"id": "0195146b-fb77-73b4-bb92-ba8bc2180433",
"merchantId": "74d52e64-e807-4d77-bfe2-76f5274febf1",
"planId": "4aa7c1e4-cf8c-4d1c-a6ad-451dd07411ee",
"status": "paused",
"cycle": 1,
"createdAt": "2025-02-17T15:00:12.491953Z",
"modifiedAt": "2025-02-17T15:07:14.095555Z"
}

ERROR RESPONSES - PAUSE SUBSCRIPTION

HTTP CODEERROR CODEERROR MESSAGEDESCRIPTION
5000900Internal Server ErrorThe server experienced an unexpected error.
4040020Subscription not foundSubscription %s not found

Bulk Pause Subscriptions

curl --location 'https://whatever.com/subscriptions/{subscriptionId}/pause' \
--header 'Content-Type: application/json' \
--header 'x-api-key: {X_API_KEY}' \
--data '{
"subscriptions": [
"0195146b-fb77-73b4-bb92-ba8bc2180433",
"0195146c-1a2b-73b4-bb92-ba8bc2180999"
]

Headers

NameDescriptionRequired
X_API_KEYMerchant API key. The merchant is resolved from this key; it is never sent in the path or body.YES
Content-TypeMust be application/json.YES

Body

NameDescriptionRequired
subscriptionsArray of subscription IDs (UUID) to pause. Must contain at least 1 and at most 3000 identifiers. Every identifier must be a valid UUID.YES

Example Response — 202 Accepted

{                  
"requestId": "0195146b-fb77-73b4-bb92-ba8bc2180433",
"operation": "PAUSE",
"acceptedCount": 2
}
FieldDescription
requestIdCorrelation identifier shared by every command published for this request. Use it to trace the operation in the logs. It is not a bulk-job identifier and cannot be queried.
operationThe requested operation: PAUSE.
acceptedCountNumber of subscription commands successfully queued.