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 needs | Where it comes from |
|---|---|
| The trigger | transaction.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 ask | The 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 them | descriptor (the merchant name), transactionHoldAmount in transactionCurrency, and acceptor (merchant category code in mcc, city, state, country) |
| How to tie a receipt or an answer back | The 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 later | transaction.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 arrivesPENDING, 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 (
VOIDEDis 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 needs | Where it comes from |
|---|---|
| Each purchase as it happens, who made it, the merchant and the amounts | The same events and fields as Workflows on authorizations |
| Settled amounts and later corrections | The same events and fields as Accounting |
| Spend that never touches a card | Bank-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 needs | Where it comes from |
|---|---|
| Every employee's card feeding in | Employees 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 amounts | The same events and fields as Workflows on authorizations |
| An expense category | acceptor.mcc, the merchant category code, mapped to your categories, with a fallback category for when it is null |
| A receipt for each purchase | Asked 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 foracceptor.mccand the amount (both fields can benull); - count a line as final once it is
SETTLED, decide how long aPENDING,VOIDEDorDECLINEDone stays open (a later message can still settle any of them), and amend the report when a latertransaction.updatedchanges 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 needs | Where it comes from |
|---|---|
| The amount to post | transaction.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 account | acceptor.mcc, mapped to your chart of accounts, with a fallback account for when it is null |
| Cash movements | A 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 |
| Refunds | Read 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 purchase | See Month-end close and reconciliation |
| Corrections | A 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 needs | Where it comes from |
|---|---|
| Settled amounts, bank movements, refunds and corrections | The same events and fields as Accounting, including its limit on which bank accounts people can connect |
| Card and bank tied together | With 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 purchase | When 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 everytransaction.createdandtransaction.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
HIGHto a person to review, and undoes a match ontransaction.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.
Updated about 3 hours ago
