---
updatedAt: 2026-08-07T22:09:02.000Z
agentTools:
  projectIndex: https://developer-docs.rivo.io/llms.txt
---

# Cancel a customer's membership

Cancel a customer's membership

### Cancel a Membership from the Storefront

If you want customers to cancel their own membership right from your theme, you can call our app-proxy endpoint. It only works for the customer who’s currently logged in.

```
fetch(`${window.Rivo.loy_config.api_endpoint}/membership/cancel_subscription`, {
  method: 'POST',
  body: {}
})
.then(response => response.json())
.then(data => {
  console.log(data);
})
```

This is handy if you're building your own cancellation flow or dropping the action into an account page or settings modal. For anything else, please use the API below.

# OpenAPI definition

```json
{
  "openapi": "3.0.0",
  "info": {
    "title": "Rivo Developer API",
    "description": "Extensibility to suit your needs",
    "termsOfService": "https://www.rivo.io/terms",
    "contact": {
      "email": "developers@rivo.io",
      "url": "https://developers.rivo.io"
    },
    "version": "0.0.1"
  },
  "tags": [
    {
      "name": "memberships",
      "description": "Operations about memberships"
    }
  ],
  "paths": {
    "/v1/memberships/{customer_identifier}/cancel": {
      "delete": {
        "summary": "Cancel a customer's membership",
        "description": "Cancel a customer's membership",
        "parameters": [
          {
            "in": "header",
            "name": "Authorization",
            "description": "Merchant Auth Token",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "path",
            "name": "customer_identifier",
            "description": "Shopify Customer ID or Email",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "cancellation_policy",
            "description": "When to cancel the membership",
            "required": false,
            "schema": {
              "type": "string",
              "enum": [
                "immediate",
                "end_of_period"
              ]
            }
          }
        ],
        "responses": {
          "204": {
            "description": "Cancel a customer's membership"
          }
        },
        "tags": [
          "memberships"
        ],
        "operationId": "cancel-customer-membership"
      }
    }
  },
  "servers": [
    {
      "url": "//developer-api.rivo.io/merchant_api"
    }
  ]
}
```