List all subscription payments

Returns a paginated list of your subscription payments. The subscription payments are sorted in order, with the most recent payments appearing first.

GET/v1/subscription-payments/

Authorization

api_key_auth
AuthorizationBearer <token>

API key authentication. Use "Bearer YOUR_API_KEY" format.

In: header

Query Parameters

subscriptionIdstring

Unique identifier. Must be in BSON ObjectId format.

^[0-9a-fA-F]{24}$

customerIdstring

Unique identifier. Must be in BSON ObjectId format.

^[0-9a-fA-F]{24}$

pageIdstring

Unique identifier. Must be in BSON ObjectId format.

^[0-9a-fA-F]{24}$

paymentStatusstring
succeededpendingfailedincomplete
paidstring
truefalse
refundedstring
truefalse
billingReasonstring
manualsubscription_createsubscription_cyclesubscription_thresholdsubscription_updateupcoming
createdAfterstring

date-time

createdBeforestring

date-time

livemodestring

Set to false to return test-mode records created while a page was in test mode. Defaults to the mode of the API key. Test API keys can only read test data.

truefalse
limitstring

The number of results per page. Minimum value is 1 and maximum is 100. Defaults to 20.

starting_afterstring

A cursor value specifying the id of a resource to start before. Retrieves items that appear after this cursor in the list. Cannot be used together with ending_before.

^[0-9a-fA-F]{24}$

ending_beforestring

A cursor value specifying the id of a resource to end after. Retrieves items that appear before this cursor in the list. Cannot be used together with starting_after.

^[0-9a-fA-F]{24}$

Returns

Subscription payments retrieved successfully

    • idstring

      Unique identifier for the subscription payment

    • subscriptionId?string

      ID of the subscription this payment belongs to

    • customerId?string

      ID of the customer

    • pageId?string

      ID of the page the subscription was bought on. A sale made through your store carries an ID that is not a checkout page in the API.

    • storeId?string

      ID of the store it was sold in. Absent for a sale made outside a store. Match this to find everything a store sold.

    • productId?string

      ID of the product

    • sellerId?string

      ID of the seller

    • transactionIds?string[]

      IDs of the transactions associated with this payment

    • customerEmail?string

      Email of the customer at time of payment

    • customerName?string

      Name of the customer at time of payment

    • productTitle?string

      Title of the product at time of payment

    • pageSlug?string

      Slug of the page at time of payment

    • currency?string

      ISO 4217 currency code (lowercase)

    • amountnumber

      Amount in the smallest unit of the currency

    • amountUsd?number

      Amount converted to USD (smallest unit)

    • What this payment added to cover the processing fee, when the customer chose to at checkout. Already inside amount.

    • livemode?boolean

      true for live charges, false for test mode

    • paymentStatus?string
      succeededpendingfailedincomplete
    • invoiceStatus?string
      draftopenpaiduncollectiblevoid
    • paid?boolean
    • refunded?boolean
    • partiallyRefunded?boolean
    • billingReason?string
      manualsubscription_createsubscription_cyclesubscription_thresholdsubscription_updateupcoming
    • stripeSubscriptionId?string
    • stripePaymentId?string
    • stripePaymentIntentId?string
    • stripeInvoiceId?string
    • stripeInvoicePdf?string
    • stripeRefundInvoicePdf?string
    • createdAtstring

      date-time

    • updatedAtstring

      date-time

  • totalnumber

    Total number of records matching the query across all pages.

  • has_moreboolean

    Whether more records exist beyond the current page.

Bad request - Invalid request parameters

  • statusstring

    Indicates the request failed.

    error
  • typestring

    Machine-readable error category.

  • messagestring

    Human-readable error message.

  • Optional validation details for invalid requests.

Unauthorized - Missing or invalid API key

  • statusstring

    Indicates the request failed.

    error
  • typestring

    Machine-readable error category.

  • messagestring

    Human-readable error message.

  • Optional validation details for invalid requests.

Forbidden - Insufficient permissions or validation error

  • statusstring

    Indicates the request failed.

    error
  • typestring

    Machine-readable error category.

  • messagestring

    Human-readable error message.

  • Optional validation details for invalid requests.

Rate Limit Exceeded - Please try again later.

  • messagestring

    Human-readable error message.

Internal server error

  • statusstring

    Indicates the request failed.

    error
  • typestring

    Machine-readable error category.

  • messagestring

    Human-readable error message.

  • Optional validation details for invalid requests.

import { createCheckoutPageClient } from '@checkoutpage/sdk';const checkoutpage = createCheckoutPageClient({  apiKey: process.env.CHECKOUTPAGE_API_KEY!,});const response = await checkoutpage.subscriptionPayments.list();
{
  "data": [
    {
      "id": "507f1f77bcf86cd799439011",
      "subscriptionId": "65f4a1c2e4a9f3d2b1c0a9e8",
      "customerId": "65f4a1c2e4a9f3d2b1c0a9e8",
      "pageId": "65f4a1c2e4a9f3d2b1c0a9e8",
      "storeId": "string",
      "productId": "65f4a1c2e4a9f3d2b1c0a9e8",
      "sellerId": "65f4a1c2e4a9f3d2b1c0a9e8",
      "transactionIds": [
        "65f4a1c2e4a9f3d2b1c0a9e8"
      ],
      "customerEmail": "string",
      "customerName": "string",
      "productTitle": "string",
      "pageSlug": "string",
      "currency": "usd",
      "amount": 0,
      "amountUsd": 0,
      "processingFeeContribution": {
        "name": "string",
        "amount": 0
      },
      "livemode": true,
      "paymentStatus": "succeeded",
      "invoiceStatus": "draft",
      "paid": true,
      "refunded": true,
      "partiallyRefunded": true,
      "billingReason": "manual",
      "paymentMethod": {
        "gateway": "stripe",
        "method": "string",
        "wallet": "string",
        "mode": "default",
        "brand": "string",
        "last4": "string",
        "country": "string",
        "expMonth": 0,
        "expYear": 0,
        "funding": "string"
      },
      "stripeSubscriptionId": "string",
      "stripePaymentId": "string",
      "stripePaymentIntentId": "string",
      "stripeInvoiceId": "string",
      "stripeInvoicePdf": "string",
      "stripeRefundInvoicePdf": "string",
      "createdAt": "2019-08-24T14:15:22Z",
      "updatedAt": "2019-08-24T14:15:22Z"
    }
  ],
  "total": 0,
  "has_more": true
}
{
  "status": "error",
  "type": "ValidationError",
  "message": "Bad request - Invalid body: Field 'email' must be a valid email address",
  "errors": [
    {
      "param": "email",
      "message": "must be a valid email address"
    }
  ]
}
{
  "status": "error",
  "type": "error",
  "message": "Missing or invalid API key"
}
{
  "status": "error",
  "type": "error",
  "message": "Insufficient permissions requires: BOOKINGS_WRITE"
}
{
  "message": "API key rate limit exceeded. Please try again later."
}
{
  "status": "error",
  "type": "error",
  "message": "Internal server error"
}