Integration Steps
Restricted Access
The Marketplace API is available only to select customers based on their business needs.
Regular Instamojo API credentials will not work for the Marketplace API.For credentials related to Marketplace API contact [email protected] and specify your platform (production/sandbox).
Authentication Flow
All API interactions required you to have a authentication credentials. Use the client_id
and client_secret
to authenticate yourself against the API. There are three kinds of authentication:
-
Application Based - This gives you extra privileges like creating an account on Instamojo.
-
User Based - This gives you privileges for performing actions on a user's account. For eg: updating their name and location, creating payment links on their behalf, etc.
-
Refresh Token Based - An
access_token
obtained via the User Based authentication will expire in36000
seconds. But it also gives arefresh_token
, which can be used to obtain a new pair ofaccess_token
andrefresh_token
without the need for theusername
andpassword
.
Signup Flow
-
Use Application Based Authentication to get an
access_token
. -
Use this
access_token
to create a user on Instamojo. Here you should use a valid email id and a password. Ensure that you are not storing the password in your system. On signup, you will receive a uniqueid
for the user, which will be used henceforth to identify the user. -
Use User Based Authentication to get an
access_token
. You will need the password for the first time when you are requesting anaccess_token
in this step. Going forward, you must store theaccess_token
andrefresh_token
safely in your database, and discard the password that you had used. If the currentaccess_token
expires, you should use the Refresh Token Based authentication to get a new pair ofaccess_token
andrefresh_token
. -
Use this
access_token
to update the bank account details of the user.
Payment flow
-
Use User Based Authentication to get an
access_token
. -
Use this
access_token
to create a payment link. -
Send the payment link to the buyer.
-
When the payment is complete, we will send you a
webhook
request or redirect the buyer to yourredirect_url
depending on the mode chosen by you while creating the payment link.
Additional Features
-
Refunds - Use this feature if you want to refund the complete or partial amount for a payment.
-
Collecting fees - Use this feature if you want to collect a commission fee on each transaction that you drive via your marketplace.
-
Hold and Release - You can specify to hold a payment until you are confident that the buyer has received the services for their payment. Once you tell us to release the payment, only then the merchant will be paid out.
-
Light Checkout - You can use this to display only the payment form. This is useful if you are going to use this in a mobile app or within your website. To use this feature, simply append
?embed
at the end of the payment link.