Bag is live — accept USDC & card payments globally. Get started →
BagBag Docs
API ReferenceSubscriptions

Update Subscription

PATCH /api/subscriptions — Cancel, pause, or resume a subscription.

Cancel, pause, or resume a subscription.

PATCH
/api/subscriptions
AuthorizationBearer <token>

API key authentication for programmatic access. Include your key in the Authorization header:

Authorization: Bearer bag_live_sk_a1b2c3d4e5f6...

Keys are prefixed with bag_live_sk_ (production) or bag_test_sk_ (sandbox). Generate keys from the Bag Dashboard.

In: header

Request Body

application/json

Response Body

application/json

application/json

application/json

application/json

curl -X PATCH "https://getbags.app/api/subscriptions" \  -H "Content-Type: application/json" \  -d '{    "subscriptionId": "d079718b-ff63-45dd-947b-4950c023750f",    "action": "cancel"  }'
{
  "status": "success",
  "data": {
    "subscriptionId": "d079718b-ff63-45dd-947b-4950c023750f",
    "status": "trialing",
    "cancelAtPeriodEnd": true
  }
}
{
  "status": "error",
  "message": "amount: Amount must be a positive number up to 999,999,999.99; network: Invalid enum value",
  "code": "BAD_REQUEST"
}
{
  "status": "error",
  "message": "Invalid or revoked API key",
  "code": "UNAUTHORIZED",
  "hint": "Include a valid API key in the Authorization header: Bearer bag_live_sk_..."
}
{
  "status": "error",
  "message": "Not found",
  "code": "NOT_FOUND"
}