Audience:
Update card settings using the API
Update a card's transaction settings and spending limits with the updateCard mutation.
Card settings are valid for all payments linked to the card, including all virtual, physical, and digital cards.
For all available options, review the card settings reference.
- You're authenticated with a user access token associated with the correct account member.
- The account member has the membership permission
canManageCards. The permissioncanManageAccountMembershipis optional.
Guide
- Call the
updateCardmutation. - Add the
cardIdfor the card you're updating (line 4). - Update the transaction settings as needed (lines 5-8).
- To update the spending limit, including switching between rolling and calendar periods, use the
spendingLimitfield to set the period, amount, and mode. - Add your
consentRedirectUrl(line 9). - Add the success payload, including the consent (line 14).
- Add rejections (not shown).
The mutation returns a newly created consent resource containing the consentUrl, which allows you to redirect the user making the modification to Swan's Strong Customer Authentication.
After the consent process is completed, the card is updated.
At the slightest suspicion of fraud, block all eCommerce payments temporarily by updating eCommerce to false for the concerned card product.
Additionally, you can temporarily or permanently block physical cards and permanently cancel virtual cards.
The cardholder then needs to submit a support request, after which Swan can issue a new card.
Mutation
Open in API Explorermutation UpdateCardTransactionSettings {
updateCard(
input: {
cardId: "$YOUR_CARD_ID"
withdrawal: false
international: false
nonMainCurrencyTransactions: false
eCommerce: false
consentRedirectUrl: "$YOUR_REDIRECT_URL"
}
) {
... on UpdateCardSuccessPayload {
__typename
consent {
consentUrl
id
}
}
}
}
Payload
Open the consentUrl returned by the mutation to consent to the update.
{
"data": {
"updateCard": {
"__typename": "UpdateCardSuccessPayload",
"consent": {
"consentUrl": "$YOUR_CONSENT_URL",
"id": "$YOUR_CONSENT_ID"
}
}
}
}
Also available
Update card settingsFrom the Dashboard