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

StatusDescription
CREATEDMandate has been created, but awaiting status from PG.
ACTIVEWhen 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.
PAUSEDCustomer has an option to pause the mandate. Status changes to PAUSED when customer exercises this option.
REVOKEDMandate is revoked by either the customer or the merchant. Revoked is a terminal state, once Revoked the status cannot be changed.
FAILUREMandate creation was unsuccessful. This is a terminal state, the merchant has to create a new mandate if failed.
EXPIREDMandate validity has expired. This is a terminal state.

📘

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

Response Parameters

ParameterTypeDescription
idStringUnique ID generated by Juspay for the given order.
order_idStringGiven order ID.
statusStringStatus of the order. If you receive “NEW”, then the order is successfully created.

See Appendix for status mapping.
status_idStringStatus ID is a numeric id corresponding to the status value.
payment_links.webStringLink to Desktop optimized checkout page for the given order.
payment_links.mobileStringLink to Mobile optimized checkout page for the given order.
payment_links.iframeStringLink to iFrame checkout screen. This is typically embedded inside of your own page.
Language
Authentication
Basic
base64
:
Click Try It! to start a request and see the response here!