Understand declined card payments
Lists declined card payments with the exact decline reason and the remediation to apply.
AP ManagerController๐
WeeklyBeginnerRead-only
Ask it like this
Which card payments were declined this month, and why?
When to use it
When card payments fail and you need to know why and what to do.
What it produces
List of declined payments with reasonCodeLong (reason) and reasonCodeRemediation (fix) for each.
How it works
- 1Lists declined card payments over the period
- 2Gives the reason for each decline
- 3Says what the cardholder must do to unblock it
- 4Spots cards declined repeatedly
- 5Presents declines by employee or by card
What protects you
- This skill only reads: it changes nothing in Spendesk
- It acts with your permissions and your role, never beyond
- The assistant cannot approve or pay
โธTechnical detail68/100 ยท 2 tools
CardsReconciliationget_failed_transactionsget_transactions
# Auditing declined card payments
## Why a separate tool
`get_transactions` only returns successful (settled) payments. Declined payments live in a separate object, `get_failed_transactions`, with a field `get_transactions` doesn't have: a plain-language decline reason (`reasonCodeLong`) and remediation (`reasonCodeRemediation`). Always surface both to the user so they don't need to ask a follow-up โ this is explicitly documented as the tool's expected behavior.
## Differences from get_transactions to know about
- `merchantName` here is the raw card-network descriptor โ **not** comparable to `merchantName` on `get_transactions`, which is derived from the linked supplier's name.
- `createdAt` here reflects when the decline was recorded, whereas on `get_transactions` it reflects the settlement date (not authorization time) โ the two fields aren't directly comparable across tools.
- No fixed default window: without `startDate`, coverage is the last 30 days; with `startDate`, there's no depth limit.
- โ ๏ธ `endDate` alone does not move that window: it only trims the last 30 days, so an `endDate` older than 30 days returns nothing. Always pass `startDate` for any period that starts more than 30 days ago.
- On `get_transactions`, `startDate`/`endDate` filter on the settlement date only: settled payments with no settlement date are excluded as soon as a date filter is set. A date-filtered list can therefore undercount a period โ do not present its sum as a complete total.
## Call
```json
{
"tool": "get_failed_transactions",
"params": {
"companyId": "<companyId>",
"startDate": "2026-01-01"
}
}
```
## Observed result
On this account, over the tested period: `{"data":[]}` โ zero declined payments. This is a normal, legitimate result to report as-is ("no declined payments over this period") rather than treating it as an error or a sign the query failed.
## Currency trap
Each amount carries its own currency (`amountBilled.currency`, `amountDeclared.currency`) โ there's no separate `currencyBilled`/`currencyDeclared` field. Check the currency on each record before summing. If `amountDataIssue` is present, never treat the affected amount as zero โ flag it explicitly to the user.
## Example user prompts
- "Which card payments were declined this month, and why?"
- "Are there any cards with repeated declined payments?"
- "Give me the reason and fix for each of [employee]'s declined payments"
How to install this skill
/
- 1Download the file
s67-audit-paiements-carte-refuses.mdusing the button above. - 2Place the file in the
.claude/directory of your project (or~/.claude/for a global install).cp s67-audit-paiements-carte-refuses.md .claude/s67-audit-paiements-carte-refuses.md - 3Use in Claude Code โ the skill is automatically discovered. Describe your need in natural language and Claude will apply the skill instructions.
๐ก Make sure the Spendesk MCP is configured in your
.claude/settings.json with the tools get_failed_transactions, get_transactions.Similar skills
โ
Top