Retrieve a subscription
Changed onIntegrators can retrieve a specific Subscription using the unique Ezypay subscription Id. The current status and details of the subscription will be return in the payload (status, customerid, paymentMethodToken).
Integrators are able to retrieve details such as the "nextBillingDate", "remainingToPay" and "totalPastDue" amount will be displayed on the subscription payload.
get/billing/subscriptions/{subscriptionId}
Request
- Base URLhttps://api-sandbox.ezypay.com/v2
- URLhttps://api-sandbox.ezypay.com/v2/billing/subscriptions/{subscriptionId}
- AuthOAuth 2Client credentialsToken URL: https://identity-sandbox.ezypay.com/token
Path parameters
subscriptionIdstring required
Auto-generated unique identifier of the subscription.
Headers
merchantstring required
Merchant ID
Response
200
Example response
{
"id": "fef9bef0-2081-445d-8a4e-b50a5d9eb2b7",
"customerId": "4c999653-9473-472e-b478-d56d2a7572a9",
"planId": "d35f6384-e5af-4eaf-b4c9-d08511a21921",
"name": "high_st_monthly_plan",
"status": "ACTIVE",
"startDate": "2019-04-01",
"paymentMethodToken": "d178cea3-fdf9-4743-90d8-856af429ab18",
"accountingCode": "customer_plan",
"amount": {
"currency": "NZD",
"value": 200
},
"nextBillingDate": "2019-06-01",
"interval": 1,
"intervalUnit": "MONTH",
"totalPaid": {
"currency": "NZD",
"value": 400
},
"totalBillingCycles": 2,
"totalPastDue": {
"currency": "NZD"
},
"totalDiscounted": {
"currency": "NZD"
},
"createdOn": "2019-03-31T23:55:11.708",
"autoPayment": true
}Changes
- info
endpoint added
- info