Provision Card to Apple Pay

post/api/cards/{cardId}/provision/apple-pay

Generate the encrypted payload required to add a card to Apple Pay via in-app push provisioning.

Call this endpoint from your partner app in response to the PassKit PKAddPaymentPassViewController delegate callback generateRequestWithCertificateChain:nonce:nonceSignature:completionHandler:. Forward the certChain, nonce, and nonceSignature values supplied by PassKit to this endpoint, then pass the response fields back to the PassKit completion handler as the corresponding fields of PKAddPaymentPassRequest.

Refer to the seriesId field on the card resource for the value to use as primaryAccountIdentifier, and to cardholderName for the value to use as the cardholder name.

Request

Path Parameters

  • cardIdstringrequired

    ID of card

Body application/json

  • certChainstring[]required

    The Apple-supplied certificate chain, leaf certificate first, as provided to your app by the PassKit PKAddPaymentPassViewController delegate callback. Each entry is the standard base64 encoding of the raw certificate bytes.

  • noncestringrequired

    The Apple-supplied nonce from the PassKit PKAddPaymentPassViewController delegate callback, base64-encoded.

  • nonceSignaturestringrequired

    The Apple-supplied nonce signature from the PassKit PKAddPaymentPassViewController delegate callback, base64-encoded.

Response

Successful operation.

Body application/json

  • encryptedPassDatastringrequired

    Base64-encoded encrypted pass data. Pass to the PassKit completion handler as PKAddPaymentPassRequest.encryptedPassData.

  • ephemeralPublicKeystringrequired

    Base64-encoded ephemeral public key. Pass to the PassKit completion handler as PKAddPaymentPassRequest.ephemeralPublicKey.

  • activationDatastringrequired

    Base64-encoded activation data. Pass to the PassKit completion handler as PKAddPaymentPassRequest.activationData.