> 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/api-reference/merchant-api/payments/checkout-sessions/apple-pay-checkout-sessions.md).

# Apple Pay Checkout Sessions

## Create Apple Pay checkout session

> The Apple Pay Checkout Session APIs support customer interactions required to complete and authorize Apple Pay payments.\
> \
> An Apple Pay checkout session is initiated using the encrypted payment token and associated payment data received from Apple Pay.\
> After the session is created, the payment flow continues using the Card Checkout Session APIs if additional actions are required.\
> \
> \> Apple Pay payments typically proceed directly to authorization without additional customer authentication.\
> However, the exact flow is determined by issuer, scheme, regulatory, and transaction-specific requirements.\
> As a result, you should always process the actions returned by the API and continue the checkout session until a final status is reached.\
> \
> 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":"Apple 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":{"CreateApplePayCheckoutSessionRequest":{"type":"object","description":"Create Apple Pay checkout session request","properties":{"applePayToken":{"$ref":"#/components/schemas/ApplePayEncryptedPaymentToken","description":"The encrypted payment token and associated payment data received from Apple Pay during checkout"}},"required":["applePayToken"]},"ApplePayEncryptedPaymentToken":{"type":"object","description":"CreateApplePayCheckoutSessionRequest.EncryptedPaymentToken","properties":{"paymentData":{"$ref":"#/components/schemas/EncryptedPaymentData","description":"The encrypted payment payload returned by Apple Pay."},"paymentMethod":{"$ref":"#/components/schemas/PaymentMethod","description":"Details about the payment method selected in Apple Pay."},"transactionIdentifier":{"type":"string","description":"The Apple Pay transaction identifier for this payment token."}},"required":["paymentData","paymentMethod"]},"EncryptedPaymentData":{"type":"object","description":"CreateApplePayCheckoutSessionRequest.EncryptedPaymentData","properties":{"data":{"type":"string","description":"The encrypted payment data payload generated by Apple Pay."},"header":{"$ref":"#/components/schemas/PaymentDataHeader","description":"Header metadata associated with the encrypted Apple Pay payment data."},"signature":{"type":"string","description":"The signature that allows verification of the Apple Pay payment data."},"version":{"type":"string","description":"The Apple Pay payment data format version."}}},"PaymentDataHeader":{"type":"object","description":"CreateApplePayCheckoutSessionRequest.PaymentDataHeader","properties":{"applicationData":{"type":"string","description":"Optional application-specific data supplied during the Apple Pay transaction."},"ephemeralPublicKey":{"type":"string","description":"The ephemeral public key used to encrypt the Apple Pay payment data."},"publicKeyHash":{"type":"string","description":"The hash of the merchant public key associated with this Apple Pay token."},"transactionId":{"type":"string","description":"The transaction identifier included in the Apple Pay payment data header."}}},"PaymentMethod":{"type":"object","description":"CreateApplePayCheckoutSessionRequest.PaymentMethod","properties":{"displayName":{"type":"string","description":"The display name of the payment card shown by Apple Pay."},"network":{"$ref":"#/components/schemas/CardBrand","description":"The payment network used for the transaction."},"type":{"type":"string","description":"The type of payment method selected in Apple Pay."}}},"CardBrand":{"type":"string","description":"Card scheme of the payment card","enum":["MASTERCARD","VISA"]},"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/apple-pay":{"post":{"description":"The Apple Pay Checkout Session APIs support customer interactions required to complete and authorize Apple Pay payments.\n\nAn Apple Pay checkout session is initiated using the encrypted payment token and associated payment data received from Apple Pay.\nAfter the session is created, the payment flow continues using the Card Checkout Session APIs if additional actions are required.\n\n> Apple Pay payments typically proceed directly to authorization without additional customer authentication.\nHowever, the exact flow is determined by issuer, scheme, regulatory, and transaction-specific requirements.\nAs a result, you should always process the actions returned by the API and continue the checkout session until a final status is reached.\n\nThis endpoint is available only for customer-initiated payments.\n","operationId":"createApplePayCheckoutSession","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/CreateApplePayCheckoutSessionRequest"}}},"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 Apple Pay checkout session","tags":["Apple 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/api-reference/merchant-api/payments/checkout-sessions/apple-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.
