Plans are a Dashboard feature, and so to creating recurring payments through the API you’ll need to use subscriptions.
You can use subscriptions to charge your customers weekly, monthly, yearly or something in between. You’ll just need the mandate ID of the customer you want to create a subscription for.
You can customise the following parameters when creating a subscription;
- Currency - currently only GBP and EUR are supported.
- Name - Optional name for the subscription, which will also set the description of each payment.
- Interval_unit - the unit of time between charge dates, either weekly, monthly or yearly.
- Interval - the number of interval_units between each charge date. This must result in at least one charge per year, and will default to 1 if not provided.
- Count - the total number of payments to be taken by the subscription.
- Day_of_month - the day of the month (1-28) you’d like your customer to be charged on. You can also use -1 to indicate the last day of the month.
- Month - the name of the month in which to charge a customer.
- Start_date - the date on which the first payment should be charged. This date must be within a year of the subscription being created, and on or after the mandate’s next_possible_charge_date. If this parameter isn’t included, the first payment will be charged as soon as possible.
- Payment_reference - This parameter is restricted to Pro accounts only. An optional payment reference that will be set for all payments and will appear on your customer’s bank statement.
You can see a full reference on creating subscriptions in our developer documentation here.