List subscriptions
Changed onGet a list of subscriptions for a specific merchant by customer, status and/or null payment methods. The subscriptions are returned sorted by creation date, with the most recently created subscription appearing first.
By default only 10 record will be listed, if the limit is not set when the API is being triggered.
Request
- Base URLhttps://api-sandbox.ezypay.com/v2
- URLhttps://api-sandbox.ezypay.com/v2/billing/subscriptions
- AuthOAuth 2Client credentialsToken URL: https://identity-sandbox.ezypay.com/token
Query parameters
Auto-generated UUID identifier of the customer.
Filter subscriptions by status. Accepted values are ACTIVE, FUTURE, PENDING, PAST_DUE, PENDING_CANCELLATION, CANCELLED and COMPLETED.
Filter for only subscriptions that have null payment methods. Default value is false.
To paginate a large result set, use the 'limit' argument to limit the number of results returned per page up to a maximum of 100 records. For example, limit = 10 shows results 1-10. The default returned result would be 100.
An cursor for use in pagination. Specify the number of objects to skip to fetch the next page of objects. For example, limit=10 and cursor=10 will show results for record 11 - 20.
Headers
Merchant ID
Response
200
Example response
{
"data": [
{
"id": "9dc406b2-ec31-455d-9997-ccc9fae91064",
"customerId": "c68510ee-cbff-4f02-bc70-4e09b3197fca",
"planId": "c0ad2142-60e1-47e5-9d78-f6b5f1d09d19",
"name": "high_st_monthly_plan",
"status": "ACTIVE",
"startDate": "2020-02-19",
"paymentMethodToken": "5c4ab365-b000-48e6-b14c-eea9e97797f3",
"accountingCode": "customer_plan",
"amount": {
"currency": "AUD",
"value": 200
},
"nextBillingDate": "2020-04-01",
"nextFutureInvoice": {
"subscriptionId": "9dc406b2-ec31-455d-9997-ccc9fae91064",
"date": "2020-04-01",
"cycleStartDate": "2020-04-01",
"cycleEndDate": "2020-04-30",
"items": [
{
"description": "high_st_monthly_plan",
"amount": {
"currency": "AUD",
"value": 200
},
"type": "subscription_payment",
"accountingCode": "customer_plan"
}
],
"amount": {
"currency": "AUD",
"value": 201.24
},
"totalTax": {
"currency": "AUD"
}
},
"interval": 1,
"intervalUnit": "MONTH",
"totalPaid": {
"currency": "AUD",
"value": 200
},
"totalBillingCycles": 1,
"totalPastDue": {
"currency": "AUD"
},
"totalDiscounted": {
"currency": "AUD"
},
"createdOn": "2020-02-18T20:16:16.482",
"autoPayment": true
}
],
"paging": {
"totalCount": 1
}
}Changes
- info
endpoint added
- info