Creating vendors by referral
In case your platform uses a referral flow to invite vendors to your payments product (for example: an accountant inviting their customers to accept payments via your platform), you should pass information about both the referrer and the referred parties to UNIPaaS upon creation.
General referral flow
The following describes a typical referral flow, with actions that must be taken on each step:
User flow | Technical steps |
---|---|
A new referrer invites a vendor to join your payments product | 1. Create a vendor for the referrer using a regular create vendor ' API call.2. Save the referrer's vendorid for later3. Create the vendor using a create vendor API call, add the referrer's vendorid to the referrerVendorId field. (see example below) |
An existing referrer invites a vendor to join your payments product | 1. Create the vendor using a create vendor API call, add the relevant referrer's vendorid to the referrerVendorId field. (see example below) |
Integration example
The following example uses the create vendor
API call that is used to create all vendors in UNIPaaS.
1. Creating a referrer
Creating a referrer (accountant) profile is exactly same as creating any other vendor:
{
"firstName": "John",
"lastName": "Doe",
"email": "[email protected]",
"country": "GB",
"type": "individual"
}
The response will include the referrer's vendorid
, which will be used to link the vendors they invited:
{
"id": "63ea04cf6d3161e1ba997d52", // Used to connect to invited vendors
"name": "John Doe",
"email": "[email protected]",
"createdAt": "2029-02-13T09:37:19.286Z",
"updatedAt": "2029-02-13T09:37:19.286Z",
"merchantId": "62c3ee08f396b3c46e240044"
}
2. Linking an invited vendor to their referrer
When creating a vendor that was referred by a referrer, use the referrerVendorId
field to link the vendor with their referrer.
{
"businessName": "New Vendor",
"firstName": "John",
"lastName": "Doe2",
"email": "[email protected]",
"country": "GB",
"phone": "+447911123456",
"birthDate": "1980-01-01",
"serviceDescription": "Fast delivery",
"url": "https://google.com",
"category": "FOOD_DELIVERY",
"type": "individual",
"referrerVendorId":"63ea04cf6d3161e1ba997d52", // Referrer's vendor id
"createOnboardingLink": true
}
Updated almost 2 years ago