Skip to main content

E-Commerce Integration

Answers to common questions about Payment Intent, hosted checkout, callbacks and Member Identity Handover.

Integration Journey​

What steps should I follow for E-Commerce Integration?

Prepare the checkout details, create a Payment Intent with the transaction context, cartId, state and callback URLs used throughout the journey, receive the Capricorn-hosted payment URL, redirect the member to the hosted checkout, process the resulting callback, validate state, and following a successful checkout submit the final transaction using the original cartId.

What should I do after a successful hosted checkout?

Process the success callback, validate the returned state value, and submit the final transaction using the original cartId.

Where should I send cartId for Post Cart Transaction?

Include the original cartId in the request URL, for example POST /cart/123456XY/transaction, not in the JSON request body. Use the same cart ID carried through the checkout journey. See the Post Cart Transaction reference.

Payment Intent​

What is a Payment Intent and how does it start my hosted checkout?

Payment Intent initiates the Capricorn-hosted checkout journey. The request contains the transaction context, cartId, state and callback URLs, and the response returns the hosted payment URL.

Do I need to include cartId when creating a Payment Intent (POST /payment-intent)?

Yes. For POST /payment-intent, cartId is a required field (1–40 characters). It binds the hosted checkout session to the supplier webstore's active shopping cart. If omitted or empty, the API will return a 400 Bad Request validation error.

Why do I need to keep cartId consistent?

cartId links the E-Commerce transaction journey. Keep the original cartId consistent across Payment Intent, hosted checkout and final transaction submission.

Can I reuse an expired hosted payment URL?

No. If the hosted payment URL is no longer valid, create a new Payment Intent and begin a new hosted checkout journey.

Callback Handling​

Why do I need to include state?

state is returned through the checkout callback journey. Retain the original value when creating the Payment Intent and verify that the returned value matches before continuing application processing.

Can I use HTTP for my callback URLs?

No. Use valid HTTPS callback URLs for success, failure and cancellation outcomes.

What happens if the member cancels the checkout?

The browser is redirected to the configured cancellation callback. The supplier application should return the member to an appropriate cart, order or checkout screen.

Member Identity Handover​

How does Member Identity Handover connect my application with myCAP?

Member Identity Handover transfers authenticated member context from myCAP to the supplier application. The supplier establishes a session and can use the supplied authContextToken when creating a Payment Intent.

What does authContextToken do in my Payment Intent?

authContextToken is an optional Payment Intent value supplied through Member Identity Handover. When present, it links the hosted checkout journey to the authenticated member context.

When would Member Identity Handover be relevant to my integration?

It is relevant when the member begins the journey in myCAP and is handed over to the supplier application with authenticated member context.