Skip to main content

Security

Capricorn APIs use authentication and authorization controls so only approved supplier systems can access Capricorn services.

Security at a Glance​

Security ComponentPurpose
client_idIdentifies the API consumer.
client_secretAuthenticates the API consumer.
x-captokenAuthorizes access to Capricorn APIs.
HTTPSSecures communication between supplier systems and Capricorn.

client_id and client_secret are issued together as client credentials for authentication, while x-captoken is used for authorization after authentication succeeds.

Authentication​

Authentication confirms the identity of the calling application before Capricorn processes the request.

client_id
client_secret
Example Scenario

A supplier application calls the Get Account API. Capricorn first validates the supplied client_id and client_secret and then checks the required x-captoken before processing the request.

Authorization​

Authorization follows successful authentication and determines whether the application is permitted to perform the requested operation.

Capricorn uses it as the authorization credential and validates it against the services provisioned for the supplier integration before the request can continue.

x-captoken
tip

Authorization ensures approved integrations can access only the services provisioned to them.

x-captoken​

The x-captoken header is the authorization credential used to confirm that the calling application can access the requested Capricorn service.

Important
  • The x-captoken header is mandatory for all Capricorn API requests.
  • The token is supplied during supplier onboarding.
  • Missing or invalid x-captoken values prevent request authorization.
  • The token is long-lived and authorizes access to approved Capricorn services.

Security Flow​

  1. Step 1: Supplier ApplicationStarts the request to Capricorn.
  2. Step 2: client_id + client_secretAuthentication validates the calling application.
  3. Step 3: x-captokenAuthorization confirms access to the provisioned service.
  4. Step 4: Capricorn APIAccepts the request after authentication and authorization succeed.
  5. Step 5: Request ProcessingBegins within Capricorn once the approved request reaches the service.

Each request is authenticated using client_id and client_secret, authorized using x-captoken, and then processed by the Capricorn API.

Integration Security Tips​

  • Credentials
    Store client_id and client_secret securely and use them only for approved Capricorn integrations.
  • x-captoken
    Include the required x-captoken header when calling Capricorn APIs.
  • Secure Transport
    Use HTTPS for all Capricorn API communications.
  • Organisation Boundaries
    Do not share credentials or authorization tokens across organisations.

HTTPS Required​

All communications with Capricorn APIs must use HTTPS. HTTP connections are not supported. Supplier callback URLs and supplier identity-handover endpoints must also use HTTPS.

Credential Management​

  • Store credentials in a secure secrets-management solution.
  • Do not hard-code credentials.
  • Do not commit credentials to source control.
  • Restrict credential access to only the services that require them.

State Validation​

This guidance applies only to Payment Intent integrations that use the browser callback flow.

It applies to the Payment Intent state request-body field and the returned state callback parameter used during that browser callback flow. Refer to the Payment Intent Reference for the canonical callback-flow request and parameter definitions.

The state value supplied during Payment Intent creation should be retained by the supplier application.

When the browser returns through the configured callback URL, validate that the returned state callback parameter exactly matches the original state value before continuing processing. If the values do not match, stop processing the callback response.

Callback URL Validation​

  • Callback URLs must use HTTPS.
  • Callback URLs must be pre-approved during supplier onboarding and restricted to those approved domains.

Identity Handover Security​

This guidance applies only to Member Identity Handover integrations. Refer to Member Identity Handover for the full request and response contract. In that document:

  • The supplier handover POST is the HTTPS request that myCAP sends to the supplier's identity-handover endpoint.
  • x-api-key is the incoming request header on that supplier handover POST.
  • authContextToken is the request-body field in that handover request.
  • returnUrl is the response-body field returned in the supplier's successful handover response.

These values are handover-specific controls for the supplier endpoint and do not replace the client_id, client_secret, and x-captoken credentials required when the supplier later calls Capricorn APIs.

  • Validate x-api-key on incoming requests.
  • Store authContextToken securely.
  • Return only approved returnUrl destinations.
  • Use HTTPS for identity-handover endpoints.