Neon Commerce Subscriptions API

The Subscriptions API from Neon Commerce — 4 operation(s) for subscriptions.

Operations 4

POST /subscriptions/{subscriptionId}/cancel Cancel a subscription #
POST /subscriptions/{subscriptionId}/update-payment-method Generate a payment method update link #
GET /subscriptions/{subscriptionId} Returns a subscription's details. #
POST /subscriptions Create a subscription #

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/neon-commerce-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 email required.

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

OpenAPI Specification

neon-commerce-subscriptions-api-openapi.yml Raw ↑
openapi: 3.2.0
info:
  title: Subscriptions API
  description: 'The Subscriptions API is used to create and manage subscriptions for your users. It allows you to create subscriptions, cancel them, and retrieve their details. The API is designed to be simple and easy to use, providing a straightforward way to integrate subscription management into your application.

    '
  version: '1'
servers:
- url: https://api.neonpay.com
security:
- EnvironmentApiKey: []
tags:
- name: Subscriptions
paths:
  /subscriptions/{subscriptionId}/cancel:
    post:
      summary: Cancel a subscription
      operationId: cancelSubscription
      description: 'Cancel a subscription.

        '
      parameters:
      - in: path
        name: subscriptionId
        required: true
        schema:
          type: string
          description: The subscription ID to query for
      responses:
        '200':
          description: Subscription canceled successfully
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/SubscriptionResponse'
        '400':
          $ref: '#/components/responses/BadRequest'
      tags:
      - Subscriptions
  /subscriptions/{subscriptionId}/update-payment-method:
    post:
      summary: Generate a payment method update link
      operationId: generateUpdatePaymentMethodUrl
      description: 'Returns a redirect URL where the user can update their subscription''s payment method. The URL expires after 1 hour.

        '
      parameters:
      - in: path
        name: subscriptionId
        required: true
        schema:
          type: string
          description: A valid subscription ID
      requestBody:
        required: false
        content:
          application/json:
            schema:
              type: object
              properties:
                returnUrl:
                  type: string
                  format: uri
                  description: The URL to return to after updating the payment method. It's only used in the embedded flow.
                  example: https://example.com/return
      responses:
        '200':
          description: Success
          content:
            application/json:
              schema:
                type: object
                required:
                - redirectUrl
                - token
                - subscription
                - expiresAt
                properties:
                  redirectUrl:
                    type: string
                    format: uri
                    description: URL to redirect the user to for updating their payment method
                  token:
                    type: string
                    description: 'Single-use token authorizing the payment method update. Already encoded in `redirectUrl` — only needed separately if you''re bypassing the redirect by mounting the update flow with `neon.startEmbeddedSubscriptionUpdatePaymentMethod`.

                      '
                  subscription:
                    type: object
                    required:
                    - token
                    properties:
                      token:
                        type: string
                        description: 'The subscription''s stable path token (same value as on the create response). Pass this as `subscriptionToken` to `neon.startEmbeddedSubscriptionUpdatePaymentMethod` when integrating embedded mode without persisting the token from create time.

                          '
                  expiresAt:
                    type: string
                    format: date-time
                    description: When the redirect URL and token expire
        '400':
          $ref: '#/components/responses/BadRequest'
      tags:
      - Subscriptions
  /subscriptions/{subscriptionId}:
    get:
      summary: Returns a subscription's details.
      description: Can be used to get the status of a particular subscription.
      operationId: getSubscription
      parameters:
      - in: path
        name: subscriptionId
        required: true
        schema:
          type: string
          description: A valid subscription ID
      responses:
        '200':
          description: Returns the subscription object associated with the passed-in ID.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/SubscriptionResponse'
        '400':
          $ref: '#/components/responses/BadRequest'
        '404':
          $ref: '#/components/responses/BadRequest'
      tags:
      - Subscriptions
  /subscriptions:
    post:
      summary: Create a subscription
      operationId: postSubscription
      description: 'Create a subscription. Once the subscription is created, redirect the user to the `returnUrl`.

        '
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              required:
              - sku
              - name
              - price
              - currency
              - imageUrl
              - country
              - accountId
              properties:
                sku:
                  type: string
                  description: Unique subscription SKU
                  example: GOLD-1234
                name:
                  type: string
                  minLength: 1
                  description: Customer-facing subscription name
                  example: Gold Membership
                price:
                  type: integer
                  minimum: 0
                  description: Subscription price, expressed in 100x the base unit of the currency; read more about prices [here](https://docs.neonpay.com/docs/currencies#currencies-in-the-api)
                  example: 9999
                imageUrl:
                  type: string
                  format: uri
                  description: URL for subscription image
                  example: https://example.com/images/gold-membership.png
                currency:
                  type: string
                  description: ISO 4217 currency code
                  example: USD
                  enum:
                  - AED
                  - ALL
                  - AMD
                  - ARS
                  - AUD
                  - BRL
                  - CAD
                  - CLP
                  - CNY
                  - CZK
                  - DKK
                  - EGP
                  - EUR
                  - GBP
                  - GEL
                  - HKD
                  - IDR
                  - ILS
                  - INR
                  - ISK
                  - JPY
                  - KRW
                  - KZT
                  - MAD
                  - MXN
                  - MYR
                  - NGN
                  - NOK
                  - NZD
                  - PEN
                  - PHP
                  - PKR
                  - PLN
                  - RON
                  - RSD
                  - RUB
                  - SAR
                  - SEK
                  - SGD
                  - THB
                  - TRY
                  - TWD
                  - UAH
                  - USD
                  - UYU
                  - UZS
                  - KES
                  - TZS
                  - ZAR
                frequency:
                  type: string
                  default: monthly
                  description: Billing frequency
                  example: monthly
                  enum:
                  - monthly
                accountId:
                  description: 'A unique identifier for the player or account **in your system** who should receive the purchased items. Neon includes this value in fulfillment webhooks so you can credit the correct user.

                    '
                  type: string
                  example: player_987654
                  minLength: 1
                accountDisplayName:
                  type:
                  - string
                  - 'null'
                  description: The display name of the user's account, if available
                returnUrl:
                  type:
                  - string
                  - 'null'
                  format: uri
                  description: URL to redirect to upon completion of the subscription creation flow.
                  example: https://example.com/subscription/return
                storeUrl:
                  type: string
                  format: uri
                  description: The URL of your store
                  example: https://example.com
                externalReferenceId:
                  type:
                  - string
                  - 'null'
                  description: A reference to this transaction, like an internal purchase ID
                  example: e7ec4707-75ee-4fa8-aeb9-57370098ddc5
                locale:
                  type: string
                  description: The user's language, in IETF BCP 47 tag
                  default: en-US
                  example: en-US
                country:
                  type: string
                  description: 'The physical location of the player as an ISO 3166-1 code; also used to derive currency. See [International Support](https://docs.neonpay.com/docs/international), as well as the note in [Subscriptions](https://docs.neonpay.com/docs/subscriptions-beta), for a full list of supported countries.

                    '
                  example: US
                externalMetadata:
                  type:
                  - object
                  - 'null'
                  additionalProperties: true
                  description: 'Arbitrary JSON object for tracking metadata used in analytics and webhooks.

                    DO NOT include sensitive data or authentication tokens.

                    '
      responses:
        '201':
          description: Success
          content:
            application/json:
              schema:
                type: object
                required:
                - subscription
                - redirectUrl
                - token
                properties:
                  redirectUrl:
                    type: string
                  token:
                    type: string
                    description: 'Token identifying this subscription for embedded checkout. Already encoded in `redirectUrl` — only needed separately if you''re bypassing the redirect by mounting the subscription flow with `neon.startEmbeddedSubscription`.

                      '
                  subscription:
                    $ref: '#/components/schemas/SubscriptionResponse'
        '400':
          $ref: '#/components/responses/BadRequest'
      tags:
      - Subscriptions
components:
  responses:
    BadRequest:
      description: Response for bad requests. Should note what in the request was invalid.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/APIError'
  schemas:
    APIError:
      type: object
      required:
      - code
      - message
      properties:
        statusCode:
          type: number
          description: The HTTP response code
          example: 400
        code:
          type: string
          description: An error code that is static and can be used for programmatic error handling
          example: UNHANDLED_ERROR
        message:
          type: string
          description: A human readable description of the error
          example: Could not create a subscription
        errors:
          type: array
          description: A list of more detailed errors about specific errors for specific entities
          items:
            $ref: '#/components/schemas/ErrorDetail'
    ErrorDetail:
      type: object
      required:
      - source
      - message
      properties:
        source:
          type: string
          description: Specific entity that caused this error
          example: subscriptionSku
        message:
          type: string
          description: Human readable description of the error for this entity (defined in `source`)
          example: Subscription not found
    SubscriptionResponse:
      type: object
      required:
      - id
      - sku
      - name
      - price
      - currency
      - status
      - imageUrl
      - country
      - externalReferenceId
      - externalMetadata
      properties:
        id:
          type: string
          description: The ID Of this subscription
          example: 123e4567-e89b-12d3-a456-426614174000
        sku:
          type: string
          description: Unique subscription SKU
          example: GOLD-1234
        name:
          type: string
          minLength: 1
          description: Customer-facing subscription name
          example: Gold Membership
        price:
          type: integer
          minimum: 0
          description: Subscription price, expressed in 100x the base unit of the currency; read more about prices [here](https://docs.neonpay.com/docs/currencies#currencies-in-the-api)
          example: 9999
        currency:
          type: string
          description: ISO 4217 currency code
          example: USD
          enum:
          - AED
          - ALL
          - AMD
          - ARS
          - AUD
          - BRL
          - CAD
          - CLP
          - CNY
          - CZK
          - DKK
          - EGP
          - EUR
          - GBP
          - GEL
          - HKD
          - IDR
          - ILS
          - INR
          - ISK
          - JPY
          - KRW
          - KZT
          - MAD
          - MXN
          - MYR
          - NGN
          - NOK
          - NZD
          - PEN
          - PHP
          - PKR
          - PLN
          - RON
          - RSD
          - RUB
          - SAR
          - SEK
          - SGD
          - THB
          - TRY
          - TWD
          - UAH
          - USD
          - UYU
          - UZS
          - KES
          - TZS
          - ZAR
        status:
          type: string
          description: Current status of the subscription
          enum:
          - active
          - inactive
          - pending_cancellation
          - canceled
          - expired
          example: active
        frequency:
          type: string
          default: monthly
          description: Billing frequency for the subscription
          example: monthly
          enum:
          - monthly
        accountId:
          description: 'A unique identifier for the player or account **in your system** who should receive the purchased items. Neon includes this value in fulfillment webhooks so you can credit the correct user.

            '
          type: string
          example: player_987654
          minLength: 1
        accountDisplayName:
          type:
          - string
          - 'null'
          description: 'Public-facing account name. Could be:

            * Gamertag (e.g., "GreatGamer123")

            * Real name (e.g., "John Smith")

            '
          example: GreatGamer123
        imageUrl:
          type: string
          format: uri
          description: URI for subscription image
          example: https://example.com/images/gold-membership.png
        externalReferenceId:
          type:
          - string
          - 'null'
          description: Optional UUID for external reference tracking
          example: e7ec4567-e89b-12d3-a456-426614174000
        externalMetadata:
          type:
          - object
          - 'null'
          additionalProperties: true
          description: 'Arbitrary JSON object for tracking metadata used in analytics and webhooks.

            `null` if no metadata was supplied when the subscription was created.

            DO NOT include sensitive data or authentication tokens.

            '
        locale:
          type: string
          description: IETF BCP 47 language tag
          default: en-US
          example: en-US
        country:
          type: string
          description: Player country
  securitySchemes:
    EnvironmentApiKey:
      type: apiKey
      in: header
      name: X-Api-Key
      description: 'Your Environment API key, scoped to a particular environment. Sandbox keys are prefixed with `pk_sandbox_`;

        production keys are prefixed with `pk_`. Find your keys in the Neon dashboard.

        '