# Get Transaction By Source Id

`lawpay_get-transaction-by-source-id` · LawPay MCP tool · Transactions

Fetch a single LawPay Payment Gateway transaction by its merchant-supplied source id.

## LawPay Frequently Asked Questions

**What does the Get Transaction By Source Id tool do?**

This page documents the Get Transaction By Source Id tool (`lawpay_get-transaction-by-source-id`). Fetch a single LawPay Payment Gateway transaction by its merchant-supplied source id. It is one of the LawPay Transactions tools, invoked through your firm's Weave MCP connection and available to members whose access level permits it.

**What is a source id?**

It is the identifier your own billing or practice management software attached to the payment when it was created, as distinct from the id LawPay assigns. Use it to jump straight from a record in another system to the matching LawPay payment.

**What is the LawPay integration?**

The LawPay integration connects your firm's LawPay account to Weave. LawPay is a legal-industry payment platform (AffiniPay). This integration exposes read-only access to your LawPay Payment Gateway transactions, search, look up by ID, and look up by source ID, as governed MCP tools, scoped per member by access level. It does not move money or change any LawPay data. It groups 4 tools into 1 category, exposed through your firm's Weave MCP connection and filtered per member by access level.

**How does my firm connect LawPay to Weave?**

An admin opens LawPay in the Weave console, clicks Connect, and enters your LawPay API secret key. Optionally, they can name your accounts (for example Operating and Trust) and choose a default account to search. Every firm member then works through that one connection, limited by their Weave access level.

**Can these tools charge a card, issue a refund, or move money?**

No. Every public LawPay tool is read-only. None of them can create a charge, issue a refund, void a payment, or change any LawPay setting.

**Why does every LawPay request fail after connecting?**

LawPay lets a merchant restrict API access to specific IP address ranges. Weave's servers do not use a fixed IP address, so if your LawPay account has an API IP allowlist configured, LawPay rejects Weave's requests. Leave the API IP allowlist empty in your LawPay settings to use this integration.

**Does it cover both my operating and trust accounts?**

Yes. Searches cover every account unless your admin chose a default account, and you can always ask for all accounts. If your admin names your accounts when connecting, you can ask for a specific account by name (for example Trust), and results show which account each payment was processed against.

**How are amounts shown?**

Amounts come back exactly as LawPay reports them: whole numbers in the currency's smallest unit, so 150000 in USD means $1,500.00. Your assistant converts them when it answers.

## Related
- /integrations/lawpay/transactions/get-transaction/
- /integrations/lawpay/transactions/search-transactions/
- /integrations/lawmatics/invoices/get-invoice/

## Input

- **sourceId** `string` (required, min length: 1) — Merchant-supplied source id assigned to the transaction at creation (distinct from the LawPay-assigned transaction id).

## Output

