Get digital card information
Get information about a digital card with the API, including its status and the card it belongs to.
Prerequisites
You need a project access token to call the query.
You can also use a user access token if the user is the cardholder, or an account member with both the canManageAccountMembership and canManageCards permissions.
Guide​
- Call the
digitalCardquery. - Enter your digital card ID (line 2). If you're resolving a
DigitalCard.CreatedorDigitalCard.Updatedwebhook event, use the event'sresourceId. Learn more about tracking digital card changes. - Add the information you need. In this example,
PendingDigitalCardreturnsConsentPending,Pending, orDeclined(line 8). For a card that'sEnabled,Suspended, orCanceled, replace the fragment with... on CompleteDigitalCard. A card can beCanceledat any point, including when the cardholder doesn't consent.
Query​
Open in API Explorerquery getDigitalCard {
digitalCard(digitalCardId: "$YOUR_DIGITAL_CARD_ID") {
id
type
cardId
... on PendingDigitalCard {
statusInfo {
status
}
}
}
}
Payload​
The payload shows a digital card the cardholder added to their wallet manually (line 5). It's still Pending (line 8) until provisioning succeeds and the status moves to Enabled, or fails and it moves to Declined.
{
"data": {
"digitalCard": {
"id": "$YOUR_DIGITAL_CARD_ID",
"type": "Manual",
"cardId": "$YOUR_CARD_ID",
"statusInfo": {
"status": "Pending"
}
}
}
}