Skip to main content

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. 1

    Member selects supplier in myCAP

    The member starts the handover journey from myCAP.

  2. 2

    myCAP calls supplier identity handover endpoint

    Capricorn sends the member context to the supplier endpoint.

  3. 3

    Supplier validates x-api-key

    The supplier verifies the request before processing it.

  4. 4

    Supplier creates authenticated session

    The supplier establishes the member session in its application.

  5. 5

    Supplier returns returnUrl

    The response tells Capricorn where to send the member next.

  6. 6

    Member lands on supplier site

    The browser returns to the supplier using the supplied URL.

  7. 7

    Supplier stores authContextToken

    The supplier retains the token for the follow-on payment journey.

  8. 8

    authContextToken can be supplied to Payment Intent

    The 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/json
  • x-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 the returnUrl.
  • 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 the x-api-key was 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-key on every request.
  • Reject requests with a missing or invalid x-api-key before creating a session.
  • Reject malformed handover requests before creating a session.
  • Create an authenticated session before returning the response.
  • Store the authContextToken for later use.
  • Treat the authContextToken as sensitive data, avoid logging it, and retain it only for the minimum time needed to support the payment journey.
  • Return a valid absolute returnUrl on an approved supplier domain registered during onboarding.
  • If the returnUrl includes query parameters, use only opaque one-time lookup values rather than session state.
  • Use the authContextToken promptly 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..."
}