External Accounts

Submit Plaid public token

After the customer completes Plaid Link authentication, the platform should POST the public_token to this callback URL (provided in the link token response).

This will trigger asynchronous processing:

  1. Lightspark exchanges the public_token for an access_token with Plaid
  2. Lightspark retrieves and verifies the account details
  3. An external account is created
  4. A webhook notification is sent to the platform when complete
post/plaid/callback/{plaid_link_token}

Path parameters

plaid_link_tokenstring required

The Plaid link token from the link token response, used to identify the session

Request body

publicTokenstring required

The public token returned by Plaid Link after the customer successfully authenticates and selects an account.

accountIdstring

Optional Plaid account ID if the customer selected a specific account. If not provided, the default account will be used.

Example request

{
  "publicToken": "public-sandbox-12345678-1234-1234-1234-123456789012",
  "accountId": "plaid_account_id_123"
}

Response

A pending external account resource will be created and returned while the Grid API asynchronously processes the Plaid public token.

idstring required

The system generated identifier of this account

customerIdstring

The customer this account is tied to, or null if the account is on behalf of the platform.

status'PENDING' | 'ACTIVE' | 'UNDER_REVIEW' | 'INACTIVE' required

Status of an external account

platformAccountIdstring

Optional platform-specific identifier for this account

currencystring required

The ISO 4217 currency code

defaultUmaDepositAccountboolean

Whether this account is the default UMA deposit account for the customer. If true, incoming UMA payments to this customer's UMA address will be automatically deposited into this account instead of the primary internal account. False if not provided. Note that at most, one external account can be set as the default UMA deposit account for a customer. If there is no default UMA deposit account, incoming UMA payments will be deposited into the primary internal account for the customer.

beneficiaryVerificationStatus'MATCHED' | 'PARTIAL_MATCH' | 'NOT_MATCHED' | 'UNSUPPORTED' | 'CHECKED_BY_RECEIVING_FI' | 'PENDING'

The result of verifying the beneficiary name against the account holder name.

StatusDescription
MATCHEDThe beneficiary name is an exact match
PARTIAL_MATCHThe beneficiary name is a fuzzy match
NOT_MATCHEDThe beneficiary name does not match
UNSUPPORTEDThe payment rail does not support name verification
CHECKED_BY_RECEIVING_FIVerification is deferred to the receiving financial institution (e.g. ACH)
PENDINGVerification is still in progress

Example response

{
  "id": "ExternalAccount:e85dcbd6-dced-4ec4-b756-3c3a9ea3d965",
  "customerId": "Customer:da459a29-1fb7-41ce-a4cb-eb3a3c9fd7a7",
  "platformAccountId": "acc_123456789",
  "currency": "USD",
  "beneficiaryVerifiedData": {
    "fullName": "John Doe"
  },
  "accountInfo": {
    "beneficiary": {
      "address": {
        "line1": "123 Main Street",
        "line2": "Apt 4B",
        "city": "San Francisco",
        "state": "CA",
        "postalCode": "94105",
        "country": "US"
      }
    }
  }
}

Changes