Create a partner subscription

Changed on

Partner subscriptions provides the means for partner merchants to collect payments from another merchant on a recurring basis. Before creating a partner subscription, you must have a merchant connection with the merchant that will subscribe to the partner subscription.

post/partnersubscriptions

Request

  • Base URL
    https://api-sandbox.ezypay.com/v2
  • URL
    https://api-sandbox.ezypay.com/v2/partnersubscriptions
  • Auth
    OAuth 2
    Client credentials
    Token URL: https://identity-sandbox.ezypay.com/token

Headers

merchantstring required

Merchant ID

Request body

partnerPlanIdstring required

Auto-generated unique identifier of the partner plan.

recipientIdstring required

Auto-generated unique identifier of the merchant that will subscribe and make payments to the subscription.

startDatestring

The preferred start date of the partner subscription. The partner subscription start date cannot be back-dated. The default value follows the partner plan's start date. Supported format is YYYY-MM-DD.

metadataobject

Store additional data about the partner subscription object using key/value pairs format. Max of 40 characters for key name and 255 characters for key value.

Response

200

idstring
partnerPlanIdstring
namestring
statusstring
accountingCodestring
intervalUnitstring
intervalinteger
intervalDayTypestring
endTypestring
startDatestring
endDateunknown
nextBillingDatestring
merchantConnectionIdstring
endTargetBillingCyclesinteger
totalBillingCyclesinteger
remainingBillingCyclesinteger
createdOnstring
cancellationDateunknown
setupPaymentsunknown

Example response

{
  "id": "315107b6-e341-45c6-ad47-8d0bce9e0b25",
  "partnerPlanId": "26b4bb23-e6cd-401b-8014-5b20093ac7ee",
  "issuer": {
    "id": "eab7bfc6-113a-4e51-aedd-f6a807420656",
    "name": "pnb_ibjl NameNZ",
    "legalName": "pnb_ibjl LegalNameNZ"
  },
  "recipient": {
    "id": "c74437ba-e204-46fc-9b16-0062f896e01e",
    "name": "high_st NameNZ",
    "legalName": "high_st LegalNameNZ"
  },
  "name": "PNB_IBJL_Equipment_Leasing",
  "status": "FUTURE",
  "amount": {
    "currency": "NZD",
    "value": 10,
    "type": "PERCENTAGE"
  },
  "accountingCode": "EquipmentLeasing",
  "intervalUnit": "MONTH",
  "interval": 1,
  "intervalDayType": "business",
  "endType": "ONGOING",
  "startDate": "2019-04-04",
  "nextBillingDate": "2019-04-04",
  "merchantConnectionId": "dae89c35-246c-4551-83b6-addd94853afb",
  "createdOn": "2019-03-10T20:23:33.838"
}

Changes