Boarding through the API

Board merchants from your own boarding UI by sending their data, terms acceptance, and submissions to Preczn through the Merchant API.

Boarding through the API lets your platform keep its own boarding UI and use Preczn behind it. Use it when your platform already collects merchant data in its own signup flow, such as a payment gateway or a software platform. Your platform collects the data, shows each connection's terms, and submits each connection. Preczn holds the merchant record, checks it against each connection's requirements, and sends the application.

To compare this method with the hosted boarding form, and to see which connections support it, see Boarding methods.

How data flows

When your platform runs its own boarding front end, the merchant enters boarding data only in your UI. Your server sends the merchant's data to Preczn, and Preczn turns that one record into an application for each destination. Your platform doesn't integrate with each destination's boarding API.

The following diagram shows where your platform sits when it boards merchants through the API:

flowchart LR
    M([Merchant]) --> UI
    subgraph PLATFORM["Your platform"]
        UI["Your boarding UI"] --> S["Your server"]
    end
    subgraph PRECZN["Preczn"]
        API["Merchant API"] --> V["Merchant record<br/>and requirements"]
        V --> B["Submission<br/>per connection"]
        W["merchant.updated<br/>webhook"]
    end
    S -- "Merchant data and<br/>terms acceptance" --> API
    S -- "Onboard request<br/>per connection" --> API
    B -- "Application" --> D1["Destination A"]
    B -- "Application" --> D2["Destination B"]
    D1 -. "Status" .-> B
    D2 -. "Status" .-> B
    B -.-> W
    W -. "Status changes" .-> S
    D2 -. "Some destinations contact<br/>the merchant directly" .-> M

Preczn receives data only when your platform sends it. Some destinations contact the merchant directly after submission. For example, a Ramp applicant finishes the application in Ramp's hosted flow, and Jack Henry emails the Primary Officer to e-sign. Each connection's guide says how status reaches Preczn from that destination.


What your platform handles

When you board through the API, your platform takes on the following work for every connection. The hosted form does this work for you. Each connection's guide lists any work specific to that connection.

  • Record terms acceptance on each connection. When missingRequiredData lists acceptance fields, such as tosDate, tosIp, and tosVersion, send them in that connection's connectionspecificRequirements. Send tosDate as YYYY-MM-DD. Preczn checks only that tosDate parses as a date, and it stores every acceptance field as you send it. The hosted form records the date the merchant accepted and the IP address the merchant's browser sent the acceptance from. Which terms to show is specific to each connection. See the connection's guide and the destination's own terms.
  • Keep total ownership at 100% or less. The hosted form blocks a merchant whose owners' percentages add up to more than 100. The API accepts any total.
  • Mark one owner as the primary representative. The hosted form lets the merchant mark at most one owner with primaryRepresentative, and requires one when the requirements template does. The API accepts any number.
  • Don't accept a PO box as an owner's home address. The hosted form rejects one. The API rejects a PO box in the business address and in location addresses, but not in an owner's address.
  • Apply your own field rules. Field constraints in a boarding form template, such as a minimum length or allowed characters, apply only to the form.
  • Let the merchant review the data before you submit. The hosted form ends with a review step. Preczn boards with the data on the merchant record when you submit, so give the merchant a chance to confirm it first.

Boarding a merchant

To board a merchant through the API, follow this sequence. Merchant data is shared across connections, so you send each value once, and Preczn uses it for every connection that needs it.

  1. Create the merchant with POST /v1/merchants. Include the data you already have, such as business details, owners, and banking. Preczn adds a connection for each processor configured on your platform in the same mode (test or live), with status Unconfigured. To create a merchant, see Creating merchants.
  2. Add or change data as you collect it:
    • Business details: PATCH /v1/merchants/{merchantId}
    • Owners: POST /v1/merchants/{merchantId}/owners and PATCH /v1/merchants/{merchantId}/owners/{ownerId}
    • Bank accounts: POST /v1/merchants/{merchantId}/bankaccounts and PATCH /v1/merchants/{merchantId}/bankaccounts/{bankId}
    • Files: POST /v1/merchants/{merchantId}/attachments
    • Locations, for connections that need them: see Addresses and locations.
  3. Read what each connection still needs with GET /v1/merchants/{merchantId}/requirement. For each connection, the response lists missingRequiredData and onboardingRequirements. Preczn checks requirements in the background after each change, so a connection can show Evaluating for a short time. For how requirements work, see Onboarding data requirements.
  4. Record terms acceptance and any connection-specific data with PATCH /v1/merchants/{merchantId}/connections/{connectionId}, in the connection's connectionspecificRequirements object. Each connection's guide lists the fields it needs.
  5. When a connection's status is Ready, submit it with POST /v1/merchants/{merchantId}/connections/{connectionId}/onboard. Submit each connection separately. Preczn doesn't submit a connection on its own when it reaches Ready.

In every path, {connectionId} is the connection's ID, such as midCon_test_…, or its processor name, such as Rainforest.

Send monetary amounts, such as annualSaleVolume, averageTicket, and highTicket, as whole numbers in cents. For example, send $150.00 as 15000.

The onboard request accepts a connection in Ready, Error, or RFI status. It also accepts a Ramp connection in Cancelled status. Any other status returns 400. From Ready, Error, or a Ramp connection's Cancelled, the response returns status Queued. Submission is asynchronous for every connection. Preczn sends the application in the background and reports each status change by webhook.

