Create a Source

Creates a new source object.

ARGUMENTS

Scroll inside to view more
Argument
Description
metadata optional
Set of key-value pairs that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Source metadata is replicated to Mandate metadata.
nach_debit REQUIRED
Information for the mandate to be created by the source object. See child arguments in the table below.
redirect optional dictionary
Parameters required for the redirect flow. Optional for emandate_api and emandate_esign variants. Not permitted for physical variant. See child arguments in the table below.
type REQUIRED
The type of the source to create. Value is nach_debit.
agent optional
The unique identifier of the agent to which this source will be associated. Agent is the merchant's branch office or field executive who is responsible for this instrument.
bank_account optional
The unique identifier of the existing bank_account on which to create the source, or a bank account token. LotusPay will populate the bank_account's attributes as the following arguments in source: debtor_agent_code, debtor_agent_mmbid, debtor_account_name, debtor_account_number and debtor_account_type. The source and its mandate will be linked to this bank_account and its customer. If you give the argument bank_account you should not give the corresponding bank account details as arguments in source, and vice versa. Note: This argument is currently suspended.
customer optional
The unique identifier of the customer on which to create the source. LotusPay will link the source and its mandate to this customer. No attributes from customer are supplied as arguments in source, and no arguments in source will update attributes in customer.

Child arguments for nach_debit:

