Checkouts

Create an 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.

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

Request

  • Base URL
    https://api.sumup.com
  • URL
    https://api.sumup.com/v0.2/checkouts/{checkout_id}/apple-pay-session
  • Auth
    • HTTP bearer
    • or OAuth 2
      Authorization code: https://api.sumup.com/authorize
      Token URL: https://api.sumup.com/token

Path parameters

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

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

Request body

contextstring hostname required

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

targetstring uri required

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

Example request

{
  "context": "example.com",
  "target": "https://apple-pay-gateway-cert.apple.com/paymentservices/startSession"
}

Response

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.

object required

Changes

No recorded changes to this operation across all 79 revisions of this API.