Apple Pay provisioning is live. Google Pay is documented below but not yet accepted by the
endpoint. Reach out to your Imprint team to coordinate wallet enablement for your program.
Overview
Add to Wallet lets a customer provision their Imprint card into a device wallet — Apple Pay or Google Pay — without leaving your app. The platform wallet SDK is the wallet framework the operating system provides: PassKit (PKAddPaymentPassViewController) on iOS, and the TapAndPay client on Android. Apple and Google
ship it, not Imprint, and your app links it to show the native Add to Wallet sheet.
Your app collects a short-lived handshake from that SDK, passes it to Imprint, and Imprint returns
the encrypted payload the SDK needs to finish adding the card.
Imprint never asks you to handle the card number. The provisioning payload is encrypted for the
wallet provider, so your app acts purely as a courier between the platform wallet SDK and Imprint.
What this unlocks: a customer who has just been approved for a card can tap Add to Apple
Wallet in your app and start making contactless payments immediately — before the physical card
arrives in the mail.
What you need
How the flow works
The critical detail: your app talks to the platform wallet SDK first. The wallet SDK produces the values Imprint needs. Only then do you call Imprint.1
Your app asks the platform wallet to begin
The customer taps Add to Wallet. Your app starts the platform’s add-card flow
(
PKAddPaymentPassViewController on iOS, TapAndPay on Android).2
The wallet SDK hands your app the values Imprint needs
On iOS this is a certificate chain, a nonce, and a nonce signature — a single-use handshake.
On Android it is the active wallet ID and a stable device ID, which do not expire.
3
Your app calls Imprint
POST /v2/payment_methods/{payment_method_id}/provision/{wallet}, forwarding the handshake.4
Imprint returns an encrypted provisioning payload
Imprint validates that the payment method belongs to you, then requests the encrypted payload
from the card network on your behalf.
5
Your app hands the payload back to the wallet SDK
The SDK decrypts it and adds the card. The customer sees the card appear in their wallet.
The endpoint
The wallet is named explicitly in the path so the contract is unambiguous about which wallet you
are provisioning, and so additional wallets can be added later without changing this one.
See the API reference
for the full request and response schemas.
This endpoint is the same for every Imprint program. There is no partner-specific path — your
API key determines which program and which cards you can act on.
Apple Pay
Request
Take these three values from yourPKAddPaymentPassViewControllerDelegate callback:
certificateChain as [Data] and nonce / nonceSignature as Data.
Base64-encode each one before sending it — Imprint rejects raw bytes with
invalid_request. Do not otherwise transform the values.
Response
PKAddPaymentPassRequest. Base64-decode each value first — Imprint
returns Base64 strings, but the PassKit properties are Data. Assigning the strings without
decoding hands PassKit the wrong bytes and provisioning fails.
Imprint uses elliptic-curve key exchange, so
ephemeral_public_key is always the key field in
the response. You do not need to handle the RSA wrappedKey variant.Google Pay
Google Pay is not yet accepted by the endpoint —
wallet: google_pay
currently returns 400 wallet_unsupported. The shape below is published so you can plan your
Android integration; it will be enabled without a breaking change to the Apple Pay contract.Request
Response
opaque_payment_card is the only value that must come from this response. Build the rest of the
PushTokenizeRequest from values you already have:
Errors
Provisioning errors use the standard Imprint error envelope described in Error handling, with a machine-readablecode:
422
Not supported
Security notes
- Provisioning payloads are encrypted for the wallet provider. Your app cannot read the card number from them, and neither can anyone intercepting them.
- Payloads are single-use. Do not log them, cache them, or persist them.
- Ownership is enforced server-side. Imprint verifies that the
payment_method_idbelongs to the program your API key is scoped to. A payment method from another program returns404, not403, so the endpoint does not reveal whether an unknown ID exists. - Keep your API key server-side. You must call this endpoint through your app’s backend proxy — your Imprint API key must never ship inside your mobile app binary.