Create a subscription
Integrators will use this the create subscription API to create a specific payment plan for a customer. Using the subscription, Ezypay will automatically trigger payment collection depending on the frequency and amount configured in the subscription. By default, what is configured in the PLAN will be inherited by the Subscription. Any similar parameters provided when the subscription is created ("interval", "billingEnd", "billingEndValue") it will overwrite what was setup in the PLAN used. Subscriptions can be created with as PENDING activation or activated instantly. More details on what the Subscription can do can be found in the document below:https://developer.ezypay.com/docs/subscription-payment-scenarios
Headers
Merchant ID
Request body
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
No recorded changes to this endpoint across all 1 revision of this API.