Your values Fill in your own to see them in every example
Scheme and host, no path: where your app runs.
That doesn’t look right yet. For example: https://app.example.com
Saved in this browser only, for every page of these docs. Nothing you type leaves this page.
A signed-in session proves someone got in. It doesn’t prove the customer agreed to what happens next. Malware holding a live session, or a caller who talked a customer into reading out a code, can move money from inside a perfectly valid session. Countersign closes that gap: before your app carries out a risky action, the customer sees exactly that action on their own device and confirms it with their passkey. Your server receives a signed proof bound to that one action, usable once and only within a limited time.
Countersign works the same way in staff apps; the Countersign guide has the full reference. This page covers what is particular to a customers app.
Choose what to protect
Ask for a countersignature where a wrong action is costly or hard to undo. For most customer apps that means:
| Action | Why |
|---|---|
| A transfer to someone the customer hasn’t paid before | The usual way money leaves a taken-over account |
| A transfer above an amount you set | Limits the damage of any single mistake |
| A change of phone number, email or address | Changes how the account is reached, which is how takeovers become permanent |
| A higher daily limit, a new card, or a new device | Each one widens what the next action can do |
| Closing the account, or exporting its data | Hard to undo |
Leave routine actions alone. A customer asked to confirm everything stops reading what they confirm.
Turn it on
In the hub, open CIAM → Apps, choose your app and open its Countersign tab. Pick Passkey. Press Try Countersign to see the window your customers will see, with an example transfer; nothing changes in your app.
Ask, show, collect, check
-
Ask from your server. Describe the action and post it to
/countersign/bc-authorize, authenticated as your app, as you are at the token endpoint.login_hintis thesubfrom the customer’s ID token.curl -u "$TRUSTAIGE_CLIENT_ID:$TRUSTAIGE_CLIENT_SECRET" \ https://id.trustaige.com/countersign/bc-authorize \ --data-urlencode "login_hint=$CUSTOMER_SUB" \ --data-urlencode "frame_origin=<your-app-url>" \ --data-urlencode 'authorization_details=[{ "type": "payments.transfer.new_recipient", "summary": "Send ₦250,000 to Chidi Okeke", "fields": [ {"name": "amount", "title": "Amount", "value": "₦250,000", "format": "emphasis"}, {"name": "recipient", "title": "To", "value": "Chidi Okeke", "format": "bold"}, {"name": "account", "title": "Account", "value": "Access Bank · 0123456789"}, {"name": "from", "title": "From", "value": "Savings •••• 7781"} ], "notice": {"text": "You have not sent money to this account before.", "tone": "caution"} }]'Store the
auth_req_idandtxn_hashit returns with the pending transfer. How to describe an action is in Describe the action. -
Show the window. Load
countersign.json your page and open theframe_urlit returned. Trustaige takes the screen over your page.<script src="https://id.trustaige.com/countersign.js"></script> <script> TrustaigeCountersign.open(frameUrl).then(() => collect(transferId)); </script> -
Collect the proof from your server, at
/countersign/token, with theauth_req_id. Until the customer answers you getauthorization_pending;access_deniedmeans they declined, andexpired_tokenthat nobody answered in time. -
Check it before any money moves. The checks are in Check the proof. For a customer, the one that matters most: the proof’s
submust equal thesubof the customer whose session started the transfer.
What your customer sees
The window shows your app’s name and logo, the action in your own words, and every detail you sent, exactly as you sent it. It reads “Only you can confirm this” and shows no name or email: the passkey proves who it is, and the window carries nothing personal for the page beneath it to read. A short reference, derived from the action, appears beside it. Decline is as easy as Confirm with passkey.
Refusals particular to customers
error from bc-authorize | Means |
|---|---|
unknown_user_id | login_hint isn’t one of this app’s customers who has claimed an account. A customers app can’t ask a member of your organization, and a staff app can’t ask a customer. |
access_denied | The customer’s account isn’t active: you suspended or revoked it, or it expired. They can’t approve anything, even if their session in your app is still open. Or the customer recently reported a request as not theirs, and requests to them are paused for a few minutes. The error_description says which. |
unauthorized_client | Countersign is off for this app, or the app was made from a catalog template. |
What is kept
Your server keeps the proof: it is your evidence of exactly what the customer approved, and when. Trustaige records each answer (approved, declined or reported as not theirs) on the customer’s own timeline, which your admins see in the hub’s Customers page. It is not in your organization’s audit log, so when you erase a customer, their answers go with them. Nothing in the proof, the window or the timeline lets another organization recognise the same person.
Next: before you go live.