Sub-Merchant API allows for the adding of sub-merchants programmatically via a HTTP API (add, view and list users). Service URL:
Webhook Notifications URL can be set to notify the merchant when the sub-merchant's state changes.
API calls are authenticated using HTTP Basic Access Authentication. You can generate your API key in your API Settings.
The API returns all results in JSON format. Request parameters are either query parameters (when method is GET) or application/x-www-form-urlencoded
body parameters (when method is POST).
On error there will be an err element returned in result. Err value will contain the error description.
API calls are performed by sending a HTTP request to a URL starting with a link, followed by the endpoint URL and request data.
Method | Request | Response |
---|---|---|
POST |
/AddUser/
Parameters:
account_type={account_type}&first_name={first_name}&last_name={last_name}&email={email}&company={company}&nationality={nationality}&country={country} |
returns {user} |
GET | /GetUser/?user={user} |
returns {user, created_time, email, state} |
GET | /GetUsers/ |
returns [{user, created_time, email}...] |
GET | /SetUserFee/?user={user}&fee={fee} |
returns {success} |
POST |
/SetUserPayoutMethod/?user={user}
Parameters:
payout_method={payout_method}&sepa_iban={sepa_iban}&sepa_bank_name={sepa_bank_name}&swift_account={swift_account}&swift_bank_name={swift_bank_name}&swift_bank_address={swift_bank_address}&swift_intermediary_bank_name={swift_intermediary_bank_name}&swift_intermediary_bank_address={swift_intermediary_bank_address}&swift_bic={swift_bic}&swift_account_type={swift_account_type}&ach_account={ach_account}&ach_routing={ach_routing}&ach_account_type={ach_account_type}
|
returns {success} |
GET | /LoginUser/?user={user}&target_path={target_path} |
returns {sso_url} |
Parameter | Meaning |
---|---|
account_type | Type of sub-merchant - allowed values are 'individual' and 'company' |
first_name | First name |
last_name | Last name |
E-mail address | |
company | Company name (only applicable if account_type is 'company') |
nationality | ISO 3166 alpha-2 code of individual's nationality (only applicable if account_type is 'individual') |
country | ISO 3166 alpha-2 code of either company headquarters or individual's current country of residence |
fee | Fee percent charged to merchant |
payout_method | Settle method - one of 'sepa', 'swift' or 'ach' |
sepa_iban | Required for SEPA settle method - IBAN account number |
sepa_bank_name | Required for SEPA settle method - bank name |
swift_account | Required for SWIFT settle method - bank account number |
swift_bank_name | Required for SWIFT settle method - bank name |
swift_bank_address | Required for SWIFT settle method - bank address |
swift_intermediary_bank_name | For SWIFT settle method - intermediary bank name |
swift_intermediary_bank_address | For SWIFT settle method - intermediary bank address |
swift_bic | Required for SWIFT settle method - SWIFT / BIC number |
swift_account_type | For SWIFT settle method - account type ('current', 'checking' or 'savings') |
ach_account | Required for ACH settle method - bank account number |
ach_routing | Required for ACH settle method - routing / ABA number |
ach_account_type | Required for ACH settle method - account type ('checking' or 'savings') |
Output | Meaning |
created_time | Time when the user record was created (UNIX timestamp) |
state | State of user account - possible values are "kyc_needed", "kyc_verification_pending", "verification_pending", "activation_pending", "active" |
sso_url | URL that will authenticate the sub-merchant and perform redirection to the specified target URL; valid for only 5 seconds |
success | Is operation successful |
Creates a new sub-merchant.
Example:
POSThttps://pay.limitlex.com/api/v2/AddUser/
Request body: account_type=individual&first_name=John&last_name=Doe&email=john.doe@example.org&company=ACME&nationality=XX&country=XX
Response:
{ "user": "11111111-2222-3333-4444-555555555555" }
Returns specified sub-merchant data.
Example:
https://pay.limitlex.com/api/v2/GetUser/?user=11111111-2222-3333-4444-555555555555
Response:
{ "user": "11111111-2222-3333-4444-555555555555", "created_time": 1234567890, "email": "[email protected]", "state": "kyc_needed" }
Returns a list of sub-merchants.
Example:
https://pay.limitlex.com/api/v2/GetUsers/
Response:
[ { "user": "11111111-2222-3333-4444-555555555555", "created_time": 1234567890, "email": "[email protected]" }, ... ]
Sets the fee percentage for a sub-merchant. Fee can be set after a sub-merchant completes activation state=`active`
.
Example:
https://pay.limitlex.com/api/v2/SetUserFee/?user=11111111-2222-3333-4444-555555555555&fee=1.3
Response:
{ "success": true }
Sets the settle method and details for a sub-merchant.
Example:
POSThttps://pay.limitlex.com/api/v2/SetUserPayoutMethod/?user=11111111-2222-3333-4444-555555555555
Request body: payout_method=swift&swift_account=XX123450000054321&swift_bank_name=My%20Bank&swift_bank_address=Main%20Street%201&swift_bic=AAAABBCCDDD&swift_account_type=savings
Response:
{ "success": true }
LoginUser
returns a URL which can be used to automatically authenticate the sub-merchant. When the sub-merchant visits the returned sso_url
in their browser, they will be automatically authenticated and redirected to target_path
.
Info: sso_url
is valid for 5 seconds.
Example:
https://pay.limitlex.com/api/v2/LoginUser/?user=11111111-2222-3333-4444-555555555555&target_path=user.profile
Response:
{ "sso_url": "https://pay.limitlex.com/api/v2/sso_login?tmpl=min&token=..." }
LoginUser
can be used to generate a link to ask user for a KYC. It returns a URL which will automatically authenticate the sub-merchant and redirect them to KYC form.
Info: sso_url
is valid for 5 seconds.
Example:
https://pay.limitlex.com/api/v2/LoginUser/?user=11111111-2222-3333-4444-555555555555&target_path=userPaymentGateway.kyc
Example for KYC link without menus:
https://pay.limitlex.com/api/v2/LoginUser/?user=11111111-2222-3333-4444-555555555555&target_path=userPaymentGateway.kyc%3Ftmpl%3Dmin
Response:
{ "sso_url": "https://pay.limitlex.com/api/v2/sso_login?tmpl=min&token=..." }