Use Cases

Card and bank transaction data for workflows on authorizations, AI finance agents, expense management, accounting and month-end close: what each reads.

For: developers and product teams

Astrada delivers the data: card transactions from the networks, bank transactions from connected accounts, and the matches between the two, through the API and webhooks. What happens next is up to the software you point it at. This page covers five uses, and which events and fields each one reads.

Workflows on authorizations

When a card is used, the card network sends the authorization, and Astrada records it within seconds and sends transaction.created with status PENDING. Your app can act on that moment, while the cardholder still has the receipt in hand. Astrada does not hold or decline the purchase: the card's bank has already answered it, and the workflow is your app's.

What the workflow needsWhere it comes from
The triggertransaction.created with status PENDING. Visa and Mastercard send authorizations as the card is used; American Express authorizations are available in the US only, by Astrada's approval (Geographic Coverage). A declined authorization arrives with status DECLINED. Some purchases arrive first as a settled charge with no authorization before it
Who to askThe transaction's cardId. On a bank-only movement it is a card linked to that bank account, used for grouping, so it may not name the person who spent (and it is null when the account has no linked card); the card's owner from GET /cards/{cardId}/cardholder, which needs the cardholder:read scope and answers 404 for a card with no cardholder
What to show themdescriptor (the merchant name), transactionHoldAmount in transactionCurrency, and acceptor (merchant category code in mcc, city, state, country)
How to tie a receipt or an answer backThe transaction id: every later event for this card transaction carries the same id. A bank posting that arrived before the card data is a transaction of its own, revised to 0 once Astrada matches it (Bank-first, card-later), and a refund can arrive under its own id (see Refunds under Accounting)
What changes latertransaction.updated when the purchase settles, is voided or changes amount; read the latest with GET /transactions/{transactionId}

For example, on a transaction.created with status PENDING (a declined authorization request arrives DECLINED; a purchase that arrives SETTLED is handled as settled) your app can:

  • ask the cardholder for a photo of the receipt, and store it against the transaction id (a pending refund also arrives PENDING, with a negative hold: skip the receipt request for it);
  • start an approval, or tell a manager about a purchase above a limit you set;
  • flag a merchant category your policy asks about;
  • take the amount off a team's budget, put it back if the authorization is voided, and take it off again if it later settles (VOIDED is not final).

Register a webhook for each subaccount (Webhooks) to receive these events.

AI finance agents

An agent that works on company spend needs each purchase while it is still fresh, with the card, the person and the merchant attached. Astrada sends that as it happens; your agent decides what to do with it.

What the agent needsWhere it comes from
Each purchase as it happens, who made it, the merchant and the amountsThe same events and fields as Workflows on authorizations
Settled amounts and later correctionsThe same events and fields as Accounting
Spend that never touches a cardBank-only movements from a connected bank account, on the same events (credit-card accounts by default; checking and savings once Astrada widens your account's policy)

What an agent does with each purchase is yours to build. For example:

  • check it against your expense policy, and message the cardholder for a receipt while they still have it;
  • code it to an expense category from its merchant category code, before anyone opens a report;
  • spot a new recurring charge or an unusual merchant, and ask the card's owner about it.

Your service receives the webhook and hands the event to the agent; the agent's tools can read the latest state of a transaction with GET /transactions/{transactionId}.

To have an AI assistant help you write the integration itself, see Use the Docs with AI Assistants.

Expense management

An expense product needs every employee's card spend as it happens, with enough detail to fill in the expense line before the employee does. Astrada sends the transactions; approvals, receipts and reports live in your product.

What expense management needsWhere it comes from
Every employee's card feeding inEmployees connect their own cards with SDK v2 on an employee page (persona: "cardholder"), or from an enrollment link you send them (where Astrada has switched links on for your account); cardsubscription.created tells you about each card
Each purchase as it happens, with the card, merchant and amountsThe same events and fields as Workflows on authorizations
An expense categoryacceptor.mcc, the merchant category code, mapped to your categories, with a fallback category for when it is null
A receipt for each purchaseAsked for on the authorization and tied back by the transaction id (Workflows on authorizations)

For example, your product can:

  • fill in the expense line from descriptor, the category for acceptor.mcc and the amount (both fields can be null);
  • count a line as final once it is SETTLED, decide how long a PENDING, VOIDED or DECLINED one stays open (a later message can still settle any of them), and amend the report when a later transaction.updated changes an amount.

Accounting

Bookkeeping that keeps the ledger current through the month needs the final amount of each purchase, its currencies, an account to post it to, and every later correction. Astrada sends the amounts and the corrections; the entries are made in your accounting system or ERP.

What accounting needsWhere it comes from
The amount to posttransaction.created or transaction.updated with status SETTLED (some purchases and every bank-only movement arrive already settled): transactionSettledAmount in transactionCurrency (what the merchant charged) and cardholderBillingSettledAmount in cardholderBillingCurrency (what the card is billed) (amounts that look wrong)
A ledger accountacceptor.mcc, mapped to your chart of accounts, with a fallback account for when it is null
Cash movementsA connected bank account adds fees, transfers and other bank-side activity as SETTLED transactions. By default people can connect only credit-card accounts; checking and savings activity arrives once Astrada widens your account's bank-linking policy
RefundsRead the direction from the transaction message's transactionType (CREDIT_* or DEBIT_*) when it has one. A card clearing without one is a refund when its amount is negative; a bank-only movement or a correction has none, and a negative amount there is money coming in or a correction, not a refund. Whether a refund joins its purchase or arrives as a transaction of its own depends on a setting on your account (refunds)
One record per purchaseSee Month-end close and reconciliation
CorrectionsA settled amount can change when the network's own clearing arrives (tips, foreign exchange): see Earlier settlement. A bank posting the bank takes back arrives as banktransaction.deleted, and its match as transaction.match.deleted (retractions)

For example, your sync can post a journal line when a transaction settles, keyed by the transaction id, so a later transaction.updated amends the same line instead of adding one.

Month-end close and reconciliation

Closing a month is the tie-out at the end of the period: every card charge at its settled amount, every bank movement, and the two tied together. Astrada sends all three on one feed, so a close tool or ERP starts from matched records instead of two exports.

What the close needsWhere it comes from
Settled amounts, bank movements, refunds and correctionsThe same events and fields as Accounting, including its limit on which bank accounts people can connect
Card and bank tied togetherWith cards linked to the account (often automatic), Astrada matches each bank posting that belongs to a card purchase to its card transaction and sends transaction.match.created with a confidence and a score
One record per purchaseWhen the card transaction comes first, a high-confidence match settles it on the bank's evidence. When the bank posting comes first, it is a SETTLED transaction of its own, and any later match (HIGH or MEDIUM) revises it to 0 while it stays SETTLED (Bank-first, card-later): amend that line rather than delete it

In outline, a close tool:

  • keeps one record per transaction id, updated on every transaction.created and transaction.updated;
  • decides at month end whether to accrue a transaction still PENDING (an authorization the network has not cleared);
  • uses the match events to tie bank postings to card transactions, sends matches below HIGH to a person to review, and undoes a match on transaction.match.deleted;
  • expects several matches on one purchase that clears in parts.

How matching works and what each match event carries: Bank Linking Webhooks & Events.

Astrada sends the data and the matches; the tie-out and the journal entries are made in your close tool or ERP.


Did this page help you?