Tokenize Apple Pay
Turn an Apple Pay payment into a stored wallet token. Pass the PKPaymentToken paymentData envelope exactly as the Apple Pay JS API returns it, as the payment_data field. Guardian verifies the EC_v1 signature against Apple’s trusted certificates and decrypts the payload server-side with your active payment processing certificate, so the decrypted card data never touches your systems.
An Apple Pay payment always yields a device-bound token: a device PAN (DPAN) with a single-use cryptogram and ECI. The underlying funding PAN is never extracted, stored, or returned, so an Apple Pay token cannot be promoted to a network token.
Tokenization is idempotent on the encrypted payload: resubmitting the same envelope returns the existing wallet token. If that payload’s token was already deleted, the request returns 409 with the classifier APPLE_PAY_TOKEN_DELETED. Rejected envelopes return 422 with a classifier naming the cause: APPLE_PAY_SIGNATURE_INVALID, APPLE_PAY_UNKNOWN_CERTIFICATE, APPLE_PAY_TOKEN_EXPIRED, or APPLE_PAY_MALFORMED_TOKEN (Guardian’s generic missing-field classifier, shared by the other Apple Pay endpoints). If no active payment processing certificate exists, the request returns 500 with the classifier APPLE_PAY_NO_ACTIVE_CERTIFICATE.
See Apple Pay for prerequisites and the full flow.