Skip to content
payrocdevelopers

List subscriptions

Browse API reference

GET/processing-terminals/{processingTerminalId}/subscriptionslistSubscriptions

Use this method to return a paginated list of subscriptions.

Note: If you want to view the details of a specific subscription and you have its subscriptionId, use our Retrieve subscription method.

Use query parameters to filter the list of results that we return, for example, to search for subscriptions for a customer, a payment plan, or frequency.

Our gateway returns information about the following for each subscription in the list:

  • Payment plan the subscription is linked to.
  • Secure token that represents cardholder’s payment details.
  • Current state of the subscription, including its status, next due date, and invoices.
  • Fees for setup and the cost of the recurring order.
  • Subscription length, end date, and frequency.

For each subscription, we also return the subscriptionId, the paymentPlanId, and the secureTokenId, which you can use to perform follow-actions.

Parameters

NameInTypeDescription
processingTerminalIdRequiredpathstring

Unique identifier that we assigned to the terminal.

customerNamequerystring

Filter by the customer's name.

last4querystring

Filter by the last four digits of the card or account number.

paymentPlanquerystring

Filter by the name of the payment plan.

frequencyquerystring

Filter by the frequency of subscription payments.

statusquerystring

Filter by the current status of the subscription.

endDatequerystring

Format: YYYY-MM-DD
Filter subscriptions that end on a specific date.

nextDueDatequerystring

Format: YYYY-MM-DD
Filter subscriptions by the date that the next payment is collected.

beforequerystring

Return the previous page of results before the value that you specify.

You can’t send the before parameter in the same request as the after parameter.

afterquerystring

Return the next page of results after the value that you specify.

You can’t send the after parameter in the same request as the before parameter.

limitqueryinteger

Limit the maximum number of results that we return for each page.

Responses

Successful request. Returns a paginated list of subscriptions.

