ZeroSettle Subscriptions API

Manage subscription lifecycle (cancel, pause, resume)

Operations 4

POST /iap/subscriptions/cancel Cancel Subscription #
POST /iap/subscriptions/pause Pause Subscription #
POST /iap/subscriptions/resume Resume Subscription #
POST /iap/customer-portal-sessions Create Customer Portal Session #

Work with this as data

Every API here is available over the APIs.io API and to AI agents over MCP.

MCP server

One button, every client — Claude, Cursor, VS Code and the rest.

https://apis.io/mcp

Tools for apis

7 MCP tools reach this
  • find_apisBrowse and filter every API in the catalog.
  • get_api_artifactsOne API's artifacts, grouped by type.
  • get_openapiThe primary OpenAPI for this API.
  • find_similar_apisAPIs that look like this one.
  • apis_io_searchSTART HERE — APIs, providers and tags for one query, each with its total.
  • resolveTurn a domain, URL or GitHub org into the provider it belongs to.
  • find_cohortsEvery scored population of providers in the catalog.
All 92 tools →

Call it yourself

curl for this page
This API
curl "https://apis.io/api/v1/apis/zerosettle-subscriptions-api"
All apis
curl "https://apis.io/api/v1/apis?limit=25"

Discovery needs no key. Ratings and market analysis are Pro.

Get an API key

Free tier, no form to fill in. Signing in shares your email address with us — we store it to create your key and to recognise you if you sign in with another provider. See our Privacy Policy and Terms.

A second provider on the same verified email joins the account you already have.

OpenAPI Specification

zerosettle-subscriptions-api-openapi.yml Raw ↑
openapi: 3.2.0
info:
  title: ZeroSettle IAP Cancel Flow Subscriptions API
  description: The ZeroSettle IAP API powers the iOS, Android, and Flutter SDKs. It enables product catalog fetching, web checkout, entitlement management, subscription lifecycle operations, and StoreKit transaction syncing. All endpoints are authenticated via the `X-ZeroSettle-Key` header.
  version: 1.0.0
  contact:
    name: ZeroSettle Support
    email: support@zerosettle.io
    url: https://zerosettle.io
servers:
- url: https://api.zerosettle.io/v1
  description: Production
security:
- ApiKeyAuth: []
tags:
- name: Subscriptions
  description: Manage subscription lifecycle (cancel, pause, resume)
paths:
  /iap/subscriptions/cancel:
    post:
      operationId: cancelSubscription
      summary: Cancel Subscription
      description: 'Cancels a user''s active web checkout subscription. By default, access continues until the end of the current billing period (`immediate: false`). Set `immediate: true` to revoke access immediately.'
      tags:
      - Subscriptions
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              required:
              - user_id
              properties:
                user_id:
                  type: string
                  description: The user's external ID.
                product_id:
                  type: string
                  description: Specific product to cancel. If omitted, cancels the user's active subscription.
                immediate:
                  type: boolean
                  default: false
                  description: If `true`, cancels immediately and revokes access. If `false`, cancels at end of billing period.
      responses:
        '200':
          description: Subscription cancelled
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/CancelResponse'
        '400':
          $ref: '#/components/responses/BadRequest'
        '401':
          $ref: '#/components/responses/Unauthorized'
        '404':
          $ref: '#/components/responses/NotFound'
  /iap/subscriptions/pause:
    post:
      operationId: pauseSubscription
      summary: Pause Subscription
      description: Pauses a user's active web checkout subscription. The subscription will automatically resume after the pause duration expires.
      tags:
      - Subscriptions
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              required:
              - user_id
              properties:
                user_id:
                  type: string
                  description: The user's external ID.
                product_id:
                  type: string
                  description: Specific product to pause. If omitted, pauses the user's active subscription.
                pause_duration_days:
                  type: integer
                  description: Number of days to pause the subscription. If omitted, uses the default configured in the cancel flow.
      responses:
        '200':
          description: Subscription paused
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/PauseResponse'
        '400':
          $ref: '#/components/responses/BadRequest'
        '401':
          $ref: '#/components/responses/Unauthorized'
        '404':
          $ref: '#/components/responses/NotFound'
  /iap/subscriptions/resume:
    post:
      operationId: resumeSubscription
      summary: Resume Subscription
      description: Resumes a previously paused web checkout subscription.
      tags:
      - Subscriptions
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              required:
              - user_id
              properties:
                user_id:
                  type: string
                  description: The user's external ID.
                product_id:
                  type: string
                  description: Specific product to resume. If omitted, resumes the user's paused subscription.
      responses:
        '200':
          description: Subscription resumed
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ResumeResponse'
        '400':
          $ref: '#/components/responses/BadRequest'
        '401':
          $ref: '#/components/responses/Unauthorized'
        '404':
          $ref: '#/components/responses/NotFound'
  /iap/customer-portal-sessions:
    post:
      operationId: createCustomerPortalSession
      summary: Create Customer Portal Session
      description: Creates a Stripe Customer Portal session URL. The portal lets users manage their subscriptions, update payment methods, and view billing history.
      tags:
      - Subscriptions
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              required:
              - user_id
              properties:
                user_id:
                  type: string
                  description: The user's external ID.
                return_url:
                  type: string
                  description: URL to redirect the user to after they leave the portal.
      responses:
        '200':
          description: Portal session created
          content:
            application/json:
              schema:
                type: object
                properties:
                  portal_url:
                    type: string
                    description: URL to redirect the user to the Stripe Customer Portal.
        '400':
          $ref: '#/components/responses/BadRequest'
        '401':
          $ref: '#/components/responses/Unauthorized'
        '404':
          $ref: '#/components/responses/NotFound'
components:
  responses:
    BadRequest:
      description: Invalid request -- missing or malformed parameters.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
    NotFound:
      description: Resource not found.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
    Unauthorized:
      description: Invalid or missing API key.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
  schemas:
    ResumeResponse:
      type: object
      description: Response from resuming a subscription.
      properties:
        status:
          type: string
          description: Result status.
        resumed_at:
          type: string
          format: date-time
          description: When the subscription was resumed.
    Error:
      type: object
      description: Error response.
      properties:
        error:
          type: string
          description: Human-readable error message.
        code:
          type: string
          description: Machine-readable error code (not always present).
      required:
      - error
    CancelResponse:
      type: object
      description: Response from cancelling a subscription.
      properties:
        status:
          type: string
          description: Result status.
        cancelled_at:
          type: string
          format: date-time
          description: When the cancellation was processed.
        access_until:
          type: string
          format: date-time
          description: When the user will lose access (end of billing period for non-immediate cancellations).
    PauseResponse:
      type: object
      description: Response from pausing a subscription.
      properties:
        status:
          type: string
          description: Result status.
        paused_at:
          type: string
          format: date-time
          description: When the subscription was paused.
        resumes_at:
          type: string
          format: date-time
          description: When the subscription will automatically resume.
  securitySchemes:
    ApiKeyAuth:
      type: apiKey
      in: header
      name: X-ZeroSettle-Key
      description: Your publishable API key. Use `zs_pk_test_*` for sandbox or `zs_pk_live_*` for production.