Create a subscription
Changed onpost/billing/subscriptions
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
Headers
merchantstring required
Merchant ID
Request body
Example request
{
"billingStartValue": "15",
"billingEndValue": "12"
}Response
200
Example response
{
"id": "f1de945f-df84-4108-9dee-e8fd8508fa2e",
"customerId": "55220ffc-bc5a-4f50-adaf-fa58c061ebd1",
"planId": "8ff2e3ea-aaa9-4978-8e2a-319d67e8f302",
"name": "high_st_monthly_plan",
"status": "ACTIVE",
"startDate": "2019-03-11",
"paymentMethodToken": "8dbf38bf-81c6-40d6-be1f-6aa80736d5bb",
"accountingCode": "customer_plan",
"amount": {
"currency": "NZD",
"value": 200
},
"nextBillingDate": "2019-05-01",
"nextFutureInvoice": {
"subscriptionId": "f1de945f-df84-4108-9dee-e8fd8508fa2e",
"date": "2019-05-01",
"cycleStartDate": "2019-05-01",
"cycleEndDate": "2019-05-31",
"items": [
{
"description": "high_st_monthly_plan",
"amount": {
"currency": "NZD",
"value": 200
},
"type": "subscription_payment",
"accountingCode": "customer_plan"
}
],
"amount": {
"currency": "NZD",
"value": 201.24
},
"totalTax": {
"currency": "NZD"
}
},
"interval": 1,
"intervalUnit": "MONTH",
"totalPaid": {
"currency": "NZD",
"value": 200
},
"totalBillingCycles": 1,
"totalPastDue": {
"currency": "NZD"
},
"totalDiscounted": {
"currency": "NZD"
},
"createdOn": "2019-03-10T20:11:08.192",
"autoPayment": true
}Changes
- breaking
the
request property type changed fromobjecttoarray - warning
removed the request property
/ - warning
removed the request property
/ - warning
removed the request property
/ - warning
removed the request property
/ - info
added the new optional request property
- info
added the new optional request property
- breaking