Subscription - Pause Subscription

POST /subscriptions/{subscription_id}/pause

Pause a subscription.

Example (cURL)

Pause subscription (cURL)
curl --request POST \
  --url https://sandbox.hyperswitch.io/subscriptions/{subscription_id}/pause \
  --header 'Content-Type: application/json' \
  --header 'X-Profile-Id: <x-profile-id>' \
  --header 'api-key: <api-key>' \
  --data '
{
  "pause_option": "immediately"
}
'

Success response (200)

{
  "id": "<string>",
  "status": "active",
  "profile_id": "<string>",
  "merchant_id": "<string>",
  "customer_id": "<string>",
  "merchant_reference_id": "<string>",
  "paused_at": "<string>"
}

Authorizations

  • api-key (string, header) — required Use the API key created under your merchant account from the HyperSwitch dashboard. API key is used to authenticate API requests from your merchant server only. Don't expose this key on a website or embed it in a mobile application.

Headers

  • X-Profile-Id (string) — required Profile ID for authentication

Path parameters

  • subscription_id (string) — required The unique identifier for the subscription

Request body

Content-Type: application/json

Request payload for pausing a subscription.

  • pause_option (enum) — required Available options:

    • immediately

    • end_of_term

    • specific_date

  • pause_at (string | null) — optional Optional date when the subscription should be paused (if not provided, pauses immediately)

Response fields

  • id (string) — required A type for subscription_id that can be used for subscription ids

  • status (enum) — required Possible states of a subscription lifecycle. Available options:

    • active

    • created

    • in_active

    • pending

    • trial

    • paused

    • unpaid

    • onetime

    • cancelled

    • failed

  • profile_id (string) — required A type for profile_id that can be used for business profile ids

  • merchant_id (string) — required A type for merchant_id that can be used for merchant ids

  • customer_id (string) — required A type for customer_id that can be used for customer ids

  • merchant_reference_id (string | null) Merchant specific unique identifier.

  • paused_at (string | null) Date when the subscription was paused


Suggest edits: https://github.com/juspay/hyperswitch/edit/main/api-reference/v1/subscriptions/pause.mdx Raise issue: https://github.com/juspay/hyperswitch/issues/new?title=Issue%20on%20docs&body=Path:%20/v1/subscriptions/pause

Related:

  • Subscription - Get Estimate: https://api-reference.hyperswitch.io/v1/subscriptions/estimate

  • Subscription - Resume Subscription: https://api-reference.hyperswitch.io/v1/subscriptions/resume