Skip to main content

Add digital cards

Learn how to add digital cards to Wallets.

Provisioning guide

A complete provisioning guide can't be published on this site due to privacy policies from Google and Apple. Swan will provide one after you've certified your digital card integration.

Add digital cards to Apple Pay and Google Pay​

Manual Provisioning

Cardholders can also go digital by entering their card numbers directly into Apple Pay or Google Pay.

  1. Call the addDigitalCard mutation. When you call the mutation, make sure you are authenticated with an user access token using the name of the card's account member.
  2. Make sure to choose the walletProvider that corresponds to the cardholder's mobile device.
  3. This returns a consent.
  4. The mutation returns a consentUrl, inviting the user to start Strong Customer Authentication with the Swan app.
  5. Then the Swan app proposes adding the card to Apple Pay or Google Pay depending on the brand of the account member's mobile device.

Mutation​

🔎 Open the mutation in API Explorer

mutation DigitalApplePay {
addDigitalCard(
input: {
cardId: "$YOUR_CARD_ID"
walletProvider: ApplePay
consentRedirectUrl: "$YOUR_REDIRECT_URL"
}
) {
... on AddDigitalCardSuccessPayload {
__typename
digitalCard {
id
statusInfo {
... on DigitalCardConsentPendingStatusInfo {
__typename
consent {
consentUrl
}
}
}
}
}
}
}

Payload​

{
"data": {
"addDigitalCard": {
"__typename": "AddDigitalCardSuccessPayload",
"digitalCard": {
"id": "$YOUR_DIGITAL_CARD_ID",
"statusInfo": {
"__typename": "DigitalCardConsentPendingStatusInfo",
"consent": {
"consentUrl": "$YOUR_CONSENT_URL"
}
}
}
}
}
}