200 OK · application/json
{
  "count": 0,
  "data": [],
  "hasMore": false,
  "limit": 10,
  "links": []
}
Response schema · 46 of 74 fields
  • countintegerrequired
    Number of results we returned on this page. Note: This might not be the total number of results that match your query.
  • hasMorebooleanrequired
    Indicates whether there is another page of results available.
  • limitintegerrequired
    Maximum number of results that we return for each page.
  • linksobject[]
    Reference links to navigate to the previous page of results or to the next page of results.
    • hrefstringrequired
      URL of the target resource.
    • methodstringrequired
      HTTP method that you need to use with the target resource.
    • relstringrequired
      Indicates the relationship between the current resource and the target resource.
  • dataobject[]required
    Array of subscriptions.
    • currencystringrequired
      Currency of the transaction. The value for the currency follows the ISO 4217 standard.AEDAFNALLAMDANGAOAARSAUD+163 more
    • currentStateobjectrequired
      A snapshot of the subscription's current state.
      • nextDueDatestringdate
        Date that the merchant collects the next payment.
      • outstandingInvoicesintegerint32
        Number of payments until the end of the subscription. Our gateway returns a value for outstandingInvoices only if the subscription has an end date or a fixed number of billing cycles.≥ 0
      • paidInvoicesintegerint32required
        Number of payments that the merchant has collected.≥ 0
      • statusstringrequired
        Status of the Subscription. 'active' - Subscription is active. 'completed' - Subscription has reached the end date or the total number of billing cycles. 'cancelled' - Merchant deactivated the subscription. 'suspended' - Subscription is suspended. For example, if the customer misses payments.activecompletedsuspendedcancelled
    • customFieldsobject[]
      Array of customField objects.
      • namestringrequired
        Name of the custom field.1–56 chars
      • valuestringrequired
        Value for the custom field.1–100 chars
    • descriptionstring
      Description of the subscription.1–128 chars
    • endDatestringdate
      Format: YYYY-MM-DD Subscription's end date. Note: If you provide values for both length and endDate, our gateway uses the value for endDate to determine when the subscription should end.
    • frequencystringrequired
      Indicates how often the merchant or the terminal collects a payment from the customer.weeklyfortnightlymonthlyquarterlyyearly
    • lengthintegerint32
      Total number of billing cycles. To indicate that the subscription should run indefinitely, send a value of 0. This value replaces the length inherited from the payment plan. Note: If you provide values for both length and endDate, our gateway uses the value for endDate to determine when the subscription should end.≥ 0
    • namestringrequired
      Name of the subscription.5–128 chars
    • pauseCollectionForintegerint32
      Number of billing cycles that the merchant wants to pause payments for. For example, if the merchant wants to offer a free trial period.≥ 0
    • paymentPlanobjectrequired
      • linkobject
        Object that contains HATEOAS links for the resource.+3 more fields at deeper levels — see the full spec
      • namestringrequired
        Name of the payment plan.5–128 chars
      • paymentPlanIdstringrequired
        Unique identifier that the merchant assigns to the payment plan.1–48 chars
    • processingTerminalIdstringrequired
      Unique identifier of the terminal that the subscription is linked to.4–50 chars
    • recurringOrderobject
      Object that contains information about the cost of each payment.
      • amountintegerint64
        Total amount for the transaction. The value is in the currency's lowest denomination, for example, cents.<br/> <br/>Important: Do not add the surcharge to the amount parameter in the request. If the transaction is eligible for surcharging, our gateway adds the surcharge to the amount in the request, and then returns the updated amount in the response.
      • descriptionstring
        Description of the transaction.1–1024 chars
      • breakdownobject
        Object that contains information about the surcharge and taxes that apply to the transaction.+11 more fields at deeper levels — see the full spec
    • secureTokenobjectrequired
      Object that contains information about the secure token.
      • customerNamestringrequired
        Customer's name.1–50 chars
      • linkobject
        Object that contains HATEOAS links for the resource.+3 more fields at deeper levels — see the full spec
      • secureTokenIdstringrequired
        Unique identifier that the merchant assigned to the secure token.1–200 chars
      • statusstringrequired
        Status of the customer's bank account. The processor performs a security check on the customer's bank account and returns the status of the account. Note: Depending on the merchant's account settings, this feature may be unavailable.notValidatedcvvValidatedvalidationFailedissueNumberValidatedcardNumberValidatedbankAccountValidated
      • tokenstringrequired
        Token that the merchant can use in future transactions to represent the customer's payment details. The token: Begins with the six-digit identification number 296753. Contains up to 12 digits. Contains a single check digit that we calculate using the Luhn algorithm.12–19 chars
    • setupOrderobject
      Object that contains information about the initial cost that a customer pays to set up the subscription.
      • amountintegerint64
        Total amount for the transaction. The value is in the currency's lowest denomination, for example, cents.<br/> <br/>Important: Do not add the surcharge to the amount parameter in the request. If the transaction is eligible for surcharging, our gateway adds the surcharge to the amount in the request, and then returns the updated amount in the response.≤ 999999999999
      • descriptionstring
        Description of the transaction.1–1024 chars
      • orderIdstring
        Unique identifier that the merchant assigns to the transaction.1–24 chars
      • breakdownobject
        Object that contains information about the surcharge and taxes that apply to the transaction.+11 more fields at deeper levels — see the full spec
    • startDatestringdaterequired
      Format: YYYY-MM-DD Subscription's start date.
    • subscriptionIdstringrequired
      Unique identifier that the merchant assigned to the subscription.1–48 chars
    • typestringrequired
      How the merchant takes the payment from the customer’s account. manual – The merchant manually collects payments from the customer. automatic – The terminal automatically collects payments from the customer.manualautomatic

Used in workflows

Search documentation

API reference169
Guides118
Knowledge38
legal1
Solutions32
Workflows74
↑↓highlight↵openView all search results

Menu

Theme

Sign out

Your saved plans remain in your organization. This browser’s private draft and account view will be cleared.

Talk to an engineer