- Your backend implements an endpoint to generate an ephemeral key for your customer.
- Your frontend will generate a random secret, and use it to generate a nonce, which will be passed through your backend and then to Bridge to generate a one-time ephemeral key.
- Your frontend will then directly call a special Bridge endpoint with this ephemeral key as the credential, and provide the original secret to prove ownership.
- Bridge will then reveal the card number, security code, and expiration date directly to the frontend, without any sensitive card details passing through your backend.

1. Client derives a Nonce and sends it to your backend
Your client generates a secret, and usesSHA-256
to generate a nonce from the secret, and a deterministic string nonce:{timestamp}
. As this needs to be done in a particular way, you can use the following snippets in your client as a reference:
nonce
from each of these snippets to your backend.
It will then reserve the original clientSecret
and clientTimestamp
it used to generate the nonce, as it will need to be used validate the ephemeral key in step 4 below. The client must not store or reuse the secret or timestamp.
2. Your backend relays the Nonce to Bridge
Your backend will then send the derived nonce to Bridge byPOST
ing to /v0/customers/{customerId}/card_accounts/{cardAccountId}/ephemeral_keys
. The request should contain just the client nonce itself, like so:
client_nonce
is actually from. The responsibility is on your backend to authenticate that the nonce was sent from the right customer to access the right card account.
3. Bridge generates a one-time Ephemeral Key associated to the Nonce
The response returned by Bridge in/v0/customers/{customerId}/card_accounts/{cardAccountId}/ephemeral_keys
will contain just one field, ephemeral_key
, which contains a token that can be used once to reveal the card details. This token expires in 5 minutes.
Here is an example of the response:
4. Your frontend directly calls Bridge with the Ephemeral Key, Nonce, and Secret
To reveal the card credentials, your frontend will directly call a special Bridge endpoint. This endpoint does not require a Bridge API key, and instead requires just ephemeral key itself in theAuthorization
header as the credential, like so:
clientSecret
and clientTimestamp
used to generate the nonce as query parameters in the requested URL, like so:
clientSecret
and clientTimestamp
must be the exact same as what you used to generate the nonce
. Bridge will validate that the ephemeralKey
is associated with the nonce
derived from the same clientSecret
and clientTimestamp
. It will also validate that the ephemeral key has not already been used, and that the key hasn’t expired yet.
This endpoint will return a response similar to the following: