# Create Apple Pay session

Create a session with Apple Pay to facilitate a payment.

Read our [Apple Pay tutorial](https://docs.moov.io/guides/sources/cards/apple-pay/#register-your-domains) 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](https://docs.moov.io/api/authentication/access-tokens/) you'll need to specify the `/accounts/{accountID}/apple-pay.write` scope.

## Request

### POST

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

### Example Requests

#### Curl
```shell
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
```go
mc, _ := moov.NewClient()

var accountID string

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

#### TypeScript
```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
```php
declare(strict_types=1);

require 'vendor/autoload.php';

use Moov\
