Link Sessions

Link Sessions

Create and exchange link tokens to connect your users to their biller accounts via the Elements. A link token initializes the Connect flow, and after the user completes linking, you exchange the public token for a permanent access token.

Related guides: Link a Biller Account · Elements SDK

POST/v1/link-tokens/exchange

Exchange the public token (received after a user completes the Connect flow) for a permanent access token. The access token is used to retrieve bills on behalf of the user.

Request body

public_token*stringThe public token from the Elements callback
client_id*stringYour BillerAPI client ID
Sample uses your_client_id · sign in to auto-fill your sandbox key
curl -X POST https://sandbox.api.billerapi.com/v1/link-tokens/exchange \
  -H "Content-Type: application/json" \
  -H "Authorization: Bearer $BILLERAPI_API_KEY" \
  -d '{
    "public_token": "pt_sandbox_abc123",
    "client_id": "your_client_id"
  }'
Response200 OK
{
  "success": true,
  "access_token": "at_sandbox_xyz789",
  "biller_id": "test_electric_company",
  "link_id": "link_abc123"
}
Was this page helpful?