> For the complete documentation index, see [llms.txt](https://docs.ecommerce.seb.ee/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.ecommerce.seb.ee/seb-docs-draft/seb-docs-public-lv/api-atsauce/tirgotaja-api/payments/checkout-sessions/card-checkout-sessions.md).

# Card Checkout Sessions

The Card Checkout Session APIs support customer interactions required to complete and authorize card payments.

A card checkout session is initiated after the customer has entered their card details. Depending on the transaction characteristics and scheme requirements, the Payment Gateway may require additional actions, such as 3-D Secure authentication, before the payment can be authorized.

> The same action may be requested multiple times during a single checkout session. For example, an authorization attempt may initially proceed with 3DS frictionless flow, but the issuer may subsequently require Strong Customer Authentication (SCA), resulting in a 3DS challenge before authorization can continue.

## Create card checkout session

> Starts a new card checkout session for the payment.\
> \
> This endpoint is available only for customer-initiated payments.\
> \
> Direct use of the this operation requires PCI DSS compliance,\
> as sensitive cardholder data is collected and submitted.<br>

```json
{"openapi":"3.1.0","info":{"title":"E-commerce Gateway API","version":"1.0.0"},"tags":[{"description":"The Card Checkout Session APIs support customer interactions required to complete and authorize card payments.\n\nA card checkout session is initiated after the customer has entered their card details.\nDepending on the transaction characteristics and scheme requirements,\nthe Payment Gateway may require additional actions,\nsuch as 3-D Secure authentication, before the payment can be authorized.\n\n> The same action may be requested multiple times during a single checkout session.\nFor example, an authorization attempt may initially proceed with 3DS frictionless flow,\nbut the issuer may subsequently require Strong Customer Authentication (SCA),\nresulting in a 3DS challenge before authorization can continue.\n","name":"Card Checkout Sessions"}],"servers":[{"description":"Production server for live traffic","url":"https://api.ecommerce.seb.ee"},{"description":"Sandbox testing environment","url":"https://sandbox.api.ecommerce.seb.ee"}],"security":[{"oauth2ClientCredentials":[]}],"components":{"securitySchemes":{"oauth2ClientCredentials":{"flows":{"clientCredentials":{"scopes":{},"tokenUrl":"https://api.ecommerce.seb.ee/auth/realms/participants-seb/protocol/openid-connect/token"}},"type":"oauth2"}},"schemas":{"CreateCardCheckoutSessionRequest":{"type":"object","description":"Details required to start a card checkout session for the payment","properties":{"encryptedCard":{"type":"string","description":"Encrypted card details in JWE compact serialization format.\nThe card details must be serialized as JSON before encryption according to the \"CreateCardCheckoutSessionRequest.PlaintextData\" schema.\n","minLength":1}},"required":["encryptedCard"],"title":"Create card checkout session request"},"CheckoutSessionInformationResponse":{"type":"object","description":"Card checkout session details, including its current status and the next action required to complete the payment","properties":{"_links":{"$ref":"#/components/schemas/CheckoutSessionInformationResponse.Links"},"action":{"description":"Next action required to complete the payment, if any","oneOf":[{"$ref":"#/components/schemas/Initiate3DSAuthenticationAction"},{"$ref":"#/components/schemas/InitiateScofAuthenticationAction"},{"$ref":"#/components/schemas/PerformScofAuthenticationAction"},{"$ref":"#/components/schemas/Show3DSChallengeAction"},{"$ref":"#/components/schemas/ShowDccOfferAction"}]},"sessionId":{"type":"string","description":"Unique ID of the checkout session","maxLength":64},"sessionStatus":{"$ref":"#/components/schemas/CheckoutSessionStatus"}}},"CheckoutSessionInformationResponse.Links":{"type":"object","description":"Links related to the checkout session","properties":{"checkoutRedirect":{"$ref":"#/components/schemas/Link","description":"Link to the Gateway hosted checkout page where the customer can complete the payment"}}},"Link":{"type":"object","description":"A hyperlink to a related resource","properties":{"href":{"type":"string","description":"URL of the linked resource"}}},"Initiate3DSAuthenticationAction":{"allOf":[{"$ref":"#/components/schemas/CardAction"},{"type":"object","properties":{"_links":{"$ref":"#/components/schemas/Initiate3DSAuthentication.Links"}}}],"description":"Action indicating that 3DS authentication must be initiated for the payment"},"CardAction":{"type":"object","description":"Next action required to complete a card payment; the type property identifies which action to take","discriminator":{"mapping":{"INITIATE_3DS_AUTHENTICATION":"#/components/schemas/Initiate3DSAuthenticationAction","INITIATE_SCOF_AUTHENTICATION":"#/components/schemas/InitiateScofAuthenticationAction","OFFER_DCC":"#/components/schemas/ShowDccOfferAction","PERFORM_SCOF_AUTHENTICATION":"#/components/schemas/PerformScofAuthenticationAction","SHOW_3DS_CHALLENGE":"#/components/schemas/Show3DSChallengeAction"},"propertyName":"type"},"properties":{"type":{"$ref":"#/components/schemas/SessionActionType"}},"required":["type"]},"SessionActionType":{"type":"string","description":"Identifies the next action required to complete a card payment:\n\n* INITIATE_3DS_AUTHENTICATION - 3DS authentication must be initiated for the payment\n* SHOW_3DS_CHALLENGE - the customer must complete a 3DS challenge to authenticate the payment\n* INITIATE_SCOF_AUTHENTICATION - SCOF authentication must be initiated for the payment\n* PERFORM_SCOF_AUTHENTICATION - the customer must complete a SCOF authentication to authenticate the payment\n","enum":["INITIATE_3DS_AUTHENTICATION","INITIATE_SCOF_AUTHENTICATION","OFFER_DCC","PERFORM_SCOF_AUTHENTICATION","SHOW_3DS_CHALLENGE"]},"Initiate3DSAuthentication.Links":{"type":"object","description":"Links related to initiating 3DS authentication","properties":{"threeDsMethod":{"$ref":"#/components/schemas/Link"}}},"InitiateScofAuthenticationAction":{"allOf":[{"$ref":"#/components/schemas/CardAction"}],"description":"Indicates that SCOF authentication must be started for the checkout session"},"PerformScofAuthenticationAction":{"allOf":[{"$ref":"#/components/schemas/CardAction"},{"type":"object","properties":{"_links":{"$ref":"#/components/schemas/PerformScofAuthenticationAction.Links"}}}],"description":"Indicates that the customer must be redirected to perform the SCOF authentication"},"PerformScofAuthenticationAction.Links":{"type":"object","description":"Links to follow to perform the SCOF authentication","properties":{"redirectUrl":{"$ref":"#/components/schemas/Link","description":"Authentication UI URL where the customer should be redirected to perform the authentication"}}},"Show3DSChallengeAction":{"allOf":[{"$ref":"#/components/schemas/CardAction"},{"type":"object","properties":{"challengeHtml":{"type":"string","description":"3DS challenge HTML content"}}}],"description":"Action indicating that the customer must complete a 3DS challenge to authenticate the payment"},"ShowDccOfferAction":{"allOf":[{"$ref":"#/components/schemas/CardAction"},{"type":"object","properties":{"conversionRate":{"type":"string","description":"DCC conversion rate"},"markup":{"type":"string","description":"Markup percentage"},"transactionAmount":{"$ref":"#/components/schemas/Amount","description":"Transaction amount in cardholder currency after DCC is applied"}}}],"description":"        DCC details for the payment.\n\n        This action is available only for DCC enabled payments.\n","title":"DCC offer action"},"Amount":{"type":"object","description":"Monetary amount together with its currency","properties":{"amount":{"type":"string","description":"The amount given with fractional digits, where fractions must be compliant to the currency definition.\nUp to 14 significant figures. The decimal separator is a dot.\nCan be 0 for account verification (save payment method for future usage without initial payment).\n\n**Example:**\nValid representations for EUR with up to two decimals are:\n  * 1056\n  * 5768.2\n  * 1.50\n  * 5877.78\n"},"currency":{"type":"string","description":"ISO 4217 alpha-3 currency code"}},"required":["amount","currency"]},"CheckoutSessionStatus":{"type":"string","description":"Status of the checkout session","enum":["INITIALIZED","WAITING_AUTHENTICATION","WAITING_CHALLENGE","WAITING_PRE_SCA","WAITING_SCA","WAITING_CONFIRMATION","SENT_FOR_PROCESSING","FAILED","COMPLETED"],"title":"Checkout session status"},"ErrorResponse":{"type":"object","description":"Contains details of the error that occurred during an API call","properties":{"apiClientMessages":{"type":"array","items":{"$ref":"#/components/schemas/ApiClientMessage"}}}},"ApiClientMessage":{"type":"object","description":"A single error message returned for the API call","properties":{"category":{"$ref":"#/components/schemas/ApiClientMessage.Category"},"code":{"type":"string","description":"Error code"},"text":{"type":"string","description":"Description of the error"}}},"ApiClientMessage.Category":{"type":"string","description":"Severity category of the message:\n\n* ERROR - the request could not be processed\n","enum":["ERROR"]}}},"paths":{"/egw/{version}/payments/{paymentId}/sessions/card":{"post":{"description":"Starts a new card checkout session for the payment.\n\nThis endpoint is available only for customer-initiated payments.\n\nDirect use of the this operation requires PCI DSS compliance,\nas sensitive cardholder data is collected and submitted.\n","operationId":"createCardCheckoutSession","parameters":[{"description":"ID of the request, unique to the call, as determined by the initiating party","in":"header","name":"X-Request-Id","required":true,"schema":{"type":"string","format":"uuid","description":"ID of the request, unique to the call, as determined by the initiating party"}},{"description":"Unique ID of the payment","in":"path","name":"paymentId","required":true,"schema":{"type":"string","description":"Unique ID of the payment","maxLength":64}},{"in":"path","name":"version","required":true,"schema":{"type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateCardCheckoutSessionRequest"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CheckoutSessionInformationResponse"}}},"description":"OK"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Bad Request"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Forbidden"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Not Found"},"409":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Conflict"},"503":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Service Unavailable"}},"summary":"Create card checkout session","tags":["Card Checkout Sessions"]}}}}
```

## Get payment's checkout session

> Get previously created checkout session

```json
{"openapi":"3.1.0","info":{"title":"E-commerce Gateway API","version":"1.0.0"},"tags":[{"description":"The Card Checkout Session APIs support customer interactions required to complete and authorize card payments.\n\nA card checkout session is initiated after the customer has entered their card details.\nDepending on the transaction characteristics and scheme requirements,\nthe Payment Gateway may require additional actions,\nsuch as 3-D Secure authentication, before the payment can be authorized.\n\n> The same action may be requested multiple times during a single checkout session.\nFor example, an authorization attempt may initially proceed with 3DS frictionless flow,\nbut the issuer may subsequently require Strong Customer Authentication (SCA),\nresulting in a 3DS challenge before authorization can continue.\n","name":"Card Checkout Sessions"}],"servers":[{"description":"Production server for live traffic","url":"https://api.ecommerce.seb.ee"},{"description":"Sandbox testing environment","url":"https://sandbox.api.ecommerce.seb.ee"}],"security":[{"oauth2ClientCredentials":[]}],"components":{"securitySchemes":{"oauth2ClientCredentials":{"flows":{"clientCredentials":{"scopes":{},"tokenUrl":"https://api.ecommerce.seb.ee/auth/realms/participants-seb/protocol/openid-connect/token"}},"type":"oauth2"}},"schemas":{"CheckoutSessionInformationResponse":{"type":"object","description":"Card checkout session details, including its current status and the next action required to complete the payment","properties":{"_links":{"$ref":"#/components/schemas/CheckoutSessionInformationResponse.Links"},"action":{"description":"Next action required to complete the payment, if any","oneOf":[{"$ref":"#/components/schemas/Initiate3DSAuthenticationAction"},{"$ref":"#/components/schemas/InitiateScofAuthenticationAction"},{"$ref":"#/components/schemas/PerformScofAuthenticationAction"},{"$ref":"#/components/schemas/Show3DSChallengeAction"},{"$ref":"#/components/schemas/ShowDccOfferAction"}]},"sessionId":{"type":"string","description":"Unique ID of the checkout session","maxLength":64},"sessionStatus":{"$ref":"#/components/schemas/CheckoutSessionStatus"}}},"CheckoutSessionInformationResponse.Links":{"type":"object","description":"Links related to the checkout session","properties":{"checkoutRedirect":{"$ref":"#/components/schemas/Link","description":"Link to the Gateway hosted checkout page where the customer can complete the payment"}}},"Link":{"type":"object","description":"A hyperlink to a related resource","properties":{"href":{"type":"string","description":"URL of the linked resource"}}},"Initiate3DSAuthenticationAction":{"allOf":[{"$ref":"#/components/schemas/CardAction"},{"type":"object","properties":{"_links":{"$ref":"#/components/schemas/Initiate3DSAuthentication.Links"}}}],"description":"Action indicating that 3DS authentication must be initiated for the payment"},"CardAction":{"type":"object","description":"Next action required to complete a card payment; the type property identifies which action to take","discriminator":{"mapping":{"INITIATE_3DS_AUTHENTICATION":"#/components/schemas/Initiate3DSAuthenticationAction","INITIATE_SCOF_AUTHENTICATION":"#/components/schemas/InitiateScofAuthenticationAction","OFFER_DCC":"#/components/schemas/ShowDccOfferAction","PERFORM_SCOF_AUTHENTICATION":"#/components/schemas/PerformScofAuthenticationAction","SHOW_3DS_CHALLENGE":"#/components/schemas/Show3DSChallengeAction"},"propertyName":"type"},"properties":{"type":{"$ref":"#/components/schemas/SessionActionType"}},"required":["type"]},"SessionActionType":{"type":"string","description":"Identifies the next action required to complete a card payment:\n\n* INITIATE_3DS_AUTHENTICATION - 3DS authentication must be initiated for the payment\n* SHOW_3DS_CHALLENGE - the customer must complete a 3DS challenge to authenticate the payment\n* INITIATE_SCOF_AUTHENTICATION - SCOF authentication must be initiated for the payment\n* PERFORM_SCOF_AUTHENTICATION - the customer must complete a SCOF authentication to authenticate the payment\n","enum":["INITIATE_3DS_AUTHENTICATION","INITIATE_SCOF_AUTHENTICATION","OFFER_DCC","PERFORM_SCOF_AUTHENTICATION","SHOW_3DS_CHALLENGE"]},"Initiate3DSAuthentication.Links":{"type":"object","description":"Links related to initiating 3DS authentication","properties":{"threeDsMethod":{"$ref":"#/components/schemas/Link"}}},"InitiateScofAuthenticationAction":{"allOf":[{"$ref":"#/components/schemas/CardAction"}],"description":"Indicates that SCOF authentication must be started for the checkout session"},"PerformScofAuthenticationAction":{"allOf":[{"$ref":"#/components/schemas/CardAction"},{"type":"object","properties":{"_links":{"$ref":"#/components/schemas/PerformScofAuthenticationAction.Links"}}}],"description":"Indicates that the customer must be redirected to perform the SCOF authentication"},"PerformScofAuthenticationAction.Links":{"type":"object","description":"Links to follow to perform the SCOF authentication","properties":{"redirectUrl":{"$ref":"#/components/schemas/Link","description":"Authentication UI URL where the customer should be redirected to perform the authentication"}}},"Show3DSChallengeAction":{"allOf":[{"$ref":"#/components/schemas/CardAction"},{"type":"object","properties":{"challengeHtml":{"type":"string","description":"3DS challenge HTML content"}}}],"description":"Action indicating that the customer must complete a 3DS challenge to authenticate the payment"},"ShowDccOfferAction":{"allOf":[{"$ref":"#/components/schemas/CardAction"},{"type":"object","properties":{"conversionRate":{"type":"string","description":"DCC conversion rate"},"markup":{"type":"string","description":"Markup percentage"},"transactionAmount":{"$ref":"#/components/schemas/Amount","description":"Transaction amount in cardholder currency after DCC is applied"}}}],"description":"        DCC details for the payment.\n\n        This action is available only for DCC enabled payments.\n","title":"DCC offer action"},"Amount":{"type":"object","description":"Monetary amount together with its currency","properties":{"amount":{"type":"string","description":"The amount given with fractional digits, where fractions must be compliant to the currency definition.\nUp to 14 significant figures. The decimal separator is a dot.\nCan be 0 for account verification (save payment method for future usage without initial payment).\n\n**Example:**\nValid representations for EUR with up to two decimals are:\n  * 1056\n  * 5768.2\n  * 1.50\n  * 5877.78\n"},"currency":{"type":"string","description":"ISO 4217 alpha-3 currency code"}},"required":["amount","currency"]},"CheckoutSessionStatus":{"type":"string","description":"Status of the checkout session","enum":["INITIALIZED","WAITING_AUTHENTICATION","WAITING_CHALLENGE","WAITING_PRE_SCA","WAITING_SCA","WAITING_CONFIRMATION","SENT_FOR_PROCESSING","FAILED","COMPLETED"],"title":"Checkout session status"},"ErrorResponse":{"type":"object","description":"Contains details of the error that occurred during an API call","properties":{"apiClientMessages":{"type":"array","items":{"$ref":"#/components/schemas/ApiClientMessage"}}}},"ApiClientMessage":{"type":"object","description":"A single error message returned for the API call","properties":{"category":{"$ref":"#/components/schemas/ApiClientMessage.Category"},"code":{"type":"string","description":"Error code"},"text":{"type":"string","description":"Description of the error"}}},"ApiClientMessage.Category":{"type":"string","description":"Severity category of the message:\n\n* ERROR - the request could not be processed\n","enum":["ERROR"]}}},"paths":{"/egw/{version}/payments/{paymentId}/sessions/{sessionId}/card":{"get":{"description":"Get previously created checkout session","operationId":"getCardCheckoutSessionInformation","parameters":[{"description":"ID of the request, unique to the call, as determined by the initiating party","in":"header","name":"X-Request-Id","required":true,"schema":{"type":"string","format":"uuid","description":"ID of the request, unique to the call, as determined by the initiating party"}},{"description":"Unique ID of the payment","in":"path","name":"paymentId","required":true,"schema":{"type":"string","description":"Unique ID of the payment","maxLength":64}},{"description":"Unique ID of the checkout session","in":"path","name":"sessionId","required":true,"schema":{"type":"string","description":"Unique ID of the checkout session","maxLength":64}},{"in":"path","name":"version","required":true,"schema":{"type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CheckoutSessionInformationResponse"}}},"description":"OK"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Bad Request"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Forbidden"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Not Found"},"409":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Conflict"},"503":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Service Unavailable"}},"summary":"Get payment's checkout session","tags":["Card Checkout Sessions"]}}}}
```

## Complete DCC details

> &#x20;       Completes the DCC details for the payment.\
> \
> &#x20;       This endpoint is available only for DCC enabled payments.<br>

```json
{"openapi":"3.1.0","info":{"title":"E-commerce Gateway API","version":"1.0.0"},"tags":[{"description":"The Card Checkout Session APIs support customer interactions required to complete and authorize card payments.\n\nA card checkout session is initiated after the customer has entered their card details.\nDepending on the transaction characteristics and scheme requirements,\nthe Payment Gateway may require additional actions,\nsuch as 3-D Secure authentication, before the payment can be authorized.\n\n> The same action may be requested multiple times during a single checkout session.\nFor example, an authorization attempt may initially proceed with 3DS frictionless flow,\nbut the issuer may subsequently require Strong Customer Authentication (SCA),\nresulting in a 3DS challenge before authorization can continue.\n","name":"Card Checkout Sessions"}],"servers":[{"description":"Production server for live traffic","url":"https://api.ecommerce.seb.ee"},{"description":"Sandbox testing environment","url":"https://sandbox.api.ecommerce.seb.ee"}],"security":[{"oauth2ClientCredentials":[]}],"components":{"securitySchemes":{"oauth2ClientCredentials":{"flows":{"clientCredentials":{"scopes":{},"tokenUrl":"https://api.ecommerce.seb.ee/auth/realms/participants-seb/protocol/openid-connect/token"}},"type":"oauth2"}},"schemas":{"CompleteDccOfferRequest":{"type":"object","description":"        Completes the DCC offer for the payment.\n\n        This response request is available only for DCC enabled payments.\n","properties":{"cardholderResponse":{"type":"string"}},"required":["cardholderResponse"],"title":"Complete DCC offer request"},"CheckoutSessionInformationResponse":{"type":"object","description":"Card checkout session details, including its current status and the next action required to complete the payment","properties":{"_links":{"$ref":"#/components/schemas/CheckoutSessionInformationResponse.Links"},"action":{"description":"Next action required to complete the payment, if any","oneOf":[{"$ref":"#/components/schemas/Initiate3DSAuthenticationAction"},{"$ref":"#/components/schemas/InitiateScofAuthenticationAction"},{"$ref":"#/components/schemas/PerformScofAuthenticationAction"},{"$ref":"#/components/schemas/Show3DSChallengeAction"},{"$ref":"#/components/schemas/ShowDccOfferAction"}]},"sessionId":{"type":"string","description":"Unique ID of the checkout session","maxLength":64},"sessionStatus":{"$ref":"#/components/schemas/CheckoutSessionStatus"}}},"CheckoutSessionInformationResponse.Links":{"type":"object","description":"Links related to the checkout session","properties":{"checkoutRedirect":{"$ref":"#/components/schemas/Link","description":"Link to the Gateway hosted checkout page where the customer can complete the payment"}}},"Link":{"type":"object","description":"A hyperlink to a related resource","properties":{"href":{"type":"string","description":"URL of the linked resource"}}},"Initiate3DSAuthenticationAction":{"allOf":[{"$ref":"#/components/schemas/CardAction"},{"type":"object","properties":{"_links":{"$ref":"#/components/schemas/Initiate3DSAuthentication.Links"}}}],"description":"Action indicating that 3DS authentication must be initiated for the payment"},"CardAction":{"type":"object","description":"Next action required to complete a card payment; the type property identifies which action to take","discriminator":{"mapping":{"INITIATE_3DS_AUTHENTICATION":"#/components/schemas/Initiate3DSAuthenticationAction","INITIATE_SCOF_AUTHENTICATION":"#/components/schemas/InitiateScofAuthenticationAction","OFFER_DCC":"#/components/schemas/ShowDccOfferAction","PERFORM_SCOF_AUTHENTICATION":"#/components/schemas/PerformScofAuthenticationAction","SHOW_3DS_CHALLENGE":"#/components/schemas/Show3DSChallengeAction"},"propertyName":"type"},"properties":{"type":{"$ref":"#/components/schemas/SessionActionType"}},"required":["type"]},"SessionActionType":{"type":"string","description":"Identifies the next action required to complete a card payment:\n\n* INITIATE_3DS_AUTHENTICATION - 3DS authentication must be initiated for the payment\n* SHOW_3DS_CHALLENGE - the customer must complete a 3DS challenge to authenticate the payment\n* INITIATE_SCOF_AUTHENTICATION - SCOF authentication must be initiated for the payment\n* PERFORM_SCOF_AUTHENTICATION - the customer must complete a SCOF authentication to authenticate the payment\n","enum":["INITIATE_3DS_AUTHENTICATION","INITIATE_SCOF_AUTHENTICATION","OFFER_DCC","PERFORM_SCOF_AUTHENTICATION","SHOW_3DS_CHALLENGE"]},"Initiate3DSAuthentication.Links":{"type":"object","description":"Links related to initiating 3DS authentication","properties":{"threeDsMethod":{"$ref":"#/components/schemas/Link"}}},"InitiateScofAuthenticationAction":{"allOf":[{"$ref":"#/components/schemas/CardAction"}],"description":"Indicates that SCOF authentication must be started for the checkout session"},"PerformScofAuthenticationAction":{"allOf":[{"$ref":"#/components/schemas/CardAction"},{"type":"object","properties":{"_links":{"$ref":"#/components/schemas/PerformScofAuthenticationAction.Links"}}}],"description":"Indicates that the customer must be redirected to perform the SCOF authentication"},"PerformScofAuthenticationAction.Links":{"type":"object","description":"Links to follow to perform the SCOF authentication","properties":{"redirectUrl":{"$ref":"#/components/schemas/Link","description":"Authentication UI URL where the customer should be redirected to perform the authentication"}}},"Show3DSChallengeAction":{"allOf":[{"$ref":"#/components/schemas/CardAction"},{"type":"object","properties":{"challengeHtml":{"type":"string","description":"3DS challenge HTML content"}}}],"description":"Action indicating that the customer must complete a 3DS challenge to authenticate the payment"},"ShowDccOfferAction":{"allOf":[{"$ref":"#/components/schemas/CardAction"},{"type":"object","properties":{"conversionRate":{"type":"string","description":"DCC conversion rate"},"markup":{"type":"string","description":"Markup percentage"},"transactionAmount":{"$ref":"#/components/schemas/Amount","description":"Transaction amount in cardholder currency after DCC is applied"}}}],"description":"        DCC details for the payment.\n\n        This action is available only for DCC enabled payments.\n","title":"DCC offer action"},"Amount":{"type":"object","description":"Monetary amount together with its currency","properties":{"amount":{"type":"string","description":"The amount given with fractional digits, where fractions must be compliant to the currency definition.\nUp to 14 significant figures. The decimal separator is a dot.\nCan be 0 for account verification (save payment method for future usage without initial payment).\n\n**Example:**\nValid representations for EUR with up to two decimals are:\n  * 1056\n  * 5768.2\n  * 1.50\n  * 5877.78\n"},"currency":{"type":"string","description":"ISO 4217 alpha-3 currency code"}},"required":["amount","currency"]},"CheckoutSessionStatus":{"type":"string","description":"Status of the checkout session","enum":["INITIALIZED","WAITING_AUTHENTICATION","WAITING_CHALLENGE","WAITING_PRE_SCA","WAITING_SCA","WAITING_CONFIRMATION","SENT_FOR_PROCESSING","FAILED","COMPLETED"],"title":"Checkout session status"},"ErrorResponse":{"type":"object","description":"Contains details of the error that occurred during an API call","properties":{"apiClientMessages":{"type":"array","items":{"$ref":"#/components/schemas/ApiClientMessage"}}}},"ApiClientMessage":{"type":"object","description":"A single error message returned for the API call","properties":{"category":{"$ref":"#/components/schemas/ApiClientMessage.Category"},"code":{"type":"string","description":"Error code"},"text":{"type":"string","description":"Description of the error"}}},"ApiClientMessage.Category":{"type":"string","description":"Severity category of the message:\n\n* ERROR - the request could not be processed\n","enum":["ERROR"]}}},"paths":{"/egw/{version}/payments/{paymentId}/sessions/{sessionId}/card/dcc/complete":{"patch":{"description":"        Completes the DCC details for the payment.\n\n        This endpoint is available only for DCC enabled payments.\n","operationId":"completeDccOffer","parameters":[{"description":"ID of the request, unique to the call, as determined by the initiating party","in":"header","name":"X-Request-Id","required":true,"schema":{"type":"string","format":"uuid","description":"ID of the request, unique to the call, as determined by the initiating party"}},{"description":"Unique ID of the payment","in":"path","name":"paymentId","required":true,"schema":{"type":"string","description":"Unique ID of the payment","maxLength":64}},{"description":"Unique ID of the checkout session","in":"path","name":"sessionId","required":true,"schema":{"type":"string","description":"Unique ID of the checkout session","maxLength":64}},{"in":"path","name":"version","required":true,"schema":{"type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CompleteDccOfferRequest"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CheckoutSessionInformationResponse"}}},"description":"OK"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Bad Request"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Forbidden"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Not Found"},"409":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Conflict"},"503":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Service Unavailable"}},"summary":"Complete DCC details","tags":["Card Checkout Sessions"]}}}}
```

## Initiate SCOF authentication

> Initiate SCOF authentication for the payment

```json
{"openapi":"3.1.0","info":{"title":"E-commerce Gateway API","version":"1.0.0"},"tags":[{"description":"The Card Checkout Session APIs support customer interactions required to complete and authorize card payments.\n\nA card checkout session is initiated after the customer has entered their card details.\nDepending on the transaction characteristics and scheme requirements,\nthe Payment Gateway may require additional actions,\nsuch as 3-D Secure authentication, before the payment can be authorized.\n\n> The same action may be requested multiple times during a single checkout session.\nFor example, an authorization attempt may initially proceed with 3DS frictionless flow,\nbut the issuer may subsequently require Strong Customer Authentication (SCA),\nresulting in a 3DS challenge before authorization can continue.\n","name":"Card Checkout Sessions"}],"servers":[{"description":"Production server for live traffic","url":"https://api.ecommerce.seb.ee"},{"description":"Sandbox testing environment","url":"https://sandbox.api.ecommerce.seb.ee"}],"security":[{"oauth2ClientCredentials":[]}],"components":{"securitySchemes":{"oauth2ClientCredentials":{"flows":{"clientCredentials":{"scopes":{},"tokenUrl":"https://api.ecommerce.seb.ee/auth/realms/participants-seb/protocol/openid-connect/token"}},"type":"oauth2"}},"schemas":{"InitiateScofAuthenticationRequest":{"type":"object","description":"Starts the SCOF authentication for the checkout session","properties":{"callbackUrl":{"type":"string","description":"URL where the customer will be redirected to and where the authentication result will be sent."},"consumerDeviceData":{"$ref":"#/components/schemas/ScofConsumerDeviceData","description":"Data about the consumer device used for the payment."}},"title":"SCOF authentication request"},"ScofConsumerDeviceData":{"type":"object","description":"Browser data for SCOF managed authentication","properties":{"browserScreenHeight":{"type":"string","description":"Total height of the Cardholder's screen in pixels"},"browserScreenWidth":{"type":"string","description":"Total width of the Cardholder's screen in pixels"},"browserUserAgent":{"type":"string","description":"Exact content of the HTTP user-agent header"}}},"CheckoutSessionInformationResponse":{"type":"object","description":"Card checkout session details, including its current status and the next action required to complete the payment","properties":{"_links":{"$ref":"#/components/schemas/CheckoutSessionInformationResponse.Links"},"action":{"description":"Next action required to complete the payment, if any","oneOf":[{"$ref":"#/components/schemas/Initiate3DSAuthenticationAction"},{"$ref":"#/components/schemas/InitiateScofAuthenticationAction"},{"$ref":"#/components/schemas/PerformScofAuthenticationAction"},{"$ref":"#/components/schemas/Show3DSChallengeAction"},{"$ref":"#/components/schemas/ShowDccOfferAction"}]},"sessionId":{"type":"string","description":"Unique ID of the checkout session","maxLength":64},"sessionStatus":{"$ref":"#/components/schemas/CheckoutSessionStatus"}}},"CheckoutSessionInformationResponse.Links":{"type":"object","description":"Links related to the checkout session","properties":{"checkoutRedirect":{"$ref":"#/components/schemas/Link","description":"Link to the Gateway hosted checkout page where the customer can complete the payment"}}},"Link":{"type":"object","description":"A hyperlink to a related resource","properties":{"href":{"type":"string","description":"URL of the linked resource"}}},"Initiate3DSAuthenticationAction":{"allOf":[{"$ref":"#/components/schemas/CardAction"},{"type":"object","properties":{"_links":{"$ref":"#/components/schemas/Initiate3DSAuthentication.Links"}}}],"description":"Action indicating that 3DS authentication must be initiated for the payment"},"CardAction":{"type":"object","description":"Next action required to complete a card payment; the type property identifies which action to take","discriminator":{"mapping":{"INITIATE_3DS_AUTHENTICATION":"#/components/schemas/Initiate3DSAuthenticationAction","INITIATE_SCOF_AUTHENTICATION":"#/components/schemas/InitiateScofAuthenticationAction","OFFER_DCC":"#/components/schemas/ShowDccOfferAction","PERFORM_SCOF_AUTHENTICATION":"#/components/schemas/PerformScofAuthenticationAction","SHOW_3DS_CHALLENGE":"#/components/schemas/Show3DSChallengeAction"},"propertyName":"type"},"properties":{"type":{"$ref":"#/components/schemas/SessionActionType"}},"required":["type"]},"SessionActionType":{"type":"string","description":"Identifies the next action required to complete a card payment:\n\n* INITIATE_3DS_AUTHENTICATION - 3DS authentication must be initiated for the payment\n* SHOW_3DS_CHALLENGE - the customer must complete a 3DS challenge to authenticate the payment\n* INITIATE_SCOF_AUTHENTICATION - SCOF authentication must be initiated for the payment\n* PERFORM_SCOF_AUTHENTICATION - the customer must complete a SCOF authentication to authenticate the payment\n","enum":["INITIATE_3DS_AUTHENTICATION","INITIATE_SCOF_AUTHENTICATION","OFFER_DCC","PERFORM_SCOF_AUTHENTICATION","SHOW_3DS_CHALLENGE"]},"Initiate3DSAuthentication.Links":{"type":"object","description":"Links related to initiating 3DS authentication","properties":{"threeDsMethod":{"$ref":"#/components/schemas/Link"}}},"InitiateScofAuthenticationAction":{"allOf":[{"$ref":"#/components/schemas/CardAction"}],"description":"Indicates that SCOF authentication must be started for the checkout session"},"PerformScofAuthenticationAction":{"allOf":[{"$ref":"#/components/schemas/CardAction"},{"type":"object","properties":{"_links":{"$ref":"#/components/schemas/PerformScofAuthenticationAction.Links"}}}],"description":"Indicates that the customer must be redirected to perform the SCOF authentication"},"PerformScofAuthenticationAction.Links":{"type":"object","description":"Links to follow to perform the SCOF authentication","properties":{"redirectUrl":{"$ref":"#/components/schemas/Link","description":"Authentication UI URL where the customer should be redirected to perform the authentication"}}},"Show3DSChallengeAction":{"allOf":[{"$ref":"#/components/schemas/CardAction"},{"type":"object","properties":{"challengeHtml":{"type":"string","description":"3DS challenge HTML content"}}}],"description":"Action indicating that the customer must complete a 3DS challenge to authenticate the payment"},"ShowDccOfferAction":{"allOf":[{"$ref":"#/components/schemas/CardAction"},{"type":"object","properties":{"conversionRate":{"type":"string","description":"DCC conversion rate"},"markup":{"type":"string","description":"Markup percentage"},"transactionAmount":{"$ref":"#/components/schemas/Amount","description":"Transaction amount in cardholder currency after DCC is applied"}}}],"description":"        DCC details for the payment.\n\n        This action is available only for DCC enabled payments.\n","title":"DCC offer action"},"Amount":{"type":"object","description":"Monetary amount together with its currency","properties":{"amount":{"type":"string","description":"The amount given with fractional digits, where fractions must be compliant to the currency definition.\nUp to 14 significant figures. The decimal separator is a dot.\nCan be 0 for account verification (save payment method for future usage without initial payment).\n\n**Example:**\nValid representations for EUR with up to two decimals are:\n  * 1056\n  * 5768.2\n  * 1.50\n  * 5877.78\n"},"currency":{"type":"string","description":"ISO 4217 alpha-3 currency code"}},"required":["amount","currency"]},"CheckoutSessionStatus":{"type":"string","description":"Status of the checkout session","enum":["INITIALIZED","WAITING_AUTHENTICATION","WAITING_CHALLENGE","WAITING_PRE_SCA","WAITING_SCA","WAITING_CONFIRMATION","SENT_FOR_PROCESSING","FAILED","COMPLETED"],"title":"Checkout session status"},"ErrorResponse":{"type":"object","description":"Contains details of the error that occurred during an API call","properties":{"apiClientMessages":{"type":"array","items":{"$ref":"#/components/schemas/ApiClientMessage"}}}},"ApiClientMessage":{"type":"object","description":"A single error message returned for the API call","properties":{"category":{"$ref":"#/components/schemas/ApiClientMessage.Category"},"code":{"type":"string","description":"Error code"},"text":{"type":"string","description":"Description of the error"}}},"ApiClientMessage.Category":{"type":"string","description":"Severity category of the message:\n\n* ERROR - the request could not be processed\n","enum":["ERROR"]}}},"paths":{"/egw/{version}/payments/{paymentId}/sessions/{sessionId}/card/scof/authentication":{"patch":{"description":"Initiate SCOF authentication for the payment","operationId":"initiateCardScofAuthentication","parameters":[{"description":"ID of the request, unique to the call, as determined by the initiating party","in":"header","name":"X-Request-Id","required":true,"schema":{"type":"string","format":"uuid","description":"ID of the request, unique to the call, as determined by the initiating party"}},{"description":"Unique ID of the payment","in":"path","name":"paymentId","required":true,"schema":{"type":"string","description":"Unique ID of the payment","maxLength":64}},{"description":"Unique ID of the checkout session","in":"path","name":"sessionId","required":true,"schema":{"type":"string","description":"Unique ID of the checkout session","maxLength":64}},{"in":"path","name":"version","required":true,"schema":{"type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/InitiateScofAuthenticationRequest"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CheckoutSessionInformationResponse"}}},"description":"OK"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Bad Request"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Forbidden"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Not Found"},"409":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Conflict"},"503":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Service Unavailable"}},"summary":"Initiate SCOF authentication","tags":["Card Checkout Sessions"]}}}}
```

## Complete SCOF authentication

> Complete SCOF authentication for the payment

```json
{"openapi":"3.1.0","info":{"title":"E-commerce Gateway API","version":"1.0.0"},"tags":[{"description":"The Card Checkout Session APIs support customer interactions required to complete and authorize card payments.\n\nA card checkout session is initiated after the customer has entered their card details.\nDepending on the transaction characteristics and scheme requirements,\nthe Payment Gateway may require additional actions,\nsuch as 3-D Secure authentication, before the payment can be authorized.\n\n> The same action may be requested multiple times during a single checkout session.\nFor example, an authorization attempt may initially proceed with 3DS frictionless flow,\nbut the issuer may subsequently require Strong Customer Authentication (SCA),\nresulting in a 3DS challenge before authorization can continue.\n","name":"Card Checkout Sessions"}],"servers":[{"description":"Production server for live traffic","url":"https://api.ecommerce.seb.ee"},{"description":"Sandbox testing environment","url":"https://sandbox.api.ecommerce.seb.ee"}],"security":[{"oauth2ClientCredentials":[]}],"components":{"securitySchemes":{"oauth2ClientCredentials":{"flows":{"clientCredentials":{"scopes":{},"tokenUrl":"https://api.ecommerce.seb.ee/auth/realms/participants-seb/protocol/openid-connect/token"}},"type":"oauth2"}},"schemas":{"CompleteScofAuthenticationRequest":{"type":"object","description":"Completes the SCOF authentication of the checkout session with the result received from the authentication UI","properties":{"authenticationResult":{"type":"string","description":"Authentication result, as received in the callback","minLength":1}},"required":["authenticationResult"],"title":"SCOF authentication completion request"},"CheckoutSessionInformationResponse":{"type":"object","description":"Card checkout session details, including its current status and the next action required to complete the payment","properties":{"_links":{"$ref":"#/components/schemas/CheckoutSessionInformationResponse.Links"},"action":{"description":"Next action required to complete the payment, if any","oneOf":[{"$ref":"#/components/schemas/Initiate3DSAuthenticationAction"},{"$ref":"#/components/schemas/InitiateScofAuthenticationAction"},{"$ref":"#/components/schemas/PerformScofAuthenticationAction"},{"$ref":"#/components/schemas/Show3DSChallengeAction"},{"$ref":"#/components/schemas/ShowDccOfferAction"}]},"sessionId":{"type":"string","description":"Unique ID of the checkout session","maxLength":64},"sessionStatus":{"$ref":"#/components/schemas/CheckoutSessionStatus"}}},"CheckoutSessionInformationResponse.Links":{"type":"object","description":"Links related to the checkout session","properties":{"checkoutRedirect":{"$ref":"#/components/schemas/Link","description":"Link to the Gateway hosted checkout page where the customer can complete the payment"}}},"Link":{"type":"object","description":"A hyperlink to a related resource","properties":{"href":{"type":"string","description":"URL of the linked resource"}}},"Initiate3DSAuthenticationAction":{"allOf":[{"$ref":"#/components/schemas/CardAction"},{"type":"object","properties":{"_links":{"$ref":"#/components/schemas/Initiate3DSAuthentication.Links"}}}],"description":"Action indicating that 3DS authentication must be initiated for the payment"},"CardAction":{"type":"object","description":"Next action required to complete a card payment; the type property identifies which action to take","discriminator":{"mapping":{"INITIATE_3DS_AUTHENTICATION":"#/components/schemas/Initiate3DSAuthenticationAction","INITIATE_SCOF_AUTHENTICATION":"#/components/schemas/InitiateScofAuthenticationAction","OFFER_DCC":"#/components/schemas/ShowDccOfferAction","PERFORM_SCOF_AUTHENTICATION":"#/components/schemas/PerformScofAuthenticationAction","SHOW_3DS_CHALLENGE":"#/components/schemas/Show3DSChallengeAction"},"propertyName":"type"},"properties":{"type":{"$ref":"#/components/schemas/SessionActionType"}},"required":["type"]},"SessionActionType":{"type":"string","description":"Identifies the next action required to complete a card payment:\n\n* INITIATE_3DS_AUTHENTICATION - 3DS authentication must be initiated for the payment\n* SHOW_3DS_CHALLENGE - the customer must complete a 3DS challenge to authenticate the payment\n* INITIATE_SCOF_AUTHENTICATION - SCOF authentication must be initiated for the payment\n* PERFORM_SCOF_AUTHENTICATION - the customer must complete a SCOF authentication to authenticate the payment\n","enum":["INITIATE_3DS_AUTHENTICATION","INITIATE_SCOF_AUTHENTICATION","OFFER_DCC","PERFORM_SCOF_AUTHENTICATION","SHOW_3DS_CHALLENGE"]},"Initiate3DSAuthentication.Links":{"type":"object","description":"Links related to initiating 3DS authentication","properties":{"threeDsMethod":{"$ref":"#/components/schemas/Link"}}},"InitiateScofAuthenticationAction":{"allOf":[{"$ref":"#/components/schemas/CardAction"}],"description":"Indicates that SCOF authentication must be started for the checkout session"},"PerformScofAuthenticationAction":{"allOf":[{"$ref":"#/components/schemas/CardAction"},{"type":"object","properties":{"_links":{"$ref":"#/components/schemas/PerformScofAuthenticationAction.Links"}}}],"description":"Indicates that the customer must be redirected to perform the SCOF authentication"},"PerformScofAuthenticationAction.Links":{"type":"object","description":"Links to follow to perform the SCOF authentication","properties":{"redirectUrl":{"$ref":"#/components/schemas/Link","description":"Authentication UI URL where the customer should be redirected to perform the authentication"}}},"Show3DSChallengeAction":{"allOf":[{"$ref":"#/components/schemas/CardAction"},{"type":"object","properties":{"challengeHtml":{"type":"string","description":"3DS challenge HTML content"}}}],"description":"Action indicating that the customer must complete a 3DS challenge to authenticate the payment"},"ShowDccOfferAction":{"allOf":[{"$ref":"#/components/schemas/CardAction"},{"type":"object","properties":{"conversionRate":{"type":"string","description":"DCC conversion rate"},"markup":{"type":"string","description":"Markup percentage"},"transactionAmount":{"$ref":"#/components/schemas/Amount","description":"Transaction amount in cardholder currency after DCC is applied"}}}],"description":"        DCC details for the payment.\n\n        This action is available only for DCC enabled payments.\n","title":"DCC offer action"},"Amount":{"type":"object","description":"Monetary amount together with its currency","properties":{"amount":{"type":"string","description":"The amount given with fractional digits, where fractions must be compliant to the currency definition.\nUp to 14 significant figures. The decimal separator is a dot.\nCan be 0 for account verification (save payment method for future usage without initial payment).\n\n**Example:**\nValid representations for EUR with up to two decimals are:\n  * 1056\n  * 5768.2\n  * 1.50\n  * 5877.78\n"},"currency":{"type":"string","description":"ISO 4217 alpha-3 currency code"}},"required":["amount","currency"]},"CheckoutSessionStatus":{"type":"string","description":"Status of the checkout session","enum":["INITIALIZED","WAITING_AUTHENTICATION","WAITING_CHALLENGE","WAITING_PRE_SCA","WAITING_SCA","WAITING_CONFIRMATION","SENT_FOR_PROCESSING","FAILED","COMPLETED"],"title":"Checkout session status"},"ErrorResponse":{"type":"object","description":"Contains details of the error that occurred during an API call","properties":{"apiClientMessages":{"type":"array","items":{"$ref":"#/components/schemas/ApiClientMessage"}}}},"ApiClientMessage":{"type":"object","description":"A single error message returned for the API call","properties":{"category":{"$ref":"#/components/schemas/ApiClientMessage.Category"},"code":{"type":"string","description":"Error code"},"text":{"type":"string","description":"Description of the error"}}},"ApiClientMessage.Category":{"type":"string","description":"Severity category of the message:\n\n* ERROR - the request could not be processed\n","enum":["ERROR"]}}},"paths":{"/egw/{version}/payments/{paymentId}/sessions/{sessionId}/card/scof/authentication-result":{"patch":{"description":"Complete SCOF authentication for the payment","operationId":"completeCardScofAuthentication","parameters":[{"description":"ID of the request, unique to the call, as determined by the initiating party","in":"header","name":"X-Request-Id","required":true,"schema":{"type":"string","format":"uuid","description":"ID of the request, unique to the call, as determined by the initiating party"}},{"description":"Unique ID of the payment","in":"path","name":"paymentId","required":true,"schema":{"type":"string","description":"Unique ID of the payment","maxLength":64}},{"description":"Unique ID of the checkout session","in":"path","name":"sessionId","required":true,"schema":{"type":"string","description":"Unique ID of the checkout session","maxLength":64}},{"in":"path","name":"version","required":true,"schema":{"type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CompleteScofAuthenticationRequest"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CheckoutSessionInformationResponse"}}},"description":"OK"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Bad Request"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Forbidden"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Not Found"},"409":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Conflict"},"503":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Service Unavailable"}},"summary":"Complete SCOF authentication","tags":["Card Checkout Sessions"]}}}}
```

## Initiate 3DS authentication

> Initiate 3DS authentication for the payment

```json
{"openapi":"3.1.0","info":{"title":"E-commerce Gateway API","version":"1.0.0"},"tags":[{"description":"The Card Checkout Session APIs support customer interactions required to complete and authorize card payments.\n\nA card checkout session is initiated after the customer has entered their card details.\nDepending on the transaction characteristics and scheme requirements,\nthe Payment Gateway may require additional actions,\nsuch as 3-D Secure authentication, before the payment can be authorized.\n\n> The same action may be requested multiple times during a single checkout session.\nFor example, an authorization attempt may initially proceed with 3DS frictionless flow,\nbut the issuer may subsequently require Strong Customer Authentication (SCA),\nresulting in a 3DS challenge before authorization can continue.\n","name":"Card Checkout Sessions"}],"servers":[{"description":"Production server for live traffic","url":"https://api.ecommerce.seb.ee"},{"description":"Sandbox testing environment","url":"https://sandbox.api.ecommerce.seb.ee"}],"security":[{"oauth2ClientCredentials":[]}],"components":{"securitySchemes":{"oauth2ClientCredentials":{"flows":{"clientCredentials":{"scopes":{},"tokenUrl":"https://api.ecommerce.seb.ee/auth/realms/participants-seb/protocol/openid-connect/token"}},"type":"oauth2"}},"schemas":{"InitiateThreeDsAuthenticationRequest":{"type":"object","description":"Request containing payment and 3DS browser data for 3DS authentication","properties":{"browserAcceptHeader":{"type":"string","description":"Exact content of the HTTP accept headers as sent to the 3DS Requestor from the Cardholder's browser","minLength":1},"browserColorDepth":{"type":"string","description":"Value representing the bit depth of the colour palette for displaying images, in bits per pixel","minLength":1},"browserIp":{"type":"string","description":"IP address of the browser as returned by the HTTP headers to the 3DS Requestor","minLength":1},"browserJavaEnabled":{"type":"boolean","description":"Boolean that represents the ability of the cardholder browser to execute Java"},"browserJavascriptEnabled":{"type":"boolean","description":"Boolean that represents the ability of the cardholder browser to execute JavaScript"},"browserLanguage":{"type":"string","description":"Value representing the browser language as defined in IETF BCP47","minLength":1},"browserScreenHeight":{"type":"string","description":"Total height of the Cardholder's screen in pixels","minLength":1},"browserScreenWidth":{"type":"string","description":"Total width of the Cardholder's screen in pixels","minLength":1},"browserTZ":{"type":"string","description":"Time-zone offset in minutes between UTC and the Cardholder browser local time","minLength":1},"browserUserAgent":{"type":"string","description":"Exact content of the HTTP user-agent header","minLength":1},"challengeCallbackUrl":{"type":"string","description":"Fully Qualified URL where the cardholder's browser will be redirected to by the issuers ACS (Access Control Server) after challenge.\n\nAfter receiving the callback it is necessary to call the \"Complete 3DS challenge\" endpoint to continue the payment flow.\n","minLength":1}},"required":["browserAcceptHeader","browserColorDepth","browserIp","browserJavaEnabled","browserJavascriptEnabled","browserLanguage","browserScreenHeight","browserScreenWidth","browserTZ","browserUserAgent","challengeCallbackUrl"],"title":"3DS authentication request"},"CheckoutSessionInformationResponse":{"type":"object","description":"Card checkout session details, including its current status and the next action required to complete the payment","properties":{"_links":{"$ref":"#/components/schemas/CheckoutSessionInformationResponse.Links"},"action":{"description":"Next action required to complete the payment, if any","oneOf":[{"$ref":"#/components/schemas/Initiate3DSAuthenticationAction"},{"$ref":"#/components/schemas/InitiateScofAuthenticationAction"},{"$ref":"#/components/schemas/PerformScofAuthenticationAction"},{"$ref":"#/components/schemas/Show3DSChallengeAction"},{"$ref":"#/components/schemas/ShowDccOfferAction"}]},"sessionId":{"type":"string","description":"Unique ID of the checkout session","maxLength":64},"sessionStatus":{"$ref":"#/components/schemas/CheckoutSessionStatus"}}},"CheckoutSessionInformationResponse.Links":{"type":"object","description":"Links related to the checkout session","properties":{"checkoutRedirect":{"$ref":"#/components/schemas/Link","description":"Link to the Gateway hosted checkout page where the customer can complete the payment"}}},"Link":{"type":"object","description":"A hyperlink to a related resource","properties":{"href":{"type":"string","description":"URL of the linked resource"}}},"Initiate3DSAuthenticationAction":{"allOf":[{"$ref":"#/components/schemas/CardAction"},{"type":"object","properties":{"_links":{"$ref":"#/components/schemas/Initiate3DSAuthentication.Links"}}}],"description":"Action indicating that 3DS authentication must be initiated for the payment"},"CardAction":{"type":"object","description":"Next action required to complete a card payment; the type property identifies which action to take","discriminator":{"mapping":{"INITIATE_3DS_AUTHENTICATION":"#/components/schemas/Initiate3DSAuthenticationAction","INITIATE_SCOF_AUTHENTICATION":"#/components/schemas/InitiateScofAuthenticationAction","OFFER_DCC":"#/components/schemas/ShowDccOfferAction","PERFORM_SCOF_AUTHENTICATION":"#/components/schemas/PerformScofAuthenticationAction","SHOW_3DS_CHALLENGE":"#/components/schemas/Show3DSChallengeAction"},"propertyName":"type"},"properties":{"type":{"$ref":"#/components/schemas/SessionActionType"}},"required":["type"]},"SessionActionType":{"type":"string","description":"Identifies the next action required to complete a card payment:\n\n* INITIATE_3DS_AUTHENTICATION - 3DS authentication must be initiated for the payment\n* SHOW_3DS_CHALLENGE - the customer must complete a 3DS challenge to authenticate the payment\n* INITIATE_SCOF_AUTHENTICATION - SCOF authentication must be initiated for the payment\n* PERFORM_SCOF_AUTHENTICATION - the customer must complete a SCOF authentication to authenticate the payment\n","enum":["INITIATE_3DS_AUTHENTICATION","INITIATE_SCOF_AUTHENTICATION","OFFER_DCC","PERFORM_SCOF_AUTHENTICATION","SHOW_3DS_CHALLENGE"]},"Initiate3DSAuthentication.Links":{"type":"object","description":"Links related to initiating 3DS authentication","properties":{"threeDsMethod":{"$ref":"#/components/schemas/Link"}}},"InitiateScofAuthenticationAction":{"allOf":[{"$ref":"#/components/schemas/CardAction"}],"description":"Indicates that SCOF authentication must be started for the checkout session"},"PerformScofAuthenticationAction":{"allOf":[{"$ref":"#/components/schemas/CardAction"},{"type":"object","properties":{"_links":{"$ref":"#/components/schemas/PerformScofAuthenticationAction.Links"}}}],"description":"Indicates that the customer must be redirected to perform the SCOF authentication"},"PerformScofAuthenticationAction.Links":{"type":"object","description":"Links to follow to perform the SCOF authentication","properties":{"redirectUrl":{"$ref":"#/components/schemas/Link","description":"Authentication UI URL where the customer should be redirected to perform the authentication"}}},"Show3DSChallengeAction":{"allOf":[{"$ref":"#/components/schemas/CardAction"},{"type":"object","properties":{"challengeHtml":{"type":"string","description":"3DS challenge HTML content"}}}],"description":"Action indicating that the customer must complete a 3DS challenge to authenticate the payment"},"ShowDccOfferAction":{"allOf":[{"$ref":"#/components/schemas/CardAction"},{"type":"object","properties":{"conversionRate":{"type":"string","description":"DCC conversion rate"},"markup":{"type":"string","description":"Markup percentage"},"transactionAmount":{"$ref":"#/components/schemas/Amount","description":"Transaction amount in cardholder currency after DCC is applied"}}}],"description":"        DCC details for the payment.\n\n        This action is available only for DCC enabled payments.\n","title":"DCC offer action"},"Amount":{"type":"object","description":"Monetary amount together with its currency","properties":{"amount":{"type":"string","description":"The amount given with fractional digits, where fractions must be compliant to the currency definition.\nUp to 14 significant figures. The decimal separator is a dot.\nCan be 0 for account verification (save payment method for future usage without initial payment).\n\n**Example:**\nValid representations for EUR with up to two decimals are:\n  * 1056\n  * 5768.2\n  * 1.50\n  * 5877.78\n"},"currency":{"type":"string","description":"ISO 4217 alpha-3 currency code"}},"required":["amount","currency"]},"CheckoutSessionStatus":{"type":"string","description":"Status of the checkout session","enum":["INITIALIZED","WAITING_AUTHENTICATION","WAITING_CHALLENGE","WAITING_PRE_SCA","WAITING_SCA","WAITING_CONFIRMATION","SENT_FOR_PROCESSING","FAILED","COMPLETED"],"title":"Checkout session status"},"ErrorResponse":{"type":"object","description":"Contains details of the error that occurred during an API call","properties":{"apiClientMessages":{"type":"array","items":{"$ref":"#/components/schemas/ApiClientMessage"}}}},"ApiClientMessage":{"type":"object","description":"A single error message returned for the API call","properties":{"category":{"$ref":"#/components/schemas/ApiClientMessage.Category"},"code":{"type":"string","description":"Error code"},"text":{"type":"string","description":"Description of the error"}}},"ApiClientMessage.Category":{"type":"string","description":"Severity category of the message:\n\n* ERROR - the request could not be processed\n","enum":["ERROR"]}}},"paths":{"/egw/{version}/payments/{paymentId}/sessions/{sessionId}/card/three-ds/authentication":{"patch":{"description":"Initiate 3DS authentication for the payment","operationId":"initiateCardThreeDsAuthentication","parameters":[{"description":"ID of the request, unique to the call, as determined by the initiating party","in":"header","name":"X-Request-Id","required":true,"schema":{"type":"string","format":"uuid","description":"ID of the request, unique to the call, as determined by the initiating party"}},{"description":"Unique ID of the payment","in":"path","name":"paymentId","required":true,"schema":{"type":"string","description":"Unique ID of the payment","maxLength":64}},{"description":"Unique ID of the checkout session","in":"path","name":"sessionId","required":true,"schema":{"type":"string","description":"Unique ID of the checkout session","maxLength":64}},{"in":"path","name":"version","required":true,"schema":{"type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/InitiateThreeDsAuthenticationRequest"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CheckoutSessionInformationResponse"}}},"description":"OK"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Bad Request"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Forbidden"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Not Found"},"409":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Conflict"},"503":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Service Unavailable"}},"summary":"Initiate 3DS authentication","tags":["Card Checkout Sessions"]}}}}
```

## Complete 3DS challenge

> Complete 3DS challenge for the payment

```json
{"openapi":"3.1.0","info":{"title":"E-commerce Gateway API","version":"1.0.0"},"tags":[{"description":"The Card Checkout Session APIs support customer interactions required to complete and authorize card payments.\n\nA card checkout session is initiated after the customer has entered their card details.\nDepending on the transaction characteristics and scheme requirements,\nthe Payment Gateway may require additional actions,\nsuch as 3-D Secure authentication, before the payment can be authorized.\n\n> The same action may be requested multiple times during a single checkout session.\nFor example, an authorization attempt may initially proceed with 3DS frictionless flow,\nbut the issuer may subsequently require Strong Customer Authentication (SCA),\nresulting in a 3DS challenge before authorization can continue.\n","name":"Card Checkout Sessions"}],"servers":[{"description":"Production server for live traffic","url":"https://api.ecommerce.seb.ee"},{"description":"Sandbox testing environment","url":"https://sandbox.api.ecommerce.seb.ee"}],"security":[{"oauth2ClientCredentials":[]}],"components":{"securitySchemes":{"oauth2ClientCredentials":{"flows":{"clientCredentials":{"scopes":{},"tokenUrl":"https://api.ecommerce.seb.ee/auth/realms/participants-seb/protocol/openid-connect/token"}},"type":"oauth2"}},"schemas":{"CompleteChallengeRequest":{"type":"object","description":"Request to complete the 3DS challenge","properties":{"cres":{"type":"string","description":"Base64-encoded CRes message, as received from the ACS"}},"required":["cres"],"title":"Complete challenge request"},"CheckoutSessionInformationResponse":{"type":"object","description":"Card checkout session details, including its current status and the next action required to complete the payment","properties":{"_links":{"$ref":"#/components/schemas/CheckoutSessionInformationResponse.Links"},"action":{"description":"Next action required to complete the payment, if any","oneOf":[{"$ref":"#/components/schemas/Initiate3DSAuthenticationAction"},{"$ref":"#/components/schemas/InitiateScofAuthenticationAction"},{"$ref":"#/components/schemas/PerformScofAuthenticationAction"},{"$ref":"#/components/schemas/Show3DSChallengeAction"},{"$ref":"#/components/schemas/ShowDccOfferAction"}]},"sessionId":{"type":"string","description":"Unique ID of the checkout session","maxLength":64},"sessionStatus":{"$ref":"#/components/schemas/CheckoutSessionStatus"}}},"CheckoutSessionInformationResponse.Links":{"type":"object","description":"Links related to the checkout session","properties":{"checkoutRedirect":{"$ref":"#/components/schemas/Link","description":"Link to the Gateway hosted checkout page where the customer can complete the payment"}}},"Link":{"type":"object","description":"A hyperlink to a related resource","properties":{"href":{"type":"string","description":"URL of the linked resource"}}},"Initiate3DSAuthenticationAction":{"allOf":[{"$ref":"#/components/schemas/CardAction"},{"type":"object","properties":{"_links":{"$ref":"#/components/schemas/Initiate3DSAuthentication.Links"}}}],"description":"Action indicating that 3DS authentication must be initiated for the payment"},"CardAction":{"type":"object","description":"Next action required to complete a card payment; the type property identifies which action to take","discriminator":{"mapping":{"INITIATE_3DS_AUTHENTICATION":"#/components/schemas/Initiate3DSAuthenticationAction","INITIATE_SCOF_AUTHENTICATION":"#/components/schemas/InitiateScofAuthenticationAction","OFFER_DCC":"#/components/schemas/ShowDccOfferAction","PERFORM_SCOF_AUTHENTICATION":"#/components/schemas/PerformScofAuthenticationAction","SHOW_3DS_CHALLENGE":"#/components/schemas/Show3DSChallengeAction"},"propertyName":"type"},"properties":{"type":{"$ref":"#/components/schemas/SessionActionType"}},"required":["type"]},"SessionActionType":{"type":"string","description":"Identifies the next action required to complete a card payment:\n\n* INITIATE_3DS_AUTHENTICATION - 3DS authentication must be initiated for the payment\n* SHOW_3DS_CHALLENGE - the customer must complete a 3DS challenge to authenticate the payment\n* INITIATE_SCOF_AUTHENTICATION - SCOF authentication must be initiated for the payment\n* PERFORM_SCOF_AUTHENTICATION - the customer must complete a SCOF authentication to authenticate the payment\n","enum":["INITIATE_3DS_AUTHENTICATION","INITIATE_SCOF_AUTHENTICATION","OFFER_DCC","PERFORM_SCOF_AUTHENTICATION","SHOW_3DS_CHALLENGE"]},"Initiate3DSAuthentication.Links":{"type":"object","description":"Links related to initiating 3DS authentication","properties":{"threeDsMethod":{"$ref":"#/components/schemas/Link"}}},"InitiateScofAuthenticationAction":{"allOf":[{"$ref":"#/components/schemas/CardAction"}],"description":"Indicates that SCOF authentication must be started for the checkout session"},"PerformScofAuthenticationAction":{"allOf":[{"$ref":"#/components/schemas/CardAction"},{"type":"object","properties":{"_links":{"$ref":"#/components/schemas/PerformScofAuthenticationAction.Links"}}}],"description":"Indicates that the customer must be redirected to perform the SCOF authentication"},"PerformScofAuthenticationAction.Links":{"type":"object","description":"Links to follow to perform the SCOF authentication","properties":{"redirectUrl":{"$ref":"#/components/schemas/Link","description":"Authentication UI URL where the customer should be redirected to perform the authentication"}}},"Show3DSChallengeAction":{"allOf":[{"$ref":"#/components/schemas/CardAction"},{"type":"object","properties":{"challengeHtml":{"type":"string","description":"3DS challenge HTML content"}}}],"description":"Action indicating that the customer must complete a 3DS challenge to authenticate the payment"},"ShowDccOfferAction":{"allOf":[{"$ref":"#/components/schemas/CardAction"},{"type":"object","properties":{"conversionRate":{"type":"string","description":"DCC conversion rate"},"markup":{"type":"string","description":"Markup percentage"},"transactionAmount":{"$ref":"#/components/schemas/Amount","description":"Transaction amount in cardholder currency after DCC is applied"}}}],"description":"        DCC details for the payment.\n\n        This action is available only for DCC enabled payments.\n","title":"DCC offer action"},"Amount":{"type":"object","description":"Monetary amount together with its currency","properties":{"amount":{"type":"string","description":"The amount given with fractional digits, where fractions must be compliant to the currency definition.\nUp to 14 significant figures. The decimal separator is a dot.\nCan be 0 for account verification (save payment method for future usage without initial payment).\n\n**Example:**\nValid representations for EUR with up to two decimals are:\n  * 1056\n  * 5768.2\n  * 1.50\n  * 5877.78\n"},"currency":{"type":"string","description":"ISO 4217 alpha-3 currency code"}},"required":["amount","currency"]},"CheckoutSessionStatus":{"type":"string","description":"Status of the checkout session","enum":["INITIALIZED","WAITING_AUTHENTICATION","WAITING_CHALLENGE","WAITING_PRE_SCA","WAITING_SCA","WAITING_CONFIRMATION","SENT_FOR_PROCESSING","FAILED","COMPLETED"],"title":"Checkout session status"},"ErrorResponse":{"type":"object","description":"Contains details of the error that occurred during an API call","properties":{"apiClientMessages":{"type":"array","items":{"$ref":"#/components/schemas/ApiClientMessage"}}}},"ApiClientMessage":{"type":"object","description":"A single error message returned for the API call","properties":{"category":{"$ref":"#/components/schemas/ApiClientMessage.Category"},"code":{"type":"string","description":"Error code"},"text":{"type":"string","description":"Description of the error"}}},"ApiClientMessage.Category":{"type":"string","description":"Severity category of the message:\n\n* ERROR - the request could not be processed\n","enum":["ERROR"]}}},"paths":{"/egw/{version}/payments/{paymentId}/sessions/{sessionId}/card/three-ds/challenge-result":{"patch":{"description":"Complete 3DS challenge for the payment","operationId":"completeCardThreeDsChallenge","parameters":[{"description":"ID of the request, unique to the call, as determined by the initiating party","in":"header","name":"X-Request-Id","required":true,"schema":{"type":"string","format":"uuid","description":"ID of the request, unique to the call, as determined by the initiating party"}},{"description":"Unique ID of the payment","in":"path","name":"paymentId","required":true,"schema":{"type":"string","description":"Unique ID of the payment","maxLength":64}},{"description":"Unique ID of the checkout session","in":"path","name":"sessionId","required":true,"schema":{"type":"string","description":"Unique ID of the checkout session","maxLength":64}},{"in":"path","name":"version","required":true,"schema":{"type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CompleteChallengeRequest"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CheckoutSessionInformationResponse"}}},"description":"OK"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Bad Request"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Forbidden"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Not Found"},"409":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Conflict"},"503":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Service Unavailable"}},"summary":"Complete 3DS challenge","tags":["Card Checkout Sessions"]}}}}
```


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation by asking a question.

Perform an HTTP GET request on the following URL with the `ask` and `goal` query parameters:

```
GET https://docs.ecommerce.seb.ee/seb-docs-draft/seb-docs-public-lv/api-atsauce/tirgotaja-api/payments/checkout-sessions/card-checkout-sessions.md?ask=<question>&goal=<user_goal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is what the user is ultimately trying to achieve, the reason they need the answer. Sharing it helps GitBook give you a better, more relevant answer. A goal is most helpful when it describes the outcome the user wants rather than restating the question. For example, with `ask=how do I create an API token`, a goal like `automate deployments from our CI pipeline` lets GitBook tailor the answer to that use case.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
