> 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-lt/api-nuoroda/prekybininko-api/payments/checkout-sessions/click-to-pay-checkout-sessions.md).

# Click To Pay Checkout Sessions

## Create Click to Pay checkout session

> Starts a new Click To Pay checkout session for the payment.\
> \
> Further processing continues according to the card session flow.\
> \
> This endpoint is available only for customer-initiated payments.<br>

```json
{"openapi":"3.1.0","info":{"title":"E-commerce Gateway API","version":"1.0.0"},"tags":[{"name":"Click to Pay 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":{"CreateClickToPayCheckoutSessionRequest":{"type":"object","description":"Details required to start a Click to Pay checkout session for the payment","properties":{"checkoutResponse":{"$ref":"#/components/schemas/CheckoutResponseData"},"headers":{"type":"object","additionalProperties":{"type":"string"},"description":"Dictionary containing header fields as received from Click to Pay JS library after completing the checkout flow."},"network":{"type":"string","description":"The payment network used for the transaction.","minLength":1}},"required":["checkoutResponse","headers","network"],"title":"Create Click to Pay checkout session request"},"CheckoutResponseData":{"type":"object","description":"Checkout response data received from the Click to Pay JS library after the customer completes the checkout flow","properties":{"maskedCard":{"$ref":"#/components/schemas/MaskedCard"},"srcCorrelationId":{"type":"string","description":"Correlation ID for the Click to Pay checkout, as received from the Click to Pay JS library","minLength":1},"srciTransactionId":{"type":"string","description":"Transaction ID for the Click to Pay checkout, as received from the Click to Pay JS library","minLength":1}},"required":["maskedCard","srcCorrelationId","srciTransactionId"]},"MaskedCard":{"type":"object","description":"Masked details of the card selected in the Click to Pay checkout flow","properties":{"panBin":{"type":"string","description":"Leading digits of the card number (bank identification number)"},"panExpirationMonth":{"type":"string","description":"Expiry month of the card"},"panExpirationYear":{"type":"string","description":"Expiry year of the card"},"panLastFour":{"type":"string","description":"Last four digits of the card number","minLength":1}},"required":["panLastFour"]},"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/click-to-pay":{"post":{"description":"Starts a new Click To Pay checkout session for the payment.\n\nFurther processing continues according to the card session flow.\n\nThis endpoint is available only for customer-initiated payments.\n","operationId":"createClickToPayCheckoutSession","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/CreateClickToPayCheckoutSessionRequest"}}},"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 Click to Pay checkout session","tags":["Click to Pay 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-lt/api-nuoroda/prekybininko-api/payments/checkout-sessions/click-to-pay-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.
