Preview a subscription
Changed onIntegrators can use this API Endpoint to generate a preview to ensure the subscription created is correct before calling the "Create Subscription API".
post/billing/subscriptions/preview
Request
- Base URLhttps://api-sandbox.ezypay.com/v2
- URLhttps://api-sandbox.ezypay.com/v2/billing/subscriptions/preview
- AuthOAuth 2Client credentialsToken URL: https://identity-sandbox.ezypay.com/token
Headers
merchantstring required
Merchant ID
Request body
Example request
{
"billingStartValue": "15",
"billingEndValue": "12"
}Response
200
Example response
{
"data": [
{
"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
}
],
"paging": {
"totalCount": 1
}
}Changes
- info
endpoint added
- info