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

  1. 1Lists declined card payments over the period
  2. 2Gives the reason for each decline
  3. 3Says what the cardholder must do to unblock it
  4. 4Spots cards declined repeatedly
  5. 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

/
  1. 1
    Download the file s67-audit-paiements-carte-refuses.md using the button above.
  2. 2
    Place 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
  3. 3
    Use 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
95/100ยท๐Ÿ” Ad hocยทExpert

Audit what the MCP covers

Probes all available MCP tools, re-evaluates coverage of 50 persona use cases, detects new fields or tools, and regenerates the gap analysis report.

CFOControllerAP Manager
90/100ยท๐Ÿ“… WeeklyยทBeginner

Card requests via get_requests

Explains how to use get_requests for card requests and why expense reimbursements don't appear there. Avoids a frequent source of confusion between two distinct workflows.

ControllerFinance Analyst
90/100ยท๐Ÿ” Ad hocยทIntermediate

Active vs archived cost centers

Distinguishes active cost centers from archived ones with correct use of get_cost_centers. Avoids the counter-intuitive isArchived vs isActive naming convention pitfall.

ControllerFinance Analyst

Interested in AI Agent services or Custom Integrations?