Skip to main content

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​

  1. Call the digitalCard query.
  2. Enter your digital card ID (line 2). If you're resolving a DigitalCard.Created or DigitalCard.Updated webhook event, use the event's resourceId. Learn more about tracking digital card changes.
  3. Add the information you need. In this example, PendingDigitalCard returns ConsentPending, Pending, or Declined (line 8). For a card that's Enabled, Suspended, or Canceled, replace the fragment with ... on CompleteDigitalCard. A card can be Canceled at any point, including when the cardholder doesn't consent.

Query​

Open in API Explorer
query 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"
}
}
}
}