Vendor Onboarding

Two ways to onboard vendors through the API: invite them to a workspace, or create a payable with send_invite so they're invited when you pay them.

Vendor Onboarding Flow

There are two pathways to onboard vendors to Lumanu:

Option 1: Send Invitation (Recommended)

Use the Invite Partners to Workspace endpoint to invite vendors.

Option 2: Create Payable with Invitation

Use the Create Payable endpoint with send_invite set to true. This creates a payable and simultaneously sends an invitation to the vendor, prompting them to complete onboarding.

For most integrations, we recommend Option 1 because it ensures you have verified, payment-ready vendors before creating payables.

📘

Value of the Lumanu ID

Onboarding vendors (or "partners") efficiently is key to managing your payments. A common challenge is that the email address you use to invite a vendor might not be the same one they use for their Lumanu account.

To solve this and prevent duplicate records, we use a Lumanu ID—a unique, immutable identifier for every vendor. The goal of the onboarding flow is to reliably retrieve and store this Lumanu ID for all your partners.


The Recommended Onboarding Flow

We recommend the following asynchronous process using webhooks to ensure you always have the correct Lumanu ID for a vendor, even if they sign up with a different email address.

  1. Check for an Existing Lumanu ID: Before inviting a new vendor, first check your own system to see if you have already stored a Lumanu ID for them. If you have one, you can skip the invitation process entirely and use that ID for all future API calls.

  2. Send the Partner Invite: If you don't have a Lumanu ID, send an invitation using the vendor's email address.

    • API Call: POST /workspace/{id}/partner/invite
  3. Store the invite ID: The response lists each invite in invites_sent, with its id and email. Store the id with the pending vendor in your database. It links the invite to the vendor who eventually signs up. Emails that already belong to a Lumanu workspace come back in partners_added instead: those vendors are added as partners straight away, with no invite. Invites expire after 7 days.

  4. Receive the partner-invite.claimed Webhook: When the vendor clicks the invite link and successfully signs up or logs in, the Lumanu platform will send a partner-invite.claimed webhook to your registered endpoint. Its data has the invite id, the vendor's payee_lumanu_id and payee_email.

  5. Match and Store the Lumanu ID: Your application should use the invite id from the webhook to look up the pending vendor you stored in step 3. Once matched, save the Lumanu ID from the webhook to that vendor's record. You can now use this ID as a reliable, permanent identifier for the vendor.

Interaction Diagram

This diagram illustrates the asynchronous flow of inviting a partner and receiving their permanent Lumanu ID.

sequenceDiagram
    participant Client App as Client Application
    participant LumanuAPI as Lumanu API
    participant Partner as Vendor / Partner

    alt Lumanu ID not found in local DB
        Client App->>+LumanuAPI: 1. POST /workspace/{id}/partner/invite
        LumanuAPI-->>-Client App: 2. Returns { invites_sent: [{ id, email }] }
        Client App->>Client App: 3. Store invite id with pending vendor record

        LumanuAPI-->>Partner: 4. Sends email invitation
        Partner-->>LumanuAPI: 5. Clicks link, signs up or logs in
        LumanuAPI-->>Client App: 6. Webhook: `partner-invite.claimed` <br/> (data includes id and payee_lumanu_id)

        Client App->>Client App: 7. Match invite id, <br/> store payee_lumanu_id
    end

Did this page help you?