Create Order

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 Customer 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:

Scroll inside to view more
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.
Note

Values that mandate.rule_value can adopt depending on mandate.frequency

Fortnightly

  1. 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.

  2. 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.

  3. If the value is ‘16’ and the month has only 30 days then the mandate should execute on 30th.

  4. 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

  1. If the value is ‘29’, ‘30’ or ‘31’ and falls on February then the mandate shall execute on the last day of February.

  2. If the value is ‘31’ and the next executable month has 30 days only then the mandate will execute on 30th

  3. If the mandate start date is 29th January and the value is ‘17’ then the first debit will be on 17th February

API Endpoints
Sandbox Link
POST
https://sandbox.juspay.in/orders
Production Link
POST
https://api.juspay.in/orders
Headers
Body
200 : Success