Introducing Instamojo’s marketplace api
Features
Of Marketplace API
- Allows third party vendors to sell products on the marketplace platform
- Auto creates and manages vendor accounts via API
- Collects payment from the end customers on behalf of the vendors
- Split and distribute payments between multiple accounts/vendors
- Auto calculates marketplace owner’s commission on every product sold
Please reach out to support@instamojo.com to receive marketplace API credentials.
Manage Payouts Via API
Manage Settlements
Settle incoming payments easily with the third party vendors at scheduled times or defer them until your business conditions are met.
Light Checkout
Integrate the payment checkout seamlessly without having the customers leaving your website.
Safe & Secure
Safe & Secure Instamojo’s marketplace API complies with updated and advanced safety and privacy regulations to protect your merchants’ transactions.
Process Refunds
Issue full refunds and partial refunds easily for the corresponding payments.
Snapshot of Marketplace APIs
- Application Based Authentication
- User Based Authentication
- Refresh Token Based Authentication
- Signup
- Update details of a user
- Update bank details of a user
- Create a Payment Request
Body Params
grant_type required
string client_credentials
This describes the type of authentication.
client_id required
string client_credentials
The client_id that is provided to you.
client_secret required
string client_credentials
The client_secret that is provided to you.
Python
cURL
<?php
$ch = curl_init();
curl_setopt($ch, CURLOPT_URL, 'https://api.instamojo.com/oauth2/token/');
curl_setopt($ch, CURLOPT_HEADER, FALSE);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, TRUE);
curl_setopt($ch, CURLOPT_FOLLOWLOCATION, TRUE);
$payload = Array(
'grant_type' => 'client_credentials',
'client_id' => '21fe14a60057ece6c76496175cb0238a2ffd87be',
'client_secret' => '-KWPoDO!_l?MZQ-DsZeQ0TXXcvuDn;mxmAtGho8Xijn=iH6F'
);
curl_setopt($ch, CURLOPT_POST, true);
curl_setopt($ch, CURLOPT_POSTFIELDS, http_build_query($payload));
$response = curl_exec($ch);
curl_close($ch);
echo $response;
?>
Body Params
grant_type required
string password
This describes the type of authentication
client_id required
string
The client_id that is provided to you.
client_secret required
string
The client_secret that is provided to you.
username required
string
Email or Username of the user.
password required
string
Password of the user.
Python
cURL
<?php
$ch = curl_init();
curl_setopt($ch, CURLOPT_URL, 'https://api.instamojo.com/oauth2/token/');
curl_setopt($ch, CURLOPT_HEADER, FALSE);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, TRUE);
curl_setopt($ch, CURLOPT_FOLLOWLOCATION, TRUE);
$payload = Array(
'grant_type' => 'password',
'client_id' => '21fe14a60057ece6c76496175cb0238a2ffd87be',
'client_secret' => '-KWPoDO!_l?MZQ-DsZeQ0TXXcvuDn;mxmAtGho8Xijn=iH6F',
'username' => 'foo@example.com',
'password' => 'bar'
);
curl_setopt($ch, CURLOPT_POST, true);
curl_setopt($ch, CURLOPT_POSTFIELDS, http_build_query($payload));
$response = curl_exec($ch);
curl_close($ch);
echo $response;
?>
Body Params
grant_type required
string refresh_token
This describes the type of authentication.
client_id required
string
The client_id that is provided to you.
client_secret required
string
The client_secret that is provided to you.
refresh_token required
string
The refresh_token obtained from User Based Authentication.
Python
cURL
<?php
$ch = curl_init();
curl_setopt($ch, CURLOPT_URL, 'https://api.instamojo.com/oauth2/token/');
curl_setopt($ch, CURLOPT_HEADER, FALSE);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, TRUE);
curl_setopt($ch, CURLOPT_FOLLOWLOCATION, TRUE);
$payload = Array(
'grant_type' => 'refresh_token',
'client_id' => '21fe14a60057ece6c76496175cb0238a2ffd87be',
'client_secret' => '-KWPoDO!_l?MZQ-DsZeQ0TXXcvuDn;mxmAtGho8Xijn=iH6F',
'refresh_token' => 'oPorohVcpY5n7v7cS8biUKQZcvV5fT'
);
curl_setopt($ch, CURLOPT_POST, true);
curl_setopt($ch, CURLOPT_POSTFIELDS, http_build_query($payload));
$response = curl_exec($ch);
curl_close($ch);
echo $response;
?>
Body Params
email required
string
Email id for the account.
password
string
Phone number for the account.
phone
string
Phone number for the account
referrer
string
The referrer provided to you.
Python
cURL
<?php
$ch = curl_init();
curl_setopt($ch, CURLOPT_URL, 'https://api.instamojo.com/v2/users/');
curl_setopt($ch, CURLOPT_HEADER, FALSE);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, TRUE);
curl_setopt($ch, CURLOPT_FOLLOWLOCATION, TRUE);
curl_setopt($ch, CURLOPT_HTTPHEADER,array('Authorization: Bearer y70kak2K0Rg7J4PAL8sdW0MutnGJEl'));
$payload = Array(
'email' => 'foo@example.com',
'password' => 'bar',
'phone' => '919988776655',
'referrer' => 'value-provided-to-you-by-instamojo'
);
curl_setopt($ch, CURLOPT_POST, true);
curl_setopt($ch, CURLOPT_POSTFIELDS, http_build_query($payload));
$response = curl_exec($ch);
curl_close($ch);
?>
Body Params
first_name
string
First name of the account.
last_name
string
Last name of the account.
location
string
Location of the user.
phone
string
Phone number of the user.
Python
<?php
$ch = curl_init();
curl_setopt($ch, CURLOPT_URL, 'https://api.instamojo.com/v2/users/90f01dfdacbe4fe7892fc27dbdc30906/');
curl_setopt($ch, CURLOPT_RETURNTRANSFER, TRUE);
curl_setopt($ch, CURLOPT_CUSTOMREQUEST, 'PATCH');
curl_setopt($ch, CURLOPT_FOLLOWLOCATION, TRUE);
curl_setopt($ch, CURLOPT_HTTPHEADER,array('Authorization: Bearer n9kmKzF0DzbP5jIKZk8gJO0mOr4W0t'));
$payload = Array(
'first_name' => 'Foo',
'last_name' => 'Bar',
'location' => 'India',
'phone' => '+919988776655'
);
curl_setopt($ch, CURLOPT_POSTFIELDS, $payload);
$response = curl_exec($ch);
curl_close($ch);
?>
Body Params
account_holder_name required
string
Name of account holder.
account_number
string
Bank account number.
ifsc_code
string
IFSC code of the branch.
Python
<?php
$ch = curl_init();
curl_setopt($ch, CURLOPT_URL, 'https://api.instamojo.com/v2/users/90f01dfdacbe4fe7892fc27dbdc30906/inrbankaccount/');
curl_setopt($ch, CURLOPT_HEADER, FALSE);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, TRUE);
curl_setopt($ch, CURLOPT_CUSTOMREQUEST, "PUT");
curl_setopt($ch, CURLOPT_FOLLOWLOCATION, TRUE);
curl_setopt($ch, CURLOPT_HTTPHEADER,array('Authorization: Bearer n9kmKzF0DzbP5jIKZk8gJO0mOr4W0t'));
$payload = Array(
'account_holder_name' => 'Foo Bar',
'account_number' => '123456789',
'ifsc_code' => 'SBIN0000111'
);
curl_setopt($ch, CURLOPT_POSTFIELDS, http_build_query($payload));
$response = curl_exec($ch);
curl_close($ch);
?>
Body Params
buyer_name required
string
Name of payer
email required
string
Email of payer
phone required
string
Phone number of payer.
purpose required
string
Purpose of the payment request.
amount required
string double
The amount for the request. The minimum amount is 9. And the maximum is 200000.
Python
<?php
$ch = curl_init();
curl_setopt($ch, CURLOPT_URL, 'https://api.instamojo.com/v2/payment_requests/');
curl_setopt($ch, CURLOPT_HEADER, FALSE);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, TRUE);
curl_setopt($ch, CURLOPT_FOLLOWLOCATION, TRUE);
curl_setopt($ch, CURLOPT_HTTPHEADER,array('Authorization: Bearer n9kmKzFODibP5jIKVk8gJO0NOr4W0t'));
$payload = Array(
'purpose' => 'FIFA 16',
'amount' => '2500',
'buyer_name' => 'John Doe',
'email' => 'foo@example.com',
'phone' => '9999999999',
'redirect_url' => 'http://www.example.com/redirect/',
'send_email' => 'True',
'send_sms' => 'True',
'webhook' => 'http://www.example.com/webhook/',
'allow_repeated_payments' => 'False',
}
curl_setopt($ch, CURLOPT_POST, true);
curl_setopt($ch, CURLOPT_POSTFIELDS, http_build_query($payload));
$response = curl_exec($ch);
curl_close($ch);
?>
Snapshot of Marketplace APIs
Body Params
grant_type required
string client_credentials
This describes the type of authentication.
client_id required
string client_credentials
The client_id that is provided to you.
client_secret required
string client_credentials
The client_secret that is provided to you.
'client_credentials',
'client_id' => '21fe14a60057ece6c76496175cb0238a2ffd87be',
'client_secret' => '-KWPoDO!_l?MZQ-DsZeQ0TXXcvuDn;mxmAtGho8Xijn=iH6F'
curl_setopt($ch, CURLOPT_POST, true);
curl_setopt($ch, CURLOPT_POSTFIELDS, http_build_query($payload));
$response = curl_exec($ch);
curl_close($ch);
echo $response;
?>
Body Params
grant_type required
string password
This describes the type of authentication
client_id required
string
The client_id that is provided to you.
client_secret required
string
The client_secret that is provided to you.
username required
string
Email or Username of the user.
password required
string
Password of the user.
'password',
'client_id' => '21fe14a60057ece6c76496175cb0238a2ffd87be',
'client_secret' => '-KWPoDO!_l?MZQ-DsZeQ0TXXcvuDn;mxmAtGho8Xijn=iH6F',
'username' => 'foo@example.com',
'password' => 'bar'
);
curl_setopt($ch, CURLOPT_POST, true);
curl_setopt($ch, CURLOPT_POSTFIELDS, http_build_query($payload));
$response = curl_exec($ch);
curl_close($ch);
echo $response;
?>
Body Params
grant_type required
string refresh_token
This describes the type of authentication.
client_id required
string
The client_id that is provided to you.
client_secret required
string
The client_secret that is provided to you.
refresh_token required
string
The refresh_token obtained from User Based Authentication.
'refresh_token',
'client_id' => '21fe14a60057ece6c76496175cb0238a2ffd87be',
'client_secret' => '-KWPoDO!_l?MZQ-DsZeQ0TXXcvuDn;mxmAtGho8Xijn=iH6F',
'refresh_token' => 'oPorohVcpY5n7v7cS8biUKQZcvV5fT'
);
curl_setopt($ch, CURLOPT_POST, true);
curl_setopt($ch, CURLOPT_POSTFIELDS, http_build_query($payload));
$response = curl_exec($ch);
curl_close($ch);
echo $response;
?>
Body Params
email required
string
Email id for the account.
password
string
Phone number for the account.
phone
string
Phone number for the account
referrer
string
The referrer provided to you.
'foo@example.com',
'password' => 'bar',
'phone' => '919988776655',
'referrer' => 'value-provided-to-you-by-instamojo'
);
curl_setopt($ch, CURLOPT_POST, true);
curl_setopt($ch, CURLOPT_POSTFIELDS, http_build_query($payload));
$response = curl_exec($ch);
curl_close($ch);
?>
Body Params
first_name
string
First name of the account.
last_name
string
Last name of the account.
location
string
Location of the user.
phone
string
Phone number of the user.
'Foo',
'last_name' => 'Bar',
'location' => 'India',
'phone' => '+919988776655'
);
curl_setopt($ch, CURLOPT_POSTFIELDS, $payload);
$response = curl_exec($ch);
curl_close($ch);
?>
Body Params
account_holder_name required
string
Name of account holder.
account_number
string
Bank account number.
ifsc_code
string
IFSC code of the branch.
'Foo Bar',
'account_number' => '123456789',
'ifsc_code' => 'SBIN0000111'
);
curl_setopt($ch, CURLOPT_POSTFIELDS, http_build_query($payload));
$response = curl_exec($ch);
curl_close($ch);
?>
Body Params
buyer_name required
string
Name of payer
email required
string
Email of payer
phone required
string
Phone number of payer.
purpose required
string
Purpose of the payment request.
amount required
string double
The amount for the request. The minimum amount is 9. And the maximum is 200000.
'FIFA 16',
'amount' => '2500',
'buyer_name' => 'John Doe',
'email' => 'foo@example.com',
'phone' => '9999999999',
'redirect_url' => 'http://www.example.com/redirect/',
'send_email' => 'True',
'send_sms' => 'True',
'webhook' => 'http://www.example.com/webhook/',
'allow_repeated_payments' => 'False',
}
curl_setopt($ch, CURLOPT_POST, true);
curl_setopt($ch, CURLOPT_POSTFIELDS, http_build_query($payload));
$response = curl_exec($ch);
curl_close($ch);
?>
Benefits Of Marketplace APIs
Auto Transfers
Auto transfer each individual payment any number of times to multiple vendors.
Invoices
Send your vendors GST compliant invoices with our Invoice generator app.
Settlements
Manage settlements with periodic & custom payouts – complete control over payouts.