Passa al contenuto principale

Questa pagina è disponibile solo in inglese.Apri in inglese

Embedded accounts

In the Embedded mode, people open the account through an invite and use your own app. They have no password and no authenticator app of ours: the sign-in is the one of your app, and your company operates the account through the API.

You choose the mode in White label. The routes of this page work only for embedded accounts. For the others they answer 403 not_allowed, reason embedded_only.

The sign-up inside your app​

Open the link of the invite in an iframe on your website, or in a WebView in your mobile app:

<iframe src="https://cards.example.com/invite/9f3a…" allow="camera; microphone" style="width: 100%; height: 640px; border: 0"></iframe>
  • allow="camera; microphone" is required: the identity verification opens inside the frame, and without it the browser blocks the camera.
  • On a website, the frame opens only on the sites listed in Sites for the sign-up, in White label. In a WebView, or opened directly, the link always works. To develop, list 127.0.0.1 or the name of a tunnel: localhost and names with a port are not accepted.
  • When the identity is approved, the page sends a message to your page. Use it to close the frame. In a WebView there is no page above the frame, so trust the signed events for the rest: user.created, user.kyc.updated and user.cardholder.updated.
window.addEventListener("message", (event) => {
if (event.origin !== "https://cards.example.com") return; // the address of your users' app
if (event.data?.type === "w3c.invite.done") closeSignUp(event.data.userId);
});

The whole path, step by step, is in Integration modes.

A sample page of a company, Your app, with the sign-up of the invite inside a frame.

Wallets​

RouteBodyWhat it does
POST /v2/users/{id}/wallets{"address": "0x…"}Links a wallet to the account
POST /v2/users/{id}/wallets/remove{"address": "0x…"}Removes the wallet

A simple link, without a signature, like the one of the app. Up to 10 wallets per account. A wallet of another account of your program is refused with 409 wallet_in_use. The answer is {"success": true, "user": {...}}.

Only for embedded accounts. In the Open and Private modes the wallet belongs to the person, who links it in the app: a company linking it in their place would gain power over their identity in the contract. The message there is Wallets are linked from the API only for embedded accounts.

If the card issuer asks to verify again​

When user.cardholder.updated arrives with needs_resubmission, the card issuer needs a new verification of the person. Create a new link on the invite of that person, with New link in the panel or POST /v2/invites/{id}/resend, and open it in your app. The old link stops working. The person confirms the email again and goes straight to the identity verification. When it is approved, the card issuer receives the person again and another user.cardholder.updated arrives. The invite shows canResume as true while this is possible.

If a card is not created​

A card that takes longer than usual stays in provisioning, with delayed: true, and needs nothing from your app. The event card.failed arrives only when support closes the request. Everything the request paid is then recorded as credit in the account of the person, also when a wallet of your company paid. The credit shows in credit of the user. To use it or get it back, talk to support.

The secure card screen​

Your app shows the card number, the expiry date and the security code, and the purchase codes, on a secure screen of ours. The card number never passes through your server. Your company stays out of the PCI scope for it, and the card data is not stored anywhere.

POST /v2/cards/{id}/secure-view, with an Idempotency-Key:

viewWhat the screen shows
card (default)The number, the expiry date and the security code
otpThe purchase codes that are still valid
{
"success": true,
"secureView": {
"url": "https://cards.example.com/secure#9f3a…",
"view": "card",
"cardId": "card_7KQ2M9XF3TB1A",
"expiresAt": "2026-11-16T14:30:00Z",
"expiresIn": 300
}
}

Open url in an iframe, in a WebView or directly. In an iframe, allow="clipboard-write" lets Copy number work.

The same sample page with the secure card screen inside a frame.
RuleValue
The linkWorks once, for 5 minutes
The screen, once openWorks for 10 minutes
Showing the card detailsUp to 3 times per screen. They hide by themselves after 5 minutes
Inside an iframeOnly on the sites listed in Sites for the sign-up, in White label. With none, the screen opens only directly or in a WebView

The screen asks for no code from an authenticator app: the account has none of ours, and the single-use link does that job. It shows the brand of your company, Your card with Show card details, or Purchase codes.

Your card, before Show card details.
The details on the screen, with the countdown. The number in this image is an example.
Purchase codes, with a code that is still valid.
MessageWhen
This secure link is not valid. Ask for a new one.A link already used, expired or made up
This secure screen has expired. Open it again from the company's app.After the 10 minutes
Card details from the API are only for embedded accounts.secure-view with a card of an Open or Private account
After the 10 minutes.
A link already used or expired.

Purchase codes​

When a store asks to confirm a purchase, the event card.otp of an embedded account brings the code or the url to approve. Show it in your app, or open the secure screen with view: "otp". The email with the code to the cardholder is always sent too. See Webhooks.