Sharetribe marketplaces
Verify providers on a Sharetribe marketplace before they can publish listings. A pattern you build with our API.
Sharetribe marketplaces can gate providers on a TrustVerify check. There is no plug-in: you add a small server step that uses the Sharetribe Integration API and the TrustVerify API.
Pattern#
- Add an onboarding step in your marketplace where the provider uploads a document and a selfie, posting them to your server.
- Your server runs the TrustVerify identity check.
- Write the result to the user's private data with the Integration API, for example
privateData.trustverify = { checkId, status }. - Only approve the user, or let them publish listings, when the status is
passed.
Node.js
const tv = await fetch("https://api.trustverify.co.uk/api/v1/kyc/verify", {
method: "POST",
headers: { Authorization: `Bearer ${process.env.TRUSTVERIFY_API_KEY}`, "Content-Type": "application/json" },
body: JSON.stringify({ documentImage, selfieImage, metadata: { firstName, lastName } }),
}).then((r) => r.json());
await integrationSdk.users.updateProfile({
id: userId,
privateData: { trustverify: { checkId: tv.checkId, status: tv.status } },
});
if (tv.status === "passed") await integrationSdk.users.approve({ id: userId });