Create a repeat schedule to automate payments.
Repeat Payments API is currently in BETA phase. If you would like to test it, please contact us.
A schedule can either be created from a new card using the payment page , or from an existing transaction_id.
If a new card is used, the schedule can be created as either ECOM or MOTO.
Request Body
payment_type
(string, required): Repeat payment type. Possible values are:fixed_schedule
variable_schedule
payment_intent
(string, required): The payment intent token.paymentToken
(string, optional): The tokenised card details. In create intent response, ccElement will be returned in element array if repeat payment is enabled for that merchant account. User can populate ccElement as a part of the create repeat request form to generate and pass paymentToken value. Please go through the process from payment page, to generate paymentToken.- If repeat payment request is created form a existing transaction, then this value is not required.
transaction_id
(string, optional): Transaction id of an existing transaction. This value will be passed to create a repeat payment from an existing transaction, and can be fetched from Get transaction request.paymentToken
is not required.
type
(integer, required): value is 1 for ECOM. value is 2 for MOTO.customer_email
(string, required): The email address of the customer making the payment. If you are using the transaction_id from an existing payment, the name and email will be the same as the original transactions.customer_name
(string, required): The name of the customer making the payment. If you are using the transaction_id from an existing payment, the name and email will be the same as the original transactions.customer_address
(string, optional): The billing address of the customer's card may be required for additional AVS checking.customer_postcode
(string, optional): The billing post code of the customer's card may be required for additional AVS checking.reference
(string, required): Reference for the schedule.currency
(string, required): Three letter currency code (ISO 4217) e.g USD, GBP.merchant_data
(json, optional): Additional custom data related to the merchant or customer.
For fixed_schedule
, the fields are:
frequency
(string, required): Payment cycle frequency. Possible values aredays
weeks
months
frequency_duration
(integer, required): Payment frequency duration. (E.g. “2” and “days” will be every 2 days)start_payment_date
(date , optional): Date on which the first payment will be captured. Default value set to today.first_amount
(float, optional) First payment amount.recurring_amount
(float, required): Recurring amount for each installment.is_limited_installments
(boolean): If the schedule will have unlimited or limited installments.installments
(integer): Number of installments. It is required if the is_limited_installments field is true (i.e. it has limited instalments).final_amount
(decimal, optional): Final payment amount. This can be used when creating a Fixed Schedule if there are limited instalments. If there are unlimited instalments, this field should not be used.final_payment_date
(date , optional): Date on which the final payment will be captured. Final date can be customised along with the final amount when creating a schedule with limited instalments. This date must be after the start payment date and also after the 2nd last recurring date.
For variable_schedule
, the required field is:
schedule_set
(array, required): Schedule set is an array set of date and amount where the date will be the key and the amount will be its value. This array needs to have a minimum of 2 sets of values.
Required fields for ECOM
device_timezone
(string, required): The device time zone value which can be fetched using JavaScript and assigned to the respective hosted input field.device_capabilities
(string, required): Device capabilities which can be fetched using JavaScript and assigned to the respective hosted input field.device_accept_language
(string, required): Device accept language which can be fetched using JavaScript and assigned to the respective hosted input field.device_screen_resolution
(string, required): Device accept language which can be fetched using JavaScript and assigned to the respective hosted input field.remote_address
(string, required): Remote address which can be fetched using JavaScript and assigned to the respective hosted input field.
Response Body
MOTO method: The user will get a json response with all the repeat schedule related data.
ECOM method: Thisuses 3DS and returns an acsform, which is a HTML form used to perform the 3DS authentication. After the user completes the 3DS form and submits it, the user will be redirected to the predefined return URL with an encoded repeat schedule ID.
Successful response