> 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/shops/shop-payment-methods.md).

# Shop Payment Methods

## Validate Apple Pay merchant

> The Apple Pay Merchant Validation API is used to obtain the merchant session required to display the Apple Pay payment sheet.\
> \
> When a customer initiates an Apple Pay payment,\
> Apple provides a validation URL that must be exchanged for a merchant session.\
> The returned merchant session should then be passed to the Apple Pay SDK to complete merchant validation and continue checkout.<br>

```json
{"openapi":"3.1.0","info":{"title":"E-commerce Gateway API","version":"1.0.0"},"tags":[{"name":"Shop Payment Methods"}],"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":{"ApplePayValidateMerchantRequest":{"type":"object","description":"Request to validate the shop as an Apple Pay merchant before an Apple Pay payment is started","properties":{"initiative":{"$ref":"#/components/schemas/ApplePayInitiative"},"initiativeContext":{"type":"string","description":"Origin the Apple Pay payment is initiated from, matching the chosen initiative"},"validationURL":{"type":"string","description":"Merchant validation URL, as received from Apple Pay in the customer's browser","minLength":1}},"required":["validationURL"]},"ApplePayInitiative":{"type":"string","description":"Context the Apple Pay payment is initiated from:\n\n* web - payment initiated on a website\n* in_app - payment initiated in an app\n* messaging - payment initiated from a message\n","enum":["web","in_app","messaging"]},"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}/shops/{shopAgreementId}/payment-methods/apple-pay/validate-merchant":{"post":{"description":"The Apple Pay Merchant Validation API is used to obtain the merchant session required to display the Apple Pay payment sheet.\n\nWhen a customer initiates an Apple Pay payment,\nApple provides a validation URL that must be exchanged for a merchant session.\nThe returned merchant session should then be passed to the Apple Pay SDK to complete merchant validation and continue checkout.\n","operationId":"validateMerchantApplePay","parameters":[{"description":"Unique ID of the shop","in":"path","name":"shopAgreementId","required":true,"schema":{"type":"string","description":"Unique ID of the shop","maxLength":64}},{"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"}},{"in":"path","name":"version","required":true,"schema":{"type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApplePayValidateMerchantRequest"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"type":"string"}}},"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":"Validate Apple Pay merchant","tags":["Shop Payment Methods"]}}}}
```


---

# 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/shops/shop-payment-methods.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.
