Member Identity Handover
Overview
Member Identity Handover allows Capricorn to transfer authenticated member context from myCAP to a supplier application.
This flow enables the supplier application to establish an authenticated session and optionally use the returned authContextToken when creating a Payment Intent.
How Identity Handover Works
- 1
Member selects supplier in myCAP
The member starts the handover journey from myCAP.
- 2
myCAP calls supplier identity handover endpoint
Capricorn sends the member context to the supplier endpoint.
- 3
Supplier validates
x-api-keyThe supplier verifies the request before processing it.
- 4
Supplier creates authenticated session
The supplier establishes the member session in its application.
- 5
Supplier returns
returnUrlThe response tells Capricorn where to send the member next.
- 6
Member lands on supplier site
The browser returns to the supplier using the supplied URL.
- 7
Supplier stores
authContextTokenThe supplier retains the token for the follow-on payment journey.
- 8
authContextTokencan be supplied to Payment IntentThe token can later link the payment request to the authenticated member context.
Request
Endpoint
myCAP sends an HTTPS POST request to the supplier's identity handover endpoint.
POST https://your-domain.com/member-identity-handover
Headers
Content-Type: application/jsonx-api-key: API key supplied during onboarding. Accept this header only over HTTPS, and reject requests with a missing or invalid value before creating a session.
Example Request
{
"memberId": "111555",
"memberName": "Acme Auto Workshop",
"authContextToken": "ABC123EFG456"
}
Field Descriptions
memberId(Required): Six-digit numeric Capricorn member identifier.memberName(Required): The member business/account name.authContextToken(Optional): Short-lived token linking the handover to the authenticated member session.
Response
Status Codes
200 OK: The supplier has created the authenticated session and is returning thereturnUrl.400 Bad Request: The supplier rejected the handover because the request body was missing required values or was malformed. The error response body is supplier-defined and intentionally unspecified in this documentation.401 Unauthorized: The supplier rejected the handover because thex-api-keywas missing or invalid. The error response body is supplier-defined and intentionally unspecified in this documentation.
For non-2xx responses, the response body is supplier-defined and intentionally unspecified in this documentation. Capricorn relies on the HTTP status code to determine that the handover did not succeed.
Example Response
{
"returnUrl": "https://your-domain.com/welcome?code=abc123"
}
returnUrl: The URL where Capricorn redirects the member after the supplier creates the session. Use an absolute HTTPS URL on an approved supplier domain registered during onboarding. Query parameters may be included only when needed to continue the supplier session or redirect flow. Use only opaque one-time lookup values in the query string, and do not place sensitive session state directly in the URL.
Implementation Requirements
- The supplier handover endpoint must use HTTPS.
- Validate the
x-api-keyon every request. - Reject requests with a missing or invalid
x-api-keybefore creating a session. - Reject malformed handover requests before creating a session.
- Create an authenticated session before returning the response.
- Store the
authContextTokenfor later use. - Treat the
authContextTokenas sensitive data, avoid logging it, and retain it only for the minimum time needed to support the payment journey. - Return a valid absolute
returnUrlon an approved supplier domain registered during onboarding. - If the
returnUrlincludes query parameters, use only opaque one-time lookup values rather than session state. - Use the
authContextTokenpromptly after handover.
Using authContextToken with Payment Intent
When the member later initiates a purchase, the existing optional authContextToken field documented in the Payment Intent Reference can be supplied in the Payment Intent request.
This links the hosted payment journey to the previously authenticated member context established during Identity Handover.
The following intentionally illustrative partial snippet is pseudocode only. It is not a complete or copy-ready JSON payload:
{
"authContextToken": "ABC123EFG456",
"transactionAmount": 125.50,
"...other fields..."
}