Push provisioning

Push provisioning allows cardholders to add their card to a digital wallet at the tap of a button instead of having to manually type in the card details.

Apple Pay

In-app push provisioning

Prerequisites

Enabling push provisioning to Apple Pay wallets in your iOS application requires an Apple Pay Entitlement to be issued by Apple for your application. Please reach out to support@increase.com and we will guide you through the process and any other setup needed.

Push provisioning flow

let requestConfiguration = PKAddPaymentPassRequestConfiguration.init( encryptionScheme: PKEncryptionScheme.ECC_V2, )! requestConfiguration.paymentNetwork = .visa requestConfiguration.cardholderName = "Ian Crease" requestConfiguration.primaryAccountSuffix = "1288" requestConfiguration.localizedDescription = "Crease Card" let controller = PKAddPaymentPassViewController( requestConfiguration: requestConfiguration, delegate: delegate, )
  • Implement the PKAddPaymentPassViewControllerDelegate protocol. In the generateRequestWithCertificateChain method, pass the certificates, nonce and nonce signature to your servers as Base64-encoded data.

  • Implement an endpoint that receives the certificates, nonce and nonce signature and relays it to Increase’s API at POST /cards/:card_id/push_provision and passes the data back to your application:

curl -X POST https://api.increase.com/cards//push_provision -d $'{ "channel": "apple_pay_in_app", "cardholder_name": "Ian Crease", "apple_pay_in_app": { "certificates": [ { "certificate": "..." }, { "certificate": "..." } ], "nonce": "...", "nonce_signature": "..." } }' 200 OK { "channel": "apple_pay_in_app", "apple_pay_in_app": { "activation_data": "...", "encrypted_pass_data": "...", "encryption_version": "ECC_V2", "ephemeral_public_key": "..." } }
let addPaymentPassRequest = PKAddPaymentPassRequest() addPaymentPassRequest.activationData = Data(base64Encoded: backendResponse.apple_pay_in_app.activation_data) addPaymentPassRequest.ephemeralPublicKey = Data(base64Encoded: backendResponse.apple_pay_in_app.ephemeral_public_key) addPaymentPassRequest.encryptedPassData = Data(base64Encoded: backendResponse.apple_pay_in_app.encrypted_pass_data) return addPaymentPassRequest
  • Wait for the didFinishAdding delegate method to be called to determine the outcome of the push provisioning flow. As the flow progresses, a Digital Wallet Token will be created and receive updates.