Manual entry
A cardholder opens their wallet app, chooses to add a card, and types in the card number, expiry, and CVV. The wallet asks the card network to tokenize the card, Grid approves it, and the card appears in the wallet. UsePOST /cards/{id}/reveal to
show the cardholder the details they need to type. Nothing else is
required: no wallet-provider approval, no SDK, no extra endpoint.
Some tokenizations require a second factor. The wallet asks the
cardholder to confirm with a one-time code that Grid emails or texts on
your behalf. Brand those messages with
cardTokenization2faConfig on
PATCH /platform/config.In-app provisioning: the “Add to Wallet” button
In-app (push) provisioning lets the cardholder add the card from inside your app with one tap, without typing anything. Each wallet provider ships a library your app integrates to start that flow:
When the cardholder taps the button, the wallet SDK produces those
values, which identify the device and the wallet session. Your app sends
them to Grid, an encrypted payload is returned, and the wallet SDK uses
that payload to finish adding the card. The payload is encrypted to the
wallet provider’s keys, so neither your app nor your servers ever see
card data.
Only the “Add to Wallet” button requires the setup below. Each wallet
provider must approve your app before its SDK will provision cards, and
the approvals are the slowest step, start them early.
Apple Pay
- Your Apple developer account owner submits Apple’s In-App Provisioning request form with your company name, app name, Adam ID from App Store Connect, sponsor bank, and card program details. Name Lightspark as the issuer processor.
- Apple approves and sends instructions for the
com.apple.developer.payment-pass-provisioningentitlement and the pass metadata. - Send your Lightspark contact the app’s Application Identifiers, Adam ID, and launch URL. We register them with the card processor so the wallet can hand off to your app.
- In the app, open Apple’s add-to-Wallet screen
(
PKAddPaymentPassViewController). When the cardholder continues, Apple hands your app three values that identify this device’s Wallet and this session:certificates,nonce, andnonceSignature. Send them to Grid withPOST /cards/{id}/tokenize.
Google Pay
- Request access to Google’s Push Provisioning API through the Push Provisioning API Access Request form.
- Submit your “Add to Google Wallet” flow through Google’s Push Provisioning API UX Review Request form.
- Google approves and allowlists your app. Integrate the TapAndPay SDK.
- In the app, start the add-to-Wallet flow through the TapAndPay SDK
using Google’s current flow, Unified Push Provisioning (UPP). Google
Wallet runs the screens itself and then calls your app back asking for
the card’s payment credentials, handing you a
serverSessionIdthat identifies this session. Send it, with the wallet account id, to Grid withPOST /cards/{id}/tokenize, and return Grid’s payload from that callback.
Samsung Pay
- Create a Samsung Pay developer account and request access to the Samsung Pay developer portal.
- Create a push provisioning service and register your app for card enrollment.
- Submit your production app for Samsung’s review. Once released, integrate the Samsung Pay SDK and use Samsung’s official “Add to Samsung Wallet” button assets.
- In the app, start the add-to-Wallet flow through the Samsung Pay
SDK. It hands your app two values that identify the cardholder’s
Samsung Wallet and this device:
walletUserIdanddeviceId. Send them to Grid withPOST /cards/{id}/tokenize, and pass Grid’s payload to the SDK’saddCardcall.
The API call
POST /cards/{id}/tokenize takes the wallet name plus the values the
SDK produced and returns the payload the SDK needs. Hand the response
straight back to the SDK.
This call is authenticated with your platform credentials like every
other Grid call, so make it from your server and relay the result to
the app rather than embedding the credentials in the app.
wallet: each
wallet has its own request shape and its own response shape, so a
request carrying a field from another wallet’s shape is rejected.
Pass every value exactly as the SDK gave it.
certificate is the leaf
certificate (the first element of Apple’s certificates array),
base64-encoded in PEM form; nonce and nonceSignature are base64.
- Apple Pay
- Google Pay
- Samsung Pay
PKAddPaymentPassRequest from the three applePay fields
and pass it to the delegate’s completion handler.Errors
Every call is audit-logged with the requesting actor and the target
wallet. The payload itself is never logged.
Sandbox
Sandbox cards acceptPOST /cards/{id}/tokenize and return a
well-formed payload, but the wallet SDKs on a real device will not
accept sandbox cards. Test the request shape and error handling against
Sandbox, and the end-to-end device flow against a Production card once
your wallet approvals are in place.