Skip to main content
POST
Tokenize Apple Pay

Authorizations

Authorization
string
header
required

JWT bearer token obtained via the OAuth2 client-credentials grant from the platform Authentication API. The token's scopes gate the endpoints it may call, and its audience names the Guardian instance. This is the standard way to authenticate to Guardian.

Headers

X-Idempotency-Key
string

Makes the write safe to retry. A repeat with the same key, by the same credential, with the same request within 24 hours returns the original outcome with Idempotent-Replayed: true instead of executing again. 1 to 255 visible ASCII characters, sent once. Must not contain card data. See Idempotency.

Required string length: 1 - 255
Pattern: ^[!-~]+$
Example:

"apple-pay-7f3c2a9e-0001"

Body

application/json
payment_data
object
required

The Apple Pay EC_v1 paymentData envelope, passed through verbatim as returned by the Apple Pay JS API.

Response

Success response. A payload already tokenized on this instance, with or without an idempotency key, returns the original wallet token.

id
string<uuid>
required

The ID of the stored wallet token.

card
object
required