Create Apple Pay session | Moov Documentation

Create Apple Pay session

Create a session with Apple Pay to facilitate a payment.

Read our Apple Pay tutorial to learn more. A successful response from this endpoint should be passed through to Apple Pay unchanged.

To access this endpoint using an access token you'll need to specify the /accounts/{accountID}/apple-pay.write scope.

Request

POST

/accounts/{accountID}/apple-pay/sessions

Example Requests

Curl

curl -X POST "https://api.moov.io/accounts/{accountID}/apple-pay/sessions" \
  -H "Authorization: Bearer {token}" \
  -H "X-Moov-Version: v2026.04.00" \
  -d '{
  "domain": "checkout.classbooker.dev",
  "displayName": "string"
}'

Go

mc, _ := moov.NewClient()

var accountID string

mc.StartApplePaySession(ctx, accountID,
  moov.StartApplePaySession{
    Domain:      "checkout.classbooker.dev",
    DisplayName: "Example account",
  })

TypeScript

import { Moov } from "@moovio/sdk";

const moov = new Moov({
  security: {
    username: "",
    password: "",
  },
});

async function run() {
  const result = await moov.applePay.createSession({
    accountID: "32ab62ca-7afd-4f49-89cb-0bb237258f23",
    createApplePaySession: {
      domain: "checkout.classbooker.dev",
      displayName: "Fay11",
    },
  });

console.log(result);
}

run();

PHP

declare(strict_types=1);

require 'vendor/autoload.php';

use Moov\