docs
/
AppEngine API

Payments, cards and disputes

Moving money in AppMint Banking — book transfers, ACH, wires and instant payments, NACHA files, returns, payees, debit cards and Reg E disputes, on the staff and network routes.

Every movement of money is a banking_transaction. Monitoring screens it before money moves, and it posts through the ledger as balanced debit and credit lines (banking_entry). This page covers the staff routes under /banking/* and /banking/ops/*, plus the calls a sponsor bank or card processor makes. Customers start their own payments on the customer API.

Amounts are whole cents everywhere: 1250 is $12.50. Any other amount gets a 400 Send amount in cents, as a whole number (1250 = $12.50).

staff below means a signed-in staff person or an org API key whose scopes cover the call. The words after · are the Banking modules a person's role must open. See access.

Transactions

GET/banking/transactionsSTAFF
GET/banking/transactions/:idSTAFF

transactions filters by account (either side of a transfer), status, kind, rail and direction, newest first, paged. transactions/:id returns { transaction, entries }, where entries are its ledger lines (up to 50).

FieldValues
railbook, ach, wire, rtp, fednow, card, check, cash
directionin, out
statuspending, in_review, posted, returned, failed, cancelled, reversed
initiatedBy.typecustomer, staff, system, network

kind names what the movement is: transfer, ach, wire, rtp, card, check_deposit, fee, interest, adjustment, reversal, provisional_credit, the teller and cash kinds, and the loan kinds.

Lifecycle. A new movement is pending. Screening then does one of three things:

  • Passes it. A book transfer posts at once. ACH waits for the next cutoff. A wire or instant payment waits for a person to release it.
  • Holds it. A rule with action hold puts it in_review. Compliance clears or rejects it in Monitoring › review (compliance). Clearing carries it on as if screening had passed it. Rejecting fails it and releases its hold: an outgoing payment reads The bank declined this payment. and an incoming one The bank returned this payment to the sender.
  • Blocks it. A rule with action block fails it with This payment can't be made from this account. Contact the bank.

A rule in testing only records an alert. Clearing or rejecting takes an optional reason: false_positive, true_positive, expected_activity, duplicate, insufficient_information or other.

An open sanctions hit also holds a payment back. A pending hit stops any payment. A blocked hit stops money going out. While a hit is open, clearing or releasing the payment returns 409 This payment is waiting on a compliance review and can't be released yet.

Idempotency. transfers, payments and pulls take an idempotencyKey: a non-empty string of at most 200 characters. Staff may leave it out; customers must send one. Sending the same key with the same terms from the same caller returns the original transaction and moves no money. The same key with different terms, or from a different caller, returns 409. If the server cannot tell whether a first attempt was saved, it answers 503 with code PAYMENT_RECOVERY_REQUIRED or POSTING_RECOVERY_REQUIRED. Retry with the unchanged key to read the receipt, and do not send a replacement.

Sending money

POST/banking/transfersSTAFF
POST/banking/paymentsSTAFF
POST/banking/pullsSTAFF
POST/banking/transactions/:id/cancelSTAFF
POST/banking/transactions/:id/failSTAFF
POST/banking/transactions/:id/reverseSTAFF

transfers moves money between two accounts at this bank: { from, to, amount, memo?, idempotencyKey? }. from and to are each an account's id or account number. It is a transfer on the book rail. Both accounts must be open deposit accounts in the same currency. The destination must accept credits and cannot be the source account. Loan, internal and bank-book accounts are refused: they use their own servicing routes.

payments sends to another bank for a holder: { account, counterparty, rail, amount, memo?, sameDay?, idempotencyKey?, counterpartyFingerprint? }.

  • rail is ach (the default), wire, rtp or fednow.
  • counterparty must be a payee belonging to one of the account's holders, and not disabled.
  • The payee's bank must take the rail. A domestic payee takes ACH and wire; an international payee takes wire only.
  • These rails carry US dollars only. An account in another currency is refused with 422.
  • An ACH carries SEC code CCD for a business payee and PPD otherwise. sameDay applies to ACH.
  • If counterpartyFingerprint is sent and the payee has changed since it was reviewed, the call is refused with 409 The payee changed after this review.

pulls brings money in by ACH from a holder's verified payee: { account, counterparty, amount, memo?, idempotencyKey? }. The payee must be verified (Verify … before pulling money from it.). The account must be open and able to take credits. A pull a customer starts carries SEC code WEB; one staff start carries CCD or PPD.

Every outgoing send is checked before it is created:

  • The account must be open. A debits block refuses it, and an external_out block refuses payments to other banks.
  • The amount must fit within the spendable balance (posted − held + overdraft limit). If not, the call returns 409.
  • Limits apply, and so does the Travel Rule for wires.
  • The amount is then held on the account (pending_payment) and screened.

cancel stops a pending or in_review payment and releases its hold. It is refused when the ACH is already in a file, and for money arriving from another bank, which is returned rather than cancelled.

fail takes { reason } and fails a pending or in_review payment, releasing its hold. The reason is required because the customer sees it.

reverse takes { reason }. It undoes a posted transaction with a reversal that swaps every ledger line, and marks the original reversed. A transaction has at most one reversal, and a reversal is never reversed itself. Other domains keep their own entries, so these are refused with 409:

The transaction isUse instead
A teller, cash, cash movement or instrument saleTeller or Branch cash
A card transactionCard servicing or the card dispute action
A provisional credit, or tied to a disputeThe dispute action
A loan entryLending's servicing action

A loan_payment is the exception: it is reversed through lending, and only by someone who can open the lending module.

Fees, adjustments and fee refunds on an account are on accounts and ledger.

Limits

An account's limits are its product's limits merged with its own, and the account's own entry wins for the same rail, direction and period. Each entry has:

  • a rail and a direction (default out);
  • a period: transaction, day or month;
  • an amount cap, a count cap, or both.

A movement that would pass a limit is refused with 422, which says what is left, for example That would pass the ACH limit of $5,000.00 today — $1,200.00 left. Failed, cancelled, reversed and returned movements do not count toward a limit. A product's withdrawalsPerMonth caps the outgoing movements a savings account makes in a month. Fees, interest, adjustments and reversals do not count toward that cap.

Travel Rule

A wire of $3,000 or more (31 CFR 1020.410(a), 1010.410(f)) must carry:

  • for the originator: their name, address and account number;
  • for the beneficiary: their name, account number (or IBAN), and bank (routing number or SWIFT/BIC).

The originator's address comes from the customer record, or else from the verified address on their KYC record. A wire that lacks any of this is refused with 422, and the message names what to add.

Wires and instant payments

GET/banking/to-sendSTAFF
GET/banking/ops/payments/to-releaseSTAFF
POST/banking/transactions/:id/releaseSTAFF

Wires, RTP and FedNow payments are sent by hand from the sponsor bank's portal. A screened payment on these rails stays pending until someone records it as sent. to-send lists every pending outgoing payment on these rails.

ops/payments/to-release is the paged work queue for those payments. It takes q, rail (wire or instant), sort (createdate or amount), sortType, page and pageSize. Each row carries:

  • the account and customer, and the beneficiary's bank details with the account as its last 4;
  • the initiator, with isYou;
  • any pending release approval;
  • the Travel Rule state, with missing naming any gaps;
  • the count of open OFAC hits and monitoring alerts.

release takes { imad, omad?, externalId? }, and a wire needs its imad. It is the wire_release approval: maker-checker. By default it needs a second person holding PaymentsOps, BranchManager or Owner. The person who started the payment cannot approve it, and neither can the maker. The answer is { status: 'done', result } or { status: 'pending', approvalId, approvers }. Once approved, the payment posts against the rail's settlement book and the product's wire_out or rtp_out fee is charged.

ACH files

POST/banking/ach/cutSTAFF
GET/banking/filesSTAFF
GET/banking/files/:idSTAFF
POST/banking/files/:id/sentSTAFF
GET/banking/ops/payments/summarySTAFF
GET/banking/ops/payments/ach-pendingSTAFF
GET/banking/ops/payments/filesSTAFF
GET/banking/ops/files/:idSTAFF

Cutting a file. The ACH cutoff scheduled job runs every 15 minutes. When a cutoff in Banking Config (ach.cutoffs, in the bank's time zone, default 10:30, 14:30, 17:30) has passed and no file has been cut since, it cuts one. ach/cut cuts one now. A cut needs the routing number and the ACH company ID and name in Banking Config; without them it returns 409.

A cut takes every pending ACH that is not yet in a file, posts each one as it enters the file, and builds one NACHA file per SEC code. A payment that can no longer go fails and stays out of the file:

  • its payee's details changed after it was reviewed;
  • its payee's routing or account number is incomplete;
  • it can no longer post, for example because the account was frozen.

Its hold is released. A pulled ACH posts with a hold for 2 days plus ach.incomingHoldDays, the window in which most returns arrive.

A file is same-day only when every entry in it is sameDay. It then settles today if today is a business day; otherwise, and for a standard file, it settles the next business day. Business days skip weekends and federal holidays. Each payment gets the file's id in network.batch, its trace number and the effective date.

The cut returns { files, posted, failed: [{ reference, reason }] }.

The banking_file record. Each file has batchNumber, which counts up per bank, plus secCode, effectiveDate, entryCount, credits and debits (in cents), transactions, and the content exactly as generated with its checksum. files lists them without their content. files/:id returns a file with its content, to hand to the sponsor bank. files/:id/sent moves a built file to sent and records sentAt and sentBy; any other status returns 409.

The desk. ops/payments/summary returns each rail's cutoff state in the bank's time:

  • ACH: every cutoff and the next one;
  • wire: wire.cutoff, default 17:00;
  • RTP/FedNow: always on.

It also returns the counts and totals the desk works from: to release, awaiting approval, ACH pending in and out, same-day ACH, files built, returns today, incoming exceptions, payees awaiting verification, outgoing payments held for review, and the Travel Rule threshold. A figure that could not be read is null, and its name is listed in unavailable.

  • ops/payments/ach-pending lists ACH waiting for the next cutoff. It takes direction, q, sort, page and pageSize.
  • ops/payments/files filters files by status and by q (batch number, SEC code or effective date).
  • ops/files/:id reads a file record by record: header, batches, and entries with masked accounts. It also returns the raw content and the payments in the file.

Desk lists page 25 rows by default and at most 100.

Money from the network

POST/banking/network/incomingSTAFF
POST/banking/network/returnsSTAFF
GET/banking/ops/payments/returnsSTAFF
GET/banking/ops/payments/returnableSTAFF
GET/banking/ops/payments/incoming-exceptionsSTAFF

These are the calls the sponsor bank's side makes, or a person makes for it.

network/incoming records money arriving: { accountNumber, rail, amount, counterpartyName?, description?, network?, idempotencyKey? }. rail is ach, wire, rtp, fednow or check, and a check makes a check_deposit.

  • The idempotency key defaults to network.traceNumber, then network.imad, then network.externalId, so the same network id returns the same transaction.
  • No such account returns 404 Return it to the sender (ACH R03).
  • A closed account records the payment as failed: Return it to the sender (ACH R02).
  • Otherwise it is screened and posted. Check deposits are held for checkHoldDays (default 2) and ACH credits for ach.incomingHoldDays (default 0). Wires and instant payments are not held. An incoming wire charges the product's wire_in fee.

network/returns posts an ACH return: { transaction | traceNumber, returnCode, returnReason? }.

  • A return code is required, and a trace that matches more than one payment is refused.
  • Only a posted payment is returned. Only plain external settlements qualify: not transfers, loan, card, cash or fee entries.
  • It posts a reversal against the original settlement book, releases any hold, marks the original returned with its code, and charges the product's ach_return fee.
  • Repeating the call returns the same outcome and charges no second fee.

The desk.

  • ops/payments/returns lists returned payments, newest first, with the NACHA return-code table (code, label, return window, and whether it means unauthorized).
  • ops/payments/returnable finds posted ACH that a return can be posted against, by reference, trace, payee or account digits.
  • ops/payments/incoming-exceptions lists money from other banks in the last 30 days that did not post: in_review (held by monitoring) or failed (refused). Each row has its problem and nextStep. Sending a return to the sender is done from the sponsor bank's portal, because the sponsor bank's API is not connected.

Payees

GET/banking/customers/:customer/payeesSTAFF
POST/banking/customers/:customer/payeesSTAFF
POST/banking/payees/:id/verifySTAFF
GET/banking/ops/payments/payeesSTAFF

A payee (banking_counterparty) is a customer's account at another bank. The list leaves out disabled payees. Adding one takes { holderName, holderType?, kind?, accountType?, address?, name? } plus the bank details:

  • domestic: a valid 9-digit routingNumber and an accountNumber of 4–17 digits. The payee takes ach and wire.
  • international: a swiftBic of 8 or 11 characters and an iban or accountNumber. The payee takes wire only.

Account numbers and IBANs are stored encrypted and never returned. Only accountLast4 comes back. A new payee is unverified.

Verification is needed before money is pulled from a payee.

  • By micro-deposits. The customer starts it on the customer API. Two deposits of 1–99 cents go out from the bank's funding book in the next ACH file. The customer confirms both amounts in cents and has 3 tries; after the third miss, verification is failed. Only domestic payees can be verified this way.
  • By staff. payees/:id/verify takes { note } (required: how it was checked, for example a voided check) and marks the payee verified by manual. The note goes on the payee's activity.

ops/payments/payees lists payees awaiting verification. It takes status (pending, failed or unverified; by default pending and failed), q, page and pageSize.

Cards

POST/banking/accounts/:id/cardsSTAFF
POST/banking/cards/:id/statusSTAFF
PUT/banking/cards/:id/controlsSTAFF
POST/banking/cards/:id/replaceSTAFF
GET/banking/ops/cards/summarySTAFF
GET/banking/ops/cardsSTAFF
GET/banking/ops/cards/:idSTAFF
GET/banking/ops/cards/stale-authsSTAFF
GET/banking/ops/cards/declinesSTAFF

These are debit cards. The card processor holds the card number, CVV and PIN. The bank keeps the card's state, its controls and the money, and never returns the processor's card id.

Ordering. accounts/:id/cards takes { cardholder, form: physical | virtual, nameOnCard?, shipping: { address, method? } }. The rules:

  • The account must be open, and its product must allow cards of that form.
  • The cardholder must be a holder or an authorized user on the account.
  • A physical card needs a shipping address.

The name on the card is upper-cased and cut to 26 characters. The network comes from the product (default visa). A new card is ordered with controls online: true, atm on for a physical card, and international: false.

Card states. ordered, shipped, active, locked, lost, stolen, closed, expired. Once the processor reports the card made (cards/:id/issued, below), a virtual card is active and a physical one is shipped. The holder activates a shipped card on the customer API by confirming its last 4 digits.

cards/:id/status takes status: locked, active, lost, stolen or closed. Only an active card can be locked, and only a locked card unlocked. lost, stolen, closed and expired are final.

Replacing. cards/:id/replace takes { why: lost | stolen | damaged, shipping? }. It marks the old card lost or stolen, or closed if damaged, and orders a new one on the same account and cardholder. The new card carries the old one's controls and limits. It returns { card, account }.

Controls. cards/:id/controls sets:

  • perTransaction, dailySpend, dailyAtm: whole cents, or null to remove the limit;
  • online, atm, international: on or off;
  • blockedCategories, allowedCategories: merchant category codes.

It is the limit_change approval. Raising a limit, or removing one, needs a second person: by default BranchManager, DepositOps, CardOps or Owner. Lowering a limit, adding one where there was none, or switching a channel runs at once. The answer is { status: 'done', result } or { status: 'pending', approvalId, approvers }.

A card's view returns bankLimits (the bank's caps) and controls (what applies). A holder's own limits from the customer API can only tighten the bank's caps, never raise them.

The desk.

  • ops/cards/summary: cards to issue (physical and virtual), in the mail, lost or stolen today, stale authorizations (older than days, 1–60, default 3), and declines today.
  • ops/cards: lists cards by status (comma list), form, and q (last 4, name on card, cardholder name or email, account digits).
  • ops/cards/:id: one card with its holder, account, controls, replacement chain, any pending limit change, its last 20 card transactions, and the statuses it can move to.
  • ops/cards/stale-auths: authorizations still pending after N days, with the state of their holds.
  • ops/cards/declines: declines grouped by reason over a period (today, 7d or 30d, default 7d), with the list.

The card processor's calls

POST/banking/network/cards/authorizeSTAFF
POST/banking/network/cards/clearSTAFF
POST/banking/network/cards/voidSTAFF
POST/banking/network/cards/refundSTAFF
POST/banking/cards/:id/issuedSTAFF

cards/:id/issued takes { processorId, last4, expMonth, expYear, shippedAt?, tracking? } and works only on an ordered card.

authorize approves or declines a purchase or ATM withdrawal. It takes:

  • { card | processorId, amount, currency?, authorizationCode? };
  • the merchant: merchantName?, merchantCategoryCode?, merchantCity?, merchantCountry?;
  • entryMode?: chip, contactless, swipe, online, manual or atm.

It answers { approved, code, reason?, transaction? }. Only one authorization per card runs at a time; a second at the same moment gets 409 and should retry with the same authorization code. A repeated authorization code returns the first answer.

Checks run in this order, and each decline has a code:

CodeDeclined because
card_not_foundNo such card
card_<status>The card isn't active
atm_off, online_off, international_offThat channel is off (international means a merchant country other than US)
category_blocked, category_not_allowedThe merchant category is blocked, or not in the allowed list
over_transaction_limit, over_daily_limitOver the per-purchase limit, or over today's spending or ATM limit
account_cards_blockedCards are blocked on the account
declined_by_reviewA monitoring rule would hold or block it: a card purchase cannot wait for a person
insufficient_fundsNot enough available money, and the holder has not opted in to card overdrafts (Reg E)

A decline writes a failed card transaction, so it shows on Declines and the statement. An approval writes a pending card transaction and holds the amount (card_authorization) for 7 days. An authorization still uncleared when its hold lapses is cancelled at end of day: The merchant never completed it.

clear settles an authorization: { transaction | card + authorizationCode, amount? }. The settled amount may differ from the authorized one, which is kept as metadata.authorizedAmount. The network has already paid, so it posts whatever the balance, capturing the hold. Clearing a posted authorization again returns it unchanged.

void calls off a pending authorization and releases its hold. It is refused once settlement has started.

refund credits a merchant refund to the card's account: { card | processorId, amount, merchantName?, authorizationCode? }. With an authorization code, a repeat returns the same refund.

Disputes

POST/banking/customers/:customer/disputesSTAFF
GET/banking/disputesSTAFF
POST/banking/disputes/:id/investigateSTAFF
POST/banking/disputes/:id/provisional-creditSTAFF
POST/banking/disputes/:id/resolveSTAFF

A dispute (banking_dispute) is a customer saying a transaction is wrong, under Reg E error resolution (12 CFR 1005.11).

Filing. Customers file on the customer API. Staff file for one with customers/:customer/disputes, where :customer is the customer's id or email. It takes { transaction, reason, amount?, description? }, and the transaction must be on an account the customer holds. The rules:

  • reason is one of unauthorized, not_received, duplicate, wrong_amount, cancelled_recurring, not_as_described, atm_cash_not_received or other.
  • Only posted money that left the account can be disputed. Fees, interest, adjustments and reversals cannot, and neither can anything more than 90 days after it posted.
  • A transaction has one open dispute at a time.
  • The disputed amount cannot exceed the transaction.

Filing counts as the customer's notice, so both deadlines run from today on the bank's calendar:

DeadlineStandard caseLonger case
decideBy: decide, or give provisional credit10 business days20 on a new account
resolveBy: finish the investigation45 calendar days90 for a new account, a point-of-sale debit, or a transaction started outside the US

A new account is one whose first deposit was 30 days or less before the transaction.

Statuses. submitted → investigating → provisional_credit → won, lost or withdrawn.

  • disputes lists disputes, filtered by status and sorted by decideBy.
  • investigate takes { networkCase? } and moves a submitted dispute to investigating.
  • provisional-credit credits the disputed amount from the bank's losses book while the investigation runs. It can be given once.
  • resolve takes { outcome: won | lost, resolution }, and the resolution text is sent to the customer. If the customer won and no provisional credit was given, the amount is credited from the losses book. If they lost, any provisional credit is reversed.

A withdrawn dispute also takes back its provisional credit.

The disputes desk

GET/banking/ops/disputes/summarySTAFF
GET/banking/ops/disputesSTAFF
GET/banking/ops/disputes/:idSTAFF
POST/banking/ops/disputes/:id/factsSTAFF
POST/banking/ops/disputes/:id/noticesSTAFF
POST/banking/ops/disputes/:id/resolveSTAFF
POST/banking/ops/liabilitySTAFF
GET/banking/disputes/:id/notices/:kind/pdfSTAFF
POST/banking/disputes/:id/notices/:kind/emailSTAFF

The desk computes every Reg E clock from the dispute's facts. Each clock is labelled business_days or calendar_days, and each response carries the Reg E figures (regE) so screens hard-code nothing.

ClockDue
investigateDecide or give provisional credit: 10 business days, or 20 on a new account
resolveFinish: 45 calendar days, or 90 for the longer cases
written_confirmationOnly when written confirmation was asked for. If it doesn't arrive within 10 business days, provisional credit is no longer required, but the investigation still is
provisional_credit_noticeTell the customer about a provisional credit: 2 business days
result_noticeReport the result: 3 business days after deciding
reversal_noticeWhen a lost claim's credit was taken back: 3 business days. The bank then honors items up to the amount without overdraft charges for 5 business days after the notice
  • ops/disputes/summary counts open disputes, provisional credit due, due within 2 business days, overdue, and notices owed.
  • ops/disputes takes view: work (the default: open, or a notice still owed, sorted by the next clock), due_soon, overdue, resolved or all. It also takes q (number, or customer name or email), page and pageSize.
  • ops/disputes/:id returns everything the drawer needs: the transaction, the claim, its facts, its clocks, its liability, its notices, the letter texts and the allowed actions.

facts records the facts the clocks and liability come from:

  • the notice: noticeAt, and noticeChannel (phone, branch, online, mail, email or chat);
  • the loss: statementSentAt, learnedOfLossAt, accessDevice;
  • extenuating circumstances: extenuating, with extenuatingNote, which is then required;
  • written confirmation: writtenConfirmationRequestedAt, writtenConfirmationReceivedAt;
  • reasserted.

Dates cannot be in the future, and the notice cannot be later than the day the claim was filed. Saving facts recomputes the case type and the stored decideBy and resolveBy.

notices records a notice sent to the customer: { kind, channel, sentAt?, note? }.

  • kind: written_confirmation_request, provisional_credit, result, reversal or documents.
  • channel: mail, email, online, phone or branch.
  • A provisional-credit notice needs a provisional credit. A result or reversal notice needs the claim resolved, and a reversal notice needs a lost claim whose credit was taken back.

notices/:kind/pdf renders the letter for that kind. It is marked as a draft until a notice of that kind has been recorded. notices/:kind/email emails the letter as a PDF to the customer on the claim and returns { status: 'queued', messages, customer }. Emailing does not record the notice itself; record it with notices.

ops/disputes/:id/resolve checks consumer liability before resolving: { outcome, resolution }. For an unauthorized claim it first computes the customer's liability under 12 CFR 1005.6 and keeps it on the claim. If that is less than the disputed amount, the claim cannot be resolved as lost: 409 Under Reg E the most this customer can be held to is … Resolve it as won. The plain /banking/disputes/:id/resolve route does not run this check.

liability computes 1005.6 liability for any set of facts: { noticeAt, learnedOfLossAt?, statementSentAt?, accessDevice, extenuating, transfers: [{ at, amount }] }. It returns { amount, tier, disputed, bankOwes, steps, missing, deadlines, caps }.

TierWhen it applies
two_dayA lost or stolen device reported within 2 business days of learning of it: the lesser of $50 or what was taken before the notice
late_noticeReported later: at most $500
sixty_dayNot reported within 60 days of the statement: what was taken after day 60 and before the notice
extenuatingThe deadlines are extended, so the notice counts as timely
noneNone of the above

The customer is never liable for what was taken after the notice. Negligence is not a factor.

Datatypes: banking_transaction, banking_entry, banking_file, banking_counterparty, banking_card, banking_dispute.