Activate a subscription

Changed on
put/billing/subscriptions/{subscriptionId}/activate

Request

  • Base URL
    https://api-sandbox.ezypay.com/v2
  • URL
    https://api-sandbox.ezypay.com/v2/billing/subscriptions/{subscriptionId}/activate
  • Auth
    OAuth 2
    Client credentials
    Token URL: https://identity-sandbox.ezypay.com/token

Path parameters

subscriptionIdstring required

Auto-generated unique identifier of the subscription.

Headers

merchantstring required

Merchant ID

Request body

startDatestring

The preferred start date of the subscription. The subscription start date cannot be back-dated. If not specified, the subscription will follow the start date of the subscription's plan. An invoice will be generated immediately upon activation if the start date equals today's date.

paymentMethodTokenstring

The payment method token that is generated by the vault.

Response

200

idstring
customerIdstring
planIdstring
namestring
statusstring
startDatestring
endDateunknown
paymentMethodTokenstring
accountingCodestring
nextBillingDatestring
nextFutureInvoiceunknown
intervalinteger
intervalUnitstring
totalBillingCyclesinteger
remainingToPayunknown
remainingBillingCyclesunknown
endTargetAmountunknown
endTargetBillingCyclesunknown
cancelledDateunknown
failedPaymentHandlingunknown
failedAttemptsCountinteger
metadataunknown
createdOnstring
autoPaymentboolean
setupPaymentsunknown

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-07-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