Create an Apple Pay session

PUT/v0.2/checkouts/{checkout_id}/apple-pay-session

Creates an Apple Pay merchant session for the specified checkout.

Use this endpoint after the customer selects Apple Pay and before calling ApplePaySession.completeMerchantValidation(...) in the browser. SumUp validates the merchant session request and returns the Apple Pay session object that your frontend should pass to Apple's JavaScript API.

Authorization

Use one of the following alternatives:

  • apiKey
  • oauth2
Authorization guide

Path parameters

  • checkout_idstringrequired

    SumUp-generated id returned when creating a checkout. Use this value to retrieve, update, process, or deactivate the checkout.

    Example: "4e425463-3e1b-431d-83fa-1e51c2925e99"

Body parameters

application/json

Merchant validation details from the Apple Pay session in the payer's browser.

  • contextstringrequired
    format: hostname

    Hostname of the website displaying the Apple Pay payment sheet, without a URL scheme or path. Use the domain registered for Apple Pay.

    Example: "example.com"

  • targetstringrequired
    format: uri

    Apple Pay validation URL received as validationURL in the browser's onvalidatemerchant event.

    Example: "https://apple-pay-gateway-cert.apple.com/paymentservices/startSession"

Responses

200application/json

Successful request. Returns the Apple Pay merchant session object that should be forwarded to the Apple Pay JS SDK to complete merchant validation and continue the payment flow.

    400application/json

    Bad Request

    Exactly one of the following variants.

    Error
    View Error schema
    • messagestring

      Short description of the error.

      Example: "Resource not found"

    • Platform code for the error.

      Example: "NOT_FOUND"

    array<unknown>
    404application/json

    The requested resource does not exist.

    • messagestring

      Short description of the error.

      Example: "Resource not found"

    • Platform code for the error.

      Example: "NOT_FOUND"

    Type to search…