- **data** `object` (required) — The requested transaction.
  - **id** `string` (required) — Unique identifier of the transaction.
  - **type** `string` (required) — Transaction type, e.g. "CHARGE", "REFUND", "CREDIT" (open string).
  - **status** `string` (required) — Transaction status, e.g. "COMPLETED" (open string).
  - **accountId** `string` (required) — LawPay account id the transaction was processed against.
  - **accountName** `string | null` (required) — Operator-configured display label for accountId (from the accounts credential); null when the id isn't mapped.
  - **created** `string | null` (required) — When the transaction was created; presence varies by endpoint (provisional).
  - **completionTimestamp** `string | null` (required) — When the transaction completed; null while pending or unavailable.
  - **amount** `integer` (required) — Transaction amount in integer minor units (e.g. USD cents).
  - **currency** `string` (required) — ISO 4217 currency code, e.g. "USD" (open string).
  - **amountRefunded** `integer | null` (required) — Total amount refunded against this transaction, in integer minor units; null when not applicable.
  - **surchargeAmount** `integer | null` (required) — Surcharge amount included in the transaction, in integer minor units; null when not applicable.
  - **autoCapture** `boolean | null` (required) — Whether the charge was configured to auto-capture; null when not applicable.
  - **authorizationCode** `string | null` (required) — Card network authorization code; null when unavailable.
  - **failureCode** `string | null` (required) — Failure reason code (open string); null when not failed.
  - **chargeId** `string | null` (required) — Id of the parent CHARGE transaction; present on a REFUND.
  - **reference** `string | null` (required) — Merchant-supplied correlation reference; null when unset.
  - **cvvResult** `string | null` (required) — CVV verification result code (open string); null when not collected.
  - **avsResult** `string | null` (required) — Address-verification result code (open string); null when not collected.
  - **messages** `array | null` (required) — Human-readable status/processing messages; null when none.
    - **[]** `string`
  - **method** `object` (required) — Payment method used for the transaction.
    - **type** `string` (required) — Payment method type, e.g. "card" or "bank" (open string).
    - **cardType** `string | null` (required) — Card brand, e.g. "Visa"; null for non-card methods.
    - **number** `string | null` (required) — LawPay-masked card number, e.g. "************4242"; null when not applicable.
    - **last4** `string | null` (required) — Last four digits of the card number, derived from the masked number; null when not derivable.
    - **expMonth** `integer | null` (required) — Card expiration month (1-12); null for non-card methods.
    - **expYear** `integer | null` (required) — Card expiration year; null for non-card methods.
    - **fingerprint** `string | null` (required) — LawPay's stable fingerprint for this payment method; null when unavailable.
    - **name** `string | null` (required) — Holder display name — the account/card holder name for business bank and card methods, or the given name + surname composition for individual bank holders; null when unavailable.
    - **givenName** `string | null` (required) — Individual bank account holder's given name; null for business holders or card methods.
    - **surname** `string | null` (required) — Individual bank account holder's surname; null for business holders or card methods.
    - **bankName** `string | null` (required) — Bank name; null for card methods.
    - **accountType** `string | null` (required) — Bank account type, e.g. "checking" (open string); null for card methods.
    - **accountHolderType** `string | null` (required) — Bank account holder type, e.g. "individual" or "business" (open string); null for card methods.
    - **routingNumber** `string | null` (required) — LawPay-masked bank routing number, e.g. "******013"; null for card methods.
    - **accountNumber** `string | null` (required) — LawPay-masked bank account number, e.g. "******0003"; null for card methods.
  - **refunds** `array | null` (required) — Refunds issued against this transaction; present on a CHARGE, null otherwise.
    - **[]** `object`
      - **id** `string` (required) — Unique identifier of the refund transaction.
      - **type** `string` (required) — Transaction type (open string; expected "REFUND").
      - **status** `string` (required) — Transaction status, e.g. "COMPLETED" (open string).
      - **accountId** `string` (required) — LawPay account id the refund was processed against.
      - **accountName** `string | null` (required) — Operator-configured display label for accountId (from the accounts credential); null when the id isn't mapped.
      - **created** `string | null` (required) — When the refund was created; presence varies by endpoint (provisional).
      - **completionTimestamp** `string | null` (required) — When the refund completed; null while pending or unavailable.
      - **amount** `integer` (required) — Refund amount in integer minor units (e.g. USD cents).
      - **currency** `string` (required) — ISO 4217 currency code, e.g. "USD" (open string).
      - **failureCode** `string | null` (required) — Failure reason code (open string); null when not failed.
      - **chargeId** `string | null` (required) — Id of the parent CHARGE transaction this refund applies to.
      - **reference** `string | null` (required) — Merchant-supplied correlation reference; null when unset.
      - **method** `object` (required) — Payment method used for the refund.
        - **type** `string` (required) — Payment method type, e.g. "card" or "bank" (open string).
        - **cardType** `string | null` (required) — Card brand, e.g. "Visa"; null for non-card methods.
        - **number** `string | null` (required) — LawPay-masked card number, e.g. "************4242"; null when not applicable.
        - **last4** `string | null` (required) — Last four digits of the card number, derived from the masked number; null when not derivable.
        - **expMonth** `integer | null` (required) — Card expiration month (1-12); null for non-card methods.
        - **expYear** `integer | null` (required) — Card expiration year; null for non-card methods.
        - **fingerprint** `string | null` (required) — LawPay's stable fingerprint for this payment method; null when unavailable.
        - **name** `string | null` (required) — Holder display name — the account/card holder name for business bank and card methods, or the given name + surname composition for individual bank holders; null when unavailable.
        - **givenName** `string | null` (required) — Individual bank account holder's given name; null for business holders or card methods.
        - **surname** `string | null` (required) — Individual bank account holder's surname; null for business holders or card methods.
        - **bankName** `string | null` (required) — Bank name; null for card methods.
        - **accountType** `string | null` (required) — Bank account type, e.g. "checking" (open string); null for card methods.
        - **accountHolderType** `string | null` (required) — Bank account holder type, e.g. "individual" or "business" (open string); null for card methods.
        - **routingNumber** `string | null` (required) — LawPay-masked bank routing number, e.g. "******013"; null for card methods.
        - **accountNumber** `string | null` (required) — LawPay-masked bank account number, e.g. "******0003"; null for card methods.
      - **messages** `array | null` (required) — Human-readable status/processing messages; null when none.
        - **[]** `string`
