This is the same API used for creating order for one-time payments. It can also be used to create a mandate for your existing customers with subscription specific details like amount, subscription frequency, duration of the mandate, Required/Optional mandate flow, etc. Use the order ID from the response of this API to call the Mandate Registration API.
Prerequisite for creating a mandate is to have the customer already registered/created with you. You can use these set of APIs to create a new customer or check the status of an existing customer.
The API is not required for the merchants using Juspay's Payment Page product.
During the entire journey, a mandate once created can take up any of the following states:
Status | Description |
---|---|
CREATED | Mandate has been created, but awaiting status from PG. |
ACTIVE | When PG accepts the chosen mode of payment, the mandate is set to the active state. This is a terminal state until mandate expires or customer/merchant wants to revoke the mandate. |
PAUSED | Customer has an option to pause the mandate. Status changes to PAUSED when customer exercises this option. |
REVOKED | Mandate is revoked by either the customer or the merchant. Revoked is a terminal state, once Revoked the status cannot be changed. |
FAILURE | Mandate creation was unsuccessful. This is a terminal state, the merchant has to create a new mandate if failed. |
EXPIRED | Mandate validity has expired. This is a terminal state. |
Values that mandate.rule_value can adopt depending on mandate.frequency
Fortnightly
- If the value is ‘14’, ‘15’ or ‘16’ and falls on the latter half of February (16th to 28th) then the mandate shall execute on the last day of February.
- If the mandate start date is 24th January 2018 with value ‘16’ then the first debit will be on 31st January, followed by 15th February, 28th February, 15th March, 31st March and so on.
- If the value is ‘16’ and the month has only 30 days then the mandate should execute on 30th.
- If the mandate start date is 29th January and the value is ‘4’ then the first debit will be on 4th February followed by 19th February, 4th March and so on.
Monthly
- If the value is ‘29’, ‘30’ or ‘31’ and falls on February then the mandate shall execute on the last day of February.
- If the value is ‘31’ and the next executable month has 30 days only then the mandate will execute on 30th
- If the mandate start date is 29th January and the value is ‘17’ then the first debit will be on 17th February
Response Parameters
Parameter | Type | Description |
---|---|---|
id | String | Unique ID generated by Juspay for the given order. |
order_id | String | Given order ID. |
status | String | Status of the order. If you receive “NEW”, then the order is successfully created. See Appendix for status mapping. |
status_id | String | Status ID is a numeric id corresponding to the status value. |
payment_links.web | String | Link to Desktop optimized checkout page for the given order. |
payment_links.mobile | String | Link to Mobile optimized checkout page for the given order. |
payment_links.iframe | String | Link to iFrame checkout screen. This is typically embedded inside of your own page. |