📘

Retrying a request safely

POST /v1/merchants and the onboard request accept an idempotency-key header. When you send the same key again, Preczn returns the response to the first request instead of repeating it.

After you submit, follow each connection in Boarding status.


Example: boarding one merchant to two connections

This example boards one merchant to Rainforest and Stripe Connect through the API, with your platform running its own signup flow. You've configured both connections on your platform in test mode, and your signup flow shows each connection's terms. Sensitive values and IDs appear as placeholders, and each request and response is trimmed to the fields that matter here.

  1. When the merchant signs up, create the merchant with the data your signup flow collected, using POST /v1/merchants:

    {
      "name": "{merchantName}",
      "legalName": "{merchantLegalName}",
      "businessType": "llc",
      "tin": "{merchantTin}",
      "email": "{merchantEmail}",
      "phone": "15555550100",
      "address": {
        "address": "{street}",
        "city": "{city}",
        "region": "{state}",
        "postal": "{postalCode}",
        "country": "USA"
      },
      "averageTicket": 45000,
      "highTicket": 250000,
      "annualSaleVolume": 120000000,
      "owners": [
        {
          "firstName": "{ownerFirstName}",
          "lastName": "{ownerLastName}",
          "businessTitle": "Owner",
          "ownershipPercent": 100,
          "primaryRepresentative": true,
          "dob": "{ownerDateOfBirth}",
          "ssn": "{ownerSsn}"
        }
      ],
      "banking": [
        {
          "accountType": "corporateChecking",
          "nameOnAccount": "{merchantLegalName}",
          "routing": "{routingNumber}",
          "account": "{accountNumber}",
          "primaryAccount": true
        }
      ]
    }
    {
      "id": "{merchantId}",
      "name": "{merchantName}",
      "connections": [
        {
          "id": "{rainforestConnectionId}",
          "processor": "Rainforest",
          "status": "Unconfigured"
        },
        {
          "id": "{stripeConnectConnectionId}",
          "processor": "StripeConnect",
          "status": "Unconfigured"
        }
      ]
    }

    The response is abbreviated. It includes the merchant's ID and a connection for each processor on your platform.

  2. Read what each connection still needs with GET /v1/merchants/{merchantId}/requirement. In this example, only the terms fields remain:

    {
      "id": "{merchantId}",
      "connections": [
        {
          "id": "{rainforestConnectionId}",
          "processor": "Rainforest",
          "status": "Requirements",
          "missingRequiredData": [
            "connectionspecificRequirements.tosVersion",
            "connectionspecificRequirements.tosDate"
          ]
        },
        {
          "id": "{stripeConnectConnectionId}",
          "processor": "StripeConnect",
          "status": "Requirements",
          "missingRequiredData": [
            "connectionspecificRequirements.tosDate",
            "connectionspecificRequirements.tosIp"
          ]
        }
      ]
    }

    The response is abbreviated.

  3. After the merchant accepts each connection's terms in your signup flow, record the acceptance on each connection with PATCH /v1/merchants/{merchantId}/connections/{connectionId}. For Rainforest, send the URL of the terms you showed as tosVersion. Use Rainforest as {connectionId}:

    {
      "connectionspecificRequirements": {
        "tosVersion": "{rainforestTermsUrl}",
        "tosDate": "{YYYY-MM-DD}",
        "tosIp": "203.0.113.24"
      }
    }

    For Stripe Connect, use StripeConnect as {connectionId}:

    {
      "connectionspecificRequirements": {
        "tosDate": "{YYYY-MM-DD}",
        "tosIp": "203.0.113.24"
      }
    }
  4. When a merchant.updated webhook shows both connections in Ready, submit each one with POST /v1/merchants/{merchantId}/connections/{connectionId}/onboard. Send a unique value in the idempotency-key header. Use Rainforest as {connectionId}:

    {
      "id": "{merchantId}",
      "status": "Queued",
      "processor": "Rainforest"
    }

    The response is abbreviated. Send the same request for StripeConnect.

  5. Follow each connection's status in merchant.updated webhooks:

    {
      "id": "{webhookEventId}",
      "webhookId": "{webhookId}",
      "eventType": "merchant.updated",
      "data": {
        "id": "{merchantId}",
        "connections": [
          {
            "id": "{rainforestConnectionId}",
            "processor": "Rainforest",
            "status": "Underwriting"
          },
          {
            "id": "{stripeConnectConnectionId}",
            "processor": "StripeConnect",
            "status": "Active"
          }
        ]
      }
    }

    Each connection moves on its own schedule. Let the merchant process through a destination when that connection reaches Active.


FAQ

Does Preczn submit a merchant automatically when a connection reaches Ready?

Not through the API. You submit each connection with the onboard request. On a boarding form, Preczn submits when the merchant completes the form only if the form's auto-transmit setting is on. A form takes its template's Auto Transmit Merchant Data setting unless you set Auto-transmit merchant data when you create the form.

What happens to existing merchants when I add a processor to my platform?

Preczn adds an Unconfigured connection for that processor to each existing merchant in the same mode, test or live. It doesn't board them. To board a merchant to the new connection, complete its requirements and submit it. A merchant that already has a connection to that processor keeps its existing connection.


Did this page help you?