Skip to main content

Overview

Apple Pay In-App Provisioning lets a user add their card to Apple Wallet without entering the card details manually. Your app starts the system Apple Pay flow, sends the values supplied by PassKit to Gnosis Pay, and gives the encrypted response back to PassKit.
Apple Pay In-App Provisioning must be enabled for your card program before you can use this flow. Contact your Gnosis Pay representative before starting integration or testing.

Before you start

You need:
  • An iOS app with the Apple-issued com.apple.developer.payment-pass-provisioning entitlement.
  • The app and card program approved for Apple Pay In-App Provisioning.
  • An authenticated Gnosis Pay user with an active, eligible card.
  • PassKit integrated into your iOS app.
See Apple’s Apple Pay for developers and PKAddPaymentPassViewController documentation for the entitlement and app setup.

End-to-end flow

Make the request to Gnosis Pay only from the PassKit delegate callback. Apple requires the completion handler to be called within 20 seconds.

Implement the flow

1

Check that In-App Provisioning is available

Use PKAddPaymentPassViewController.canAddPaymentPass() before showing the Add to Apple Wallet action.
2

Create the PassKit configuration

Create a PKAddPaymentPassRequestConfiguration using the ECC V2 encryption scheme. Set the cardholder name, the card’s last four digits, and the Visa payment network.
Present PKAddPaymentPassViewController with this configuration and set your app as its delegate.
3

Send the PassKit values to Gnosis Pay

PassKit calls your delegate with a certificate chain, nonce, and nonce signature. Base64-encode each Data value and call:
Send the two certificates in the order provided: leaf certificate first, intermediate certificate second. Do not append the root certificate.
Map the delegate values without modifying them:
device_type accepts:Set device_type from the provisioning target selected in your app before presenting the PassKit flow.app_version should be the current app version, such as the value of CFBundleShortVersionString.product_type is optional. Omit it unless Gnosis Pay has provided a value for your card program.
4

Create the payment pass request

A successful response contains:
Base64-decode all three values, assign them to a PKAddPaymentPassRequest, and call the PassKit completion handler.
See Apple’s PKAddPaymentPassRequest documentation for the PassKit object.

API request examples

Use the cardId returned by the Cards API. The card must belong to the authenticated user.

Errors

Do not reuse certificates, nonce values, signatures, or provisioning responses from a previous PassKit callback.

Verification and security

Apple Wallet may require the user to complete an additional verification step after the provisioning data is accepted. Verification is delivered through the channels configured for your card program; no additional provisioning endpoint is required in the app. Treat all provisioning request and response fields as sensitive and short-lived:
  • Do not log or persist certificates, nonce values, nonce signatures, or encrypted provisioning data.
  • Do not cache the API response.
  • Do not send the card number, security code, or other card credentials to this endpoint.
  • Always start a new PassKit flow after an error or timeout.
Test the complete flow on eligible iPhone and Apple Watch devices before release, including successful provisioning, verification, cancellation, and temporary API failures.