Skip to main content
POST
Create an external card session

Authorizations

Authorization
string
header
required

Bearer authentication header of the form Bearer <token>, where <token> is your auth token.

Path Parameters

userId
string
required

ID of the user.

Pattern: ^user_[A-Za-z0-9]+$

Body

application/json

Parameters for the hosted external card collection session.

Parameters for a hosted external card collection session.

requestId
string<uuid>
required

Client-supplied idempotency key for the session.

Example:

"8f14e45f-ceea-467e-adde-0f8d0f5f4b1c"

counterPartyId
string

Public ID of an existing counter party (prefixed with cpty_) to attach the card to. Omit to have the session collect a new counter party.

Example:

"cpty_7bV1aLcs3Kf9dQ2mNpXwZ"

redirectUrl
string<uri>

URL to redirect to once the hosted session completes.

Example:

"https://example.com/card-onboarding/complete"

recipientEmail
string<email>

If provided, HIFI emails the hosted session link to this address.

Example:

"jane.doe@example.com"

templateId
string<uuid>

ID of a ToS/compliance template to present during the session.

expiresIn
integer
default:3600

Seconds until the session expires.

Required range: 300 <= x <= 604800
Example:

3600

Response

Hosted external card session created successfully.

A hosted external card collection session.

id
string

Public ID of the card session (prefixed with ecs_).

Example:

"ecs_2mNpXwZ7bV1aLcs3Kf9dQ"

userId
string

Public ID of the user this session belongs to (prefixed with usr_).

Example:

"usr_3Kf9dQ2mNpXwZ7bV1aLcs"

counterPartyId
string | null

Public ID of the associated counter party, if one was supplied or has since been created.

Example:

"cpty_7bV1aLcs3Kf9dQ2mNpXwZ"

url
string | null

Hosted session URL, including a fragment-embedded session token. Only present on creation.

Example:

"https://dashboard.hifi.com/sandbox/external-card-sessions/ecs_2mNpXwZ7bV1aLcs3Kf9dQ?userId=usr_3Kf9dQ2mNpXwZ7bV1aLcs#sessionToken=..."

recipientEmail
string | null
Example:

"jane.doe@example.com"

redirectUrl
string | null
Example:

"https://example.com/card-onboarding/complete"

status
enum<string>
Available options:
PENDING,
PROCESSING,
COMPLETED,
EXPIRED
Example:

"PENDING"

expiredAt
string<date-time> | null
Example:

"2026-07-01T11:30:00.000Z"

createdAt
string<date-time>
Example:

"2026-07-01T10:30:00.000Z"

updatedAt
string<date-time>
Example:

"2026-07-01T10:30:00.000Z"