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:
- Lightspark exchanges the public_token for an access_token with Plaid
- Lightspark retrieves and verifies the account details
- An external account is created
- 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
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.
Example response
{
"id": "ExternalAccount:e85dcbd6-dced-4ec4-b756-3c3a9ea3d965",
"customerId": "Customer:da459a29-1fb7-41ce-a4cb-eb3a3c9fd7a7",
"platformAccountId": "acc_123456789",
"currency": "USD",
"accountInfo": {
"accountType": "US_ACCOUNT",
"accountNumber": "123456789",
"routingNumber": "987654321",
"accountCategory": "CHECKING",
"bankName": "Chase Bank",
"beneficiary": {
"beneficiaryType": "INDIVIDUAL",
"fullName": "John Michael Doe",
"birthDate": "1990-01-15",
"nationality": "US",
"address": {
"line1": "123 Main Street",
"line2": "Apt 4B",
"city": "San Francisco",
"state": "CA",
"postalCode": "94105",
"country": "US"
}
}
}
}