Skip to main content
Use this method to check whether the current customer already has an active connection. If the customer is not connected (or the connection expired), run the connect flow with client.connect(). The SDK runs the check in a hidden frame, decrypts the returned credentials, and primes the client so that subsequent SDK calls (such as getPaymentMethods() or getQuote()) are authenticated automatically.
Get a connection

Parameters

client.getConnection() takes an optional options object.

Result

client.getConnection() returns a Result<Connection, GetConnectionError>.

Result envelope

Result<Connection, GetConnectionError>

Connection

Connection is a discriminated union over status. The fields present depend on the status:

Fields

CustomerCapabilities

Capabilities and regulatory requirements for the customer.

RampsCapability

types.ts

GetConnectionError

GetConnectionError covers failures to run the connection check (for example, a frame handshake timeout).