Retrieve a plan

Changed on

Integrators has the flexibility to retrieve a specific plan using the retrieve plan API. The full details of that specific plan will be return using this API endpoint.

get/billing/plans/{planId}

Request

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

Path parameters

planIdstring required

Identifier of the plan to retrieve.

Headers

merchantstring required

Merchant ID

Response

200

idstring
statusstring
namestring
memounknown
accountingCodestring
setupPaymentsunknown
intervalUnitstring
intervalinteger
billingStartstring
billingStartValuestring
billingEndstring
billingEndValueunknown
firstBillingstring
recurringBillingDayunknown
metadataunknown
createdOnstring

Example response

{
  "id": "d35f6384-e5af-4eaf-b4c9-d08511a21921",
  "status": "ACTIVE",
  "name": "high_st_monthly_plan",
  "accountingCode": "customer_plan",
  "amount": {
    "currency": "NZD",
    "value": 200
  },
  "intervalUnit": "MONTH",
  "interval": 1,
  "billingStart": "DAY_OF_MONTH",
  "billingStartValue": "1",
  "billingEnd": "ONGOING",
  "firstBilling": "FULL_AMOUNT",
  "failedPaymentHandling": {
    "initialAction": "STOP",
    "autoRetry": true,
    "retryInDays": 3,
    "maximumFailedAttempts": 4
  },
  "createdOn": "2019-04-01T12:55:04.245"
}

Changes