Scroll inside to view more
Argument
Description
amount_collection conditionally REQUIRED
Fixed amount of the mandate. A positive integer in paisa (one hundredth of a Rupee). e.g. 100 means Rs 1. Required if amount_maximum is not given. Either amount_maximum or amount_collection must be given (one or the other, not both). Must be greater than 10000 (10 thousand paisa = 100 rupees).For All Variants, then amount_collection can be up to 1000000000 (1 billion paisa = 1 crore rupees). amount_collection allows transactions of only that exact amount (no more, no less).
amount_maximum conditionally REQUIRED
Maximum amount of the mandate. A positive integer in paisa (one hundredth of a Rupee). e.g. 100 means Rs 1. Required if amount_collection is not given. Either amount_maximum or amount_collection must be given (one or the other, not both). It is strongly recommended to use amount_maximum as it offers more flexibility than amount_collection. Must be greater than 10000 (10 thousand paisa = 100 rupees).For All variant, the amount_maximum can be up to 1000000000 (1 billion paisa = 1 crore rupees). amount_maximum allows transactions of up to and including the maximum amount.
category_code optional
Four-character NPCI code of the mandate category e.g. U099. Default is merchant's profile value assigned by LotusPay.
creditor_agent_code conditionally REQUIRED
Four-character NACH bank code for the sponsor bank. Matching value required if you have an active NACH Profile for the variant. Optional if you have a default sponsor bank. Not permitted if you have no active NACH Profiles or default sponsor bank (LotusPay will automatically allocate our own sponsor bank). RESTRICTED FEATURE - available to merchants that have NACH profiles.
creditor_utility_code conditionally REQUIRED
18-character NACH utility code of the creditor of the mandate. Matching value required if you have an active NACH Profile for the variant. Not permitted if you have no active NACH Profiles (LotusPay will automatically allocate our own utility code). RESTRICTED FEATURE - available to merchants that have NACH profiles.
date_first_collection optional
First collection date (start date) of the mandate. Default value is tomorrow's date. Must be before date_final_collection. Must not be older than 119 days for physical variant and emandate_esign variant, and must not be older than current date for emandate_api variant.
date_final_collection REQUIRED
The Final Collection Date (date_final_collection) represents the expiry date of the mandate. It must always be a future date and should occur after the First Collection Date (date_first_collection). Additionally, the final collection date must not exceed 40 years from the first collection date. For example, if the date_first_collection is 2025-09-29, a date_final_collection of 2065-09-28 is valid, whereas 2065-09-29 would be invalid as it exceeds the 40-year limit.
date_of_mandate optional, default is today's date
Date the mandate was signed by the customer. Must be past or current date. Must not be older than 120 days. Must be before date_first_collection. Permitted for physical variant only.
debtor_agent_code conditionally REQUIRED
Four-character NACH bank code of the customer's bank. Note: This is generally the first four characters of the customer's bank branch IFSC. However, in the current list of live banks for emandate_api, there is one exception: Ujjivan Small Finance Bank has IFSC codes beginning UJVN but its NACH bank code is USFB. See the NACH Banks endpoint for more details. Not permitted for physical and emandate_esign variants. emandate_api variant requires either debtor_agent_code or debtor_agent_mmbid (one or the other, not both)
debtor_agent_mmbid conditionally REQUIRED
Customer's bank branch IFSC. Must be a valid 11-character IFSC code in the correct format. Letters must be capitalised. Required for physical and emandate_esign variants. emandate_api variant requires either debtor_agent_code or debtor_agent_mmbid (one or the other, not both). If you supply debtor_agent_mmbid for variant emandate_api, LotusPay will automatically compute the debtor_agent_code, which is the actual mandatory argument for NPCI ONMAGS.
debtor_account_name conditionally REQUIRED
Name of the person or business that owns the bank account. Maximum 40 characters. Must be alphanumeric. Symbols are not permitted. Must match the bank's records (destination bank will manually validate for physical and emandate_esign variants; not validated for emandate_api variant). Required if bank_account is not given.
debtor_account_number conditionally REQUIRED
Customer's bank account number. Must be alphanumeric. Must be between five and 50 characters in length. Symbols are not permitted. Required if bank_account is not given.
debtor_account_type conditionally REQUIRED
Customer's bank account type. Value can be savings, current or other for all mandate variants. Value can also be nre, nro or cc for physical variant. Required if bank_account is not given.
debtor_email optional
Customer's email address. If present, and if customer email notifications are turned on for your company, an email invitation will be sent to the customer.
debtor_mobile optional
Customer's mobile number. India mobile numbers must be 10 digits long and begin with 6, 7, 8 or 9. If present, and if customer SMS notifications are turned on for your company, an SMS invitation will be sent to the customer. SMSs are sent in the Live (production) environment only. SMSs are not sent in the Test (sandbox) environment.
debtor_pan optional
Customer's PAN (Permanent Account Number - tax ID in India). For physical mandate variant, this is included in the mandate details but does not appear on the paper mandate.
debtor_phone optional
Customer's phone number. For physical mandate variant, this is stored in the mandate details but does not appear on the paper mandate.
frequency optional
The frequency with which debit transactions can be submitted. Default value is null. Value can be null, ADHO (ad hoc, or as and when presented), MNTH (monthly), QURT (quarterly), MIAN (half-yearly) or YEAR (yearly) for all mandate types. Value can also be INDA (intraday), DAIL (daily), WEEK (weekly) or BIMN (bi-monthly) for eMandate variants. Null value creates mandate with occurrence_sequence_type of OOFF (one-off mandate), else RCUR (recurring mandate). It is strongly recommended to enter a relevant frequency, in order to encourage the customer to authorise the mandate.
reference1 optional
Merchant's identifier for the customer. Maximum 20 characters. May contain letters, numbers, spaces and dash - only.
reference2 optional
Merchant's identifier for the product or service being offered to the customer. Maximum 20 characters. May contain letters, numbers, spaces and dash - only.
reference3 optional
Resellers identifier for the sub-merchants
reference4 optional
Merchants can pass Additional Information
reference5 optional
Merchants can pass Additional Information
variant optional
The variant of the mandate to be created, either physical, emandate_api, or emandate_esign. Default value is emandate_api. RESTRICTED FEATURE - available to merchants that have physical and/or emandate_esign variant enabled.
nach_profile optional
The NACH profile can be passed to create the source. This nach_profile must be active. The nach_profile's utility code must match the creditor's utility code. The nach_profile must contain a creditor_bank_account.

Child arguments for redirect:

Scroll inside to view more
Argument
Description
auth_mode optional for eMandate
The authentication mode of the emandate_api or emandate_esign source. For emandate_api, this is either netbanking or debitcard or aadhaar or others for pan/customer id. If no value is passed, customer may choose the authentication mode on the mandate checkout page. The page will only show the authentication mode(s) that are available for the specified destination bank. For emandate_esign, this is otp, biometric or iris, and default is otp. Not permitted for physical mandates.
return_url optional
Permitted for emandate_api and emandate_esign variants. Not permitted for physical variant. The URL you provide to redirect the customer back to you after they authorise the source. LotusPay populates the return_url with GET parameters in the query-string.

Returns Returns a source object if valid arguments were provided.

API Endpoints
Sandbox Link
POST
https://api-test.lotuspay.com/v1/sources
Production Link
POST
https://api.lotuspay.com/v1/sources
Authorization Header
Last updated 5 months ago