### GET /websites/lead_bank_api-reference/ach/{id} Source: https://docs.lead.bank/api-reference/endpoint/ach/retrieve-an-ach Fetches the details of a specific ACH object. Requires the ACH object's unique identifier. ```APIDOC ## GET /websites/lead_bank_api-reference/ach/{id} ### Description Retrieve an ACH object. ### Method GET ### Endpoint /websites/lead_bank_api-reference/ach/{id} ### Parameters #### Path Parameters - **id** (string) - Required - The unique identifier of the ACH object to retrieve. ### Request Example (No request body for GET requests) ### Response #### Success Response (200) - **id** (string) - The unique identifier of the ACH object. - **amount** (number) - The amount associated with the ACH transaction. - **status** (string) - The current status of the ACH transaction (e.g., 'pending', 'completed', 'failed'). #### Response Example { "id": "ach_12345", "amount": 100.50, "status": "completed" } ``` -------------------------------- ### Retrieve Subledger Balance by ID (OpenAPI) Source: https://docs.lead.bank/api-reference/endpoint/subledger-balance/retrieve-a-subledger-balance This OpenAPI specification defines the GET /v0/subledger_balances/{id} endpoint. It allows retrieval of an individual subledger balance by its unique identifier. The endpoint supports responses for successful retrieval (200 OK), invalid parameters (400 Bad Request), and not found errors (404 Not Found). ```yaml openapi: 3.0.1 info: title: Lead Bank description: Lead Bank's APIs version: v1.0 servers: - url: https://api.sandbox.lead.bank - url: https://api.lead.bank security: - bearerAuth: [] tags: - name: ACH - name: Account Number - name: OAuth - name: Events - name: Lending - name: Simulation - name: Internal Transfer - name: Disbursement - name: Entity - name: Wire - name: Originator - name: Funding - name: Balances - name: Compliance paths: /v0/subledger_balances/{id}: get: tags: - Subledger Balances summary: Get an individual subledger balance description: Get an individual Subledger Balance object. operationId: retrieve-a-subledger-balance-v0 parameters: - name: id description: Return Subledger Balance associated with this `id`. in: path required: true schema: type: string pattern: ^subledger_balance_\w+$ responses: '200': description: An individual balance object content: application/json: schema: $ref: '#/components/schemas/SubledgerBalanceResponse' '400': description: Your request parameters did not validate. content: application/json: schema: $ref: '#/components/schemas/APIError' '404': description: id passed in is not a valid Subledger Balance object. content: application/json: schema: $ref: '#/components/schemas/APIError' components: schemas: SubledgerBalanceResponse: type: object properties: account_id: type: string description: The account identifier example: account_a1b2c3d4e5f6g7h8 id: type: string description: The balance identifier example: subledger_balance_b7h9d6gismdk client_subledger_balance_name: type: string description: The client-facing name for this subledger balance example: Personal Loan - Home Improvement client_settlement_bank_account_id: type: string description: The settlement bank account identifier if applicable example: '12345' currency_code: $ref: '#/components/schemas/CurrencyCode' created_at: type: string format: date-time description: The ISO-8601 timestamp at which the balance was created example: '2025-09-02T11:01:36Z' updated_at: type: string format: date-time description: The ISO-8601 timestamp at which the balance was last updated example: '2025-09-02T11:05:00Z' status: $ref: '#/components/schemas/SubledgerBalanceStatus' status_reason: type: string description: The reason for the current status example: active type: $ref: '#/components/schemas/SubledgerBalanceType' metadata: $ref: '#/components/schemas/Metadata' details: $ref: '#/components/schemas/SubledgerBalanceCreditDetailsResponse' APIError: type: object properties: code: type: string description: The error code. title: type: string description: The error title. detail: type: string description: A detailed error description. status: type: string description: The HTTP status code. invalid_parameters: type: array description: Invalid request parameters with reasons, if applicable. items: $ref: '#/components/schemas/InvalidParameterDetail' instance: type: string description: >- The object causing this specific occurrence of the error, if applicable. CurrencyCode: description: A three-letter currency code as defined in ISO 4217. type: string example: USD enum: - USD SubledgerBalanceStatus: type: string description: The current status of the balance example: active enum: - active - inactive - closed SubledgerBalanceType: type: string description: The type of balance example: credit enum: - credit - deposit Metadata: type: object additionalProperties: type: string description: >- A set of key-value pairs that can be used to store additional information related to this object. SubledgerBalanceCreditDetailsResponse: type: object discriminator: propertyName: structure mapping: non_revolving: '#/components/schemas/NonRevolvingCreditDetailsResponse' ``` -------------------------------- ### Documentation Index Source: https://docs.lead.bank/api-reference/endpoint/account-number/create-an-account-number Fetch the complete documentation index for the Lead Bank API. ```APIDOC ## GET /documentation/index ### Description Fetch the complete documentation index at the provided URL. Use this file to discover all available API pages before exploring further. ### Method GET ### Endpoint /documentation/index ### Response #### Success Response (200) - **documentation_url** (string) - The URL to the complete documentation index file. #### Response Example ```json { "documentation_url": "https://docs.lead.bank/llms.txt" } ``` ``` -------------------------------- ### GET /v0/subledger_balances/{id} Source: https://docs.lead.bank/api-reference/endpoint/subledger-balance/retrieve-a-subledger-balance Retrieves an individual Subledger Balance object using its unique identifier. ```APIDOC ## GET /v0/subledger_balances/{id} ### Description Get an individual Subledger Balance object. ### Method GET ### Endpoint /v0/subledger_balances/{id} ### Parameters #### Path Parameters - **id** (string) - Required - Return Subledger Balance associated with this `id`. - Pattern: `^subledger_balance_\w+$` ### Request Example ```json { "example": "No request body for GET request" } ``` ### Response #### Success Response (200) - **account_id** (string) - The account identifier - **id** (string) - The balance identifier - **client_subledger_balance_name** (string) - The client-facing name for this subledger balance - **client_settlement_bank_account_id** (string) - The settlement bank account identifier if applicable - **currency_code** (string) - A three-letter currency code as defined in ISO 4217. - **created_at** (string) - The ISO-8601 timestamp at which the balance was created - **updated_at** (string) - The ISO-8601 timestamp at which the balance was last updated - **status** (string) - The current status of the balance - **status_reason** (string) - The reason for the current status - **type** (string) - The type of balance - **metadata** (object) - A set of key-value pairs that can be used to store additional information related to this object. - **details** (object) - Details specific to the balance type (e.g., credit details). #### Response Example ```json { "account_id": "account_a1b2c3d4e5f6g7h8", "id": "subledger_balance_b7h9d6gismdk", "client_subledger_balance_name": "Personal Loan - Home Improvement", "client_settlement_bank_account_id": "12345", "currency_code": "USD", "created_at": "2025-09-02T11:01:36Z", "updated_at": "2025-09-02T11:05:00Z", "status": "active", "status_reason": "active", "type": "credit", "metadata": {}, "details": {} } ``` #### Error Response (400, 404) - **code** (string) - The error code. - **title** (string) - The error title. - **detail** (string) - A detailed error description. - **status** (string) - The HTTP status code. - **invalid_parameters** (array) - Invalid request parameters with reasons, if applicable. - **instance** (string) - The object causing this specific occurrence of the error, if applicable. #### Error Response Example ```json { "code": "invalid_parameter", "title": "Invalid Request", "detail": "The provided ID is not a valid Subledger Balance object.", "status": "404", "instance": "subledger_balance_invalid_id" } ``` ``` -------------------------------- ### Documentation Index Source: https://docs.lead.bank/api-reference/endpoint/account-number/update-an-account-number Fetch the complete documentation index. This file contains a list of all available documentation pages. ```APIDOC ## GET https://docs.lead.bank/llms.txt ### Description Fetch the complete documentation index at: https://docs.lead.bank/llms.txt. Use this file to discover all available pages before exploring further. ### Method GET ### Endpoint https://docs.lead.bank/llms.txt ### Parameters None ### Request Example None ### Response #### Success Response (200) - **content** (string) - The content of the documentation index file, listing available documentation pages. #### Response Example ``` /websites/lead_bank_api-reference /websites/lead_bank_api-reference/account_numbers /websites/lead_bank_api-reference/users ``` ``` -------------------------------- ### GET /v0/originators Source: https://docs.lead.bank/api-reference/endpoint/originator/list-all-originators Retrieves a list of originators associated with a specific account. Supports filtering and pagination. ```APIDOC ## GET /v0/originators ### Description Retrieves a list of originators for a given account. You can filter the results by status and paginate through the list using `limit`, `starting_after`, and `ending_before` parameters. ### Method GET ### Endpoint /v0/originators ### Parameters #### Query Parameters - **account_id** (string) - Required - The account ID to retrieve the originators for. Example: `account_xyz123` - **limit** (integer) - Optional - Maximum number of objects to be returned. Defaults to 10. Minimum: 1, Maximum: 100. - **starting_after** (string) - Optional - The ID of the originator to start the list after. Example: `originator_xyz123` - **ending_before** (string) - Optional - The ID of the originator to end the list before. Example: `originator_xyz123` - **status** (string) - Optional - The status of the originator. Example: `active` ### Response #### Success Response (200) - **objects** (array) - An array of Originator objects. - **has_more** (boolean) - Indicates if there are more originators to retrieve. #### Response Example ```json { "objects": [ { "id": "originator_abc789", "account_id": "account_xyz123", "entity_id": "entity_def456", "status": "active", "company_name": "Acme Corp", "company_id": "company_ghi012", "ach": {}, "metadata": {} } ], "has_more": true } ``` #### Error Response (400, 403, 422, 500) - **code** (string) - The error code. - **title** (string) - The error title. - **status** (string) - The HTTP status code. - **detail** (string) - A detailed error description. #### Error Response Example (400) ```json { "code": "parameters_invalid", "title": "Your request parameters did not validate.", "status": "400" } ``` ``` -------------------------------- ### POST /v1/simulate/wires/incoming Source: https://docs.lead.bank/api-reference/endpoint/simulation/simulate-incoming-wire Simulates an incoming wire transfer. This endpoint allows you to test the behavior of incoming wire transactions within the Lead Bank system. ```APIDOC ## POST /v1/simulate/wires/incoming ### Description Simulate an incoming Wire. ### Method POST ### Endpoint https://api.sandbox.lead.bank/v1/simulate/wires/incoming ### Parameters #### Header Parameters - **Idempotency-Key** (string) - Required - Idempotency key #### Request Body - **amount** (object) - Required - The amount of the wire transaction in cents. - **creditor_account_number_id** (string) - Required - The ID of the creditor account number associated with the wire. - **debtor** (object) - Required - Details of the debtor sending funds. - **debtor_agent** (object) - Required - Debtor Agent financial institution details. - **remittance_details** (object) - Optional - Details of the remittance information for the wire. - **payment_identifiers** (object) - Optional - Payment identifiers for the wire. ### Request Example ```json { "amount": 5000, "creditor_account_number_id": "account_number_xyz123", "debtor": { "name": "John Doe", "account_identifier": "1234567890", "address": { "street_line1": "123 Main St", "city": "Anytown", "state": "CA", "postal_code": "90210", "country_code": "US" } }, "debtor_agent": { "financial_institution_name": "Example Bank", "primary_country_code": "US", "bic_or_swift": "EXAMUS33" }, "remittance_details": { "message_to_creditor": "Payment for invoice 12345" }, "payment_identifiers": { "end_to_end_identification": "EndtoEnd12345" } } ``` ### Response #### Success Response (200) - **object** (object) - Incoming Wire object created. #### Response Example ```json { "wire_id": "wire_abc123", "status": "pending" } ``` #### Error Responses - **400** - Your request parameters did not validate. - **422** - We couldn't parse your request body, please check that your request body is valid JSON. ``` -------------------------------- ### Account ID Format Source: https://docs.lead.bank/api-reference/endpoint/ach/create-an-ach Defines the format for an Account ID, which is a string starting with 'account_' followed by alphanumeric characters. ```APIDOC ## AccountID ### Description The ID of the Account object. ### Format String, starting with `account_` followed by alphanumeric characters. ### Example `account_xyz123` ``` -------------------------------- ### POST /v1/wires/{wire_id}/return Source: https://docs.lead.bank/api-reference/endpoint/wire/return-a-wire-v1 Initiate a return against an incoming wire. This endpoint allows you to process returns for wire transfers, specifying a reason code and optional additional information. ```APIDOC ## POST /v1/wires/{wire_id}/return ### Description Initiate a return against an incoming wire. This endpoint allows you to process returns for wire transfers, specifying a reason code and optional additional information. ### Method POST ### Endpoint https://api.lead.bank/v1/wires/{wire_id}/return ### Parameters #### Path Parameters - **wire_id** (string) - Required - ID of the wire object you want to return. #### Header Parameters - **Idempotency-Key** (string) - Required - Idempotency key #### Request Body - **return_code** (string) - Required - The reason code for the wire return. Must be one of the following: AC06, AM09, BE01, FOCR, FR01, MS02, NARR, RR02, RR03. - **return_additional_information** (string) - Optional - Additional details about why the wire is being returned. - **amount** (integer) - Optional - The amount to be returned in cents. If not provided, the original wire amount will be used. - **metadata** (object) - Optional - A set of key-value pairs for additional information. ### Request Example ```json { "return_code": "AC06", "return_additional_information": "Account is blocked.", "amount": 5000, "metadata": { "notes": "Customer requested return" } } ``` ### Response #### Success Response (200) - **id** (string) - Unique identifier of the wire object. - **account_id** (string) - The ID of the account associated with the wire. - **account_number_id** (string) - The ID of the account number associated with the wire. - **created_at** (string) - ISO 8601 format timestamp representing when the wire object was created. - **updated_at** (string) - ISO 8601 format timestamp representing when the wire object was last updated. #### Response Example (200) ```json { "id": "wire_ret_abc123", "account_id": "act_12345", "account_number_id": "accnum_67890", "created_at": "2024-06-27T11:22:33Z", "updated_at": "2024-06-27T11:25:00Z" } ``` #### Error Responses - **400**: Bad Request - Your request parameters did not validate. - **403**: Forbidden - You do not have permission to access wires. - **404**: Not Found - wire_id passed in is not a valid wire object. - **422**: Unprocessable Entity - We couldn't parse your request body. ``` -------------------------------- ### Incoming ACH Controls Source: https://docs.lead.bank/api-reference/endpoint/account-number/assign-an-account-number Configuration for receiving ACH credits and debits. ```APIDOC ## IncomingAch ### Description Incoming ACH payment controls. ### Properties - **accept_credit** (boolean) - Accept ACH credits. - **accept_debit** (boolean) - Accept ACH debits. - **counterparty_filter** (string) - Control mode for counterparty filtering. Defaults to `accept_all`. - **counterparty_company_ids_allowlist** (array) - Allowed Company IDs when mode is `allowlist_only`. Max length is 20. ``` -------------------------------- ### GET /v1/internal_transfer Source: https://docs.lead.bank/api-reference/endpoint/internal-transfer/list-all-internal-transfers-v1 Retrieves a list of all internal transfers. Supports filtering by account numbers, status, creation date, and pagination. ```APIDOC ## GET /v1/internal_transfer ### Description Retrieves a list of all internal transfers. Supports filtering by account numbers, status, creation date, and pagination. ### Method GET ### Endpoint /v1/internal_transfer ### Parameters #### Query Parameters - **sender_account_number_id** (string) - Optional - The sender account number ID. - **receiver_account_number_id** (string) - Optional - The receiver account number ID. - **status** (InternalTransferStatusV1) - Optional - The current status of the InternalTransfer object. - **created_at** (object) - Optional - A set of filters on the list using the object’s field `created_at`. - **after** (string) - Optional - Return objects where the `created_at` timestamp is after the entered timestamp. - **on_or_after** (string) - Optional - Return objects where the `created_at` timestamp is the same as or after the entered timestamp. - **before** (string) - Optional - Return objects where the `created_at` timestamp is before the entered timestamp. - **on_or_before** (string) - Optional - Return objects where the `created_at` timestamp is the same as or before the entered timestamp. - **limit** (integer) - Optional - Maximum number of objects to be returned. Default is 10, minimum 1, maximum 100. - **starting_after** (string) - Optional - A cursor for use in pagination; this is an ID that defines your place in the list. - **ending_before** (string) - Optional - A cursor for use in pagination; this is an ID that defines your place in the list. ### Response #### Success Response (200) - **objects** (array) - List of Internal Transfer objects. - **has_more** (boolean) - Indicates whether more results are available. #### Response Example ```json { "objects": [ { "id": "internal_transfer_xyz123", "amount": 1000, "currency_code": "USD", "sender_account_id": "account_abc", "sender_account_number_id": "account_number_xyz", "receiver_account_id": "account_def", "receiver_account_number_id": "account_number_uvw", "status": "posted", "description": "Monthly rent payment", "metadata": {}, "created_at": "2023-10-27T10:00:00Z", "updated_at": "2023-10-27T10:05:00Z" } ], "has_more": true } ``` #### Error Response (400) - **APIError** (object) - Details about the API error. #### Error Response Example ```json { "error": { "code": "invalid_parameter", "message": "The provided status parameter is invalid." } } ``` ``` -------------------------------- ### GET /v1/event/{event_id} Source: https://docs.lead.bank/api-reference/endpoint/events/retrieve-an-event Retrieves a specific event object using its unique identifier. This endpoint is part of the Events API. ```APIDOC ## GET /v1/event/{event_id} ### Description Retrieves an event object. ### Method GET ### Endpoint /v1/event/{event_id} ### Parameters #### Path Parameters - **event_id** (string) - Required - ID of the Event object you want to retrieve. ### Request Example ```json { "example": "No request body needed for GET request" } ``` ### Response #### Success Response (200) - **id** (string) - ID of the Event object. - **event** (object) - The type of event. - **created_at** (string) - Timestamp at which the Event object was created. - **object** (object) - The object associated with this event. #### Response Example ```json { "id": "evt_abc123", "event": "ach.processing", "created_at": "2023-10-27T10:00:00Z", "object": { "id": "ach_xyz789", "type": "ach" } } ``` ``` -------------------------------- ### POST /v1/simulate/ach/incoming_ach Source: https://docs.lead.bank/api-reference/endpoint/simulation/simulate-incoming-ach Simulates an incoming ACH transaction. This endpoint allows you to test the behavior of incoming ACH credits or debits to your Lead Bank account. ```APIDOC ## POST /v1/simulate/ach/incoming_ach ### Description Simulate an incoming ACH transaction. This endpoint allows you to test the behavior of incoming ACH credits or debits to your Lead Bank account. ### Method POST ### Endpoint https://api.lead.bank/v1/simulate/ach/incoming_ach ### Parameters #### Path Parameters None #### Query Parameters None #### Request Body - **account_number_id** (string) - Required - The ID of the Lead Bank Account Number object. - **sec_code** (string) - Required - The Standard Entry Class (SEC) code for the transaction (e.g., CCD, PPD, TEL, WEB, CIE). - **transaction_type** (string) - Required - The type of ACH transaction (credit or debit). - **amount** (integer) - Required - The amount of the transaction in cents. - **currency_code** (string) - Required - A three-letter currency code (e.g., USD). - **statement_descriptor** (string) - Required - The description to appear on the customer's statement (max 10 characters). - **sender_name** (string) - Required - The name of the sender (max 16 characters). - **sender_company_id** (string) - Required - The company ID of the sender (max 10 characters). - **sender_routing_number** (integer) - Required - The 9-digit routing number of the sender. ### Request Example ```json { "account_number_id": "account_number_xyz123", "sec_code": "WEB", "transaction_type": "credit", "amount": 5000, "currency_code": "USD", "statement_descriptor": "P2P Credit", "sender_name": "Lorum Inc.", "sender_company_id": "1234567890", "sender_routing_number": 111122222 } ``` ### Response #### Success Response (200) - **SimulateResponse** (object) - An object representing the result of the simulation. #### Response Example ```json { "message": "Incoming ACH simulated successfully." } ``` #### Error Response (400) - **APIError** (object) - Contains details about the validation error. #### Error Response (422) - **APIError** (object) - Contains details about the parsing error. ``` -------------------------------- ### GET /v0/entities/{id} Source: https://docs.lead.bank/api-reference/endpoint/entity/retrieve-an-entity-by-entity-id Retrieve an entity by its unique identifier. This endpoint allows fetching entity details based on the provided ID. ```APIDOC ## GET /v0/entities/{id} ### Description Retrieve an entity by entity id. ### Method GET ### Endpoint /v0/entities/{id} #### Path Parameters - **id** (string) - Required - Entity ID of the entity object you want to retrieve. ### Request Example ```json { "example": "request body" } ``` ### Response #### Success Response (200) - **An entity object.** (object) - Description of the entity object. #### Response Example ```json { "example": "response body" } ``` #### Error Responses - **400**: Your request parameters did not validate. - **404**: id passed in doesn't correspond to an entity - **429**: Too many requests. Please slow down your request rate. - **500**: Server error. Please try your request again. - **503**: Service unavailable. Please try your request again. ``` -------------------------------- ### POST /v0/fundings/{id}/advance Source: https://docs.lead.bank/api-reference/endpoint/funding/advance-a-funding Advances a Funding object from processing to posted status in the Sandbox environment. This is a simulation endpoint. ```APIDOC ## POST /v0/fundings/{id}/advance ### Description Advances a Funding object from processing to posted status in the Sandbox environment. ### Method POST ### Endpoint /v0/fundings/{id}/advance ### Parameters #### Path Parameters - **id** (string) - Required - The ID of the funding object to advance. Example: `funding_0o5Fs0EELR0fUjHjbCnEtdUwQe3` ### Request Example (No request body is specified for this endpoint) ### Response #### Success Response (200) - **(empty object)** - Indicates the funding was successfully advanced. #### Error Responses - **400**: The format of the funding ID is invalid or the funding object is not in a processing status. - **403**: Valid access token was not used to call the API or lacks proper permissions. - **404**: The funding_id passed in is not a valid Funding ID or this endpoint is only available in Sandbox. - **429**: Rate limit exceeded. - **500**: Internal server error. #### Response Example (Error) ```json { "code": "INVALID_FUNDING_ID", "title": "Invalid Funding ID", "detail": "The provided funding ID is not valid.", "status": "404", "invalid_parameters": [ { "parameter": "id", "reason": "Funding ID not found" } ], "instance": "funding_invalidId" } ``` ``` -------------------------------- ### POST /v0/fundings Source: https://docs.lead.bank/api-reference/endpoint/funding/create-a-funding Creates a Funding object to request that Lead move funds from a Lead GL to the partner's funding FBO account. ```APIDOC ## POST /v0/fundings ### Description Creates a Funding object to request that Lead move funds from a Lead GL to the partner's funding FBO account. ### Method POST ### Endpoint /v0/fundings ### Parameters #### Path Parameters None #### Query Parameters None #### Request Body - **subledger_balance_id** (string) - Required - Unique ID of the credit subledger balance object that a funding object is being created for. - **currency_code** (CurrencyCode) - Required - The ISO 4217 currency code. - **principal** (object) - Required - The total amount of funding that is part of the loan product's principal. All amounts are in minor units. - **external_disbursement_amount** (integer) - Optional - The portion of the principal amount that will be made available for external disbursement at the time of funding (in minor units). - **withheld_amount** (integer) - Optional - The portion of the principal amount that will be withheld and not disbursed externally at the time of funding (in minor units). - **merchant_origination_fee_amount** (integer) - Optional - The amount of origination fees charged to the merchant that is included in the principal amount (in minor units). - **other_fees** (object) - Optional - Fees relating to the funding request that Lead needs awareness of for bookkeeping purposes only. - **borrower_origination_fee_amount** (integer) - Optional - Non-capitalized origination fee charged to the borrower at the point of funding (in minor units). - **metadata** (object) - Optional - Additional metadata associated with the funding. ### Request Example ```json { "subledger_balance_id": "subledger_balance_1HCpXwx2EK9oYluWbacgeCnFcLf", "currency_code": "USD", "principal": { "external_disbursement_amount": 100000, "withheld_amount": 1000, "merchant_origination_fee_amount": 100 }, "other_fees": { "borrower_origination_fee_amount": 200 }, "metadata": { "client_draw_id": "X67BU" } } ``` ### Response #### Success Response (200) - **id** (string) - Unique identifier for the funding. - **subledger_balance_id** (string) - Unique ID of the credit subledger balance object. - **currency_code** (CurrencyCode) - The ISO 4217 currency code. - **principal** (object) - The total amount of funding that is part of the loan product's principal. - **external_disbursement_amount** (integer) - The portion of the principal amount that will be made available for external disbursement. - **withheld_amount** (integer) - The portion of the principal amount that will be withheld. - **merchant_origination_fee_amount** (integer) - The amount of origination fees charged to the merchant. - **other_fees** (object) - Fees relating to the funding request. - **borrower_origination_fee_amount** (integer) - Non-capitalized origination fee charged to the borrower. - **metadata** (object) - Additional metadata associated with the funding. - **status** (string) - The current status of the funding. - **rejection** (object) - Details about the rejection if the funding was rejected. - **reason** (string) - The reason for rejection. - **details** (string) - More detailed information about the rejection. - **created_at** (string) - The timestamp when the funding was created. - **updated_at** (string) - The timestamp when the funding was last updated. #### Response Example ```json { "id": "funding_0o5Fs0EELR0fUjHjbCnEtdUwQe3", "subledger_balance_id": "subledger_balance_1HCpXwx2EK9oYluWbacgeCnFcLf", "currency_code": "USD", "principal": { "external_disbursement_amount": 100000, "withheld_amount": 1000, "merchant_origination_fee_amount": 100 }, "other_fees": { "borrower_origination_fee_amount": 200 }, "metadata": { "client_draw_id": "X67BU" }, "status": "processing", "rejection": { "reason": "", "details": "" }, "created_at": "2025-09-02T11:01:36Z", "updated_at": "2025-09-02T11:05:00Z" } ``` ``` -------------------------------- ### GET /v1/internal_transfer/{internal_transfer_id} Source: https://docs.lead.bank/api-reference/endpoint/internal-transfer/retrieve-an-internal-transfer-v1 Retrieves the details of a specific internal transfer using its unique identifier. ```APIDOC ## GET /v1/internal_transfer/{internal_transfer_id} ### Description Retrieve an Internal Transfer. This endpoint allows you to fetch all the details associated with a specific internal transfer transaction. ### Method GET ### Endpoint /v1/internal_transfer/{internal_transfer_id} ### Parameters #### Path Parameters - **internal_transfer_id** (string) - Required - The ID of the internal transfer object to be retrieved. Example: `internal_transfer_xyz23`. Must match the pattern `^internal_transfer_\w+$` and have a minimum length of 5. ### Request Example ```json { "example": "No request body for GET request" } ``` ### Response #### Success Response (200) - **id** (string) - The ID of the Internal Transfer object. - **amount** (integer) - The amount of the transaction in cents. - **currency_code** (string) - A three-letter currency code as defined in ISO 4217. - **sender_account_id** (string) - The ID of the Account object. - **sender_account_number_id** (string) - The ID of the Lead Bank Account Number object. - **receiver_account_id** (string) - The ID of the Account object. - **receiver_account_number_id** (string) - The ID of the Lead Bank Account Number object. - **status** (string) - The current status of the InternalTransfer object. - **description** (string) - Memo string for the transfer. - **rejection** (object) - Details about the rejection reason if the transfer was rejected. - **metadata** (object) - Additional metadata associated with the transfer. - **created_at** (string) - The RFC3339 timestamp at which the InternalTransfer object was created. - **updated_at** (string) - The RFC3339 timestamp at which the InternalTransfer object was last updated. #### Response Example ```json { "id": "internal_transfer_xyz123", "amount": 5000, "currency_code": "USD", "sender_account_id": "account_xyz123", "sender_account_number_id": "account_number_xyz123", "receiver_account_id": "account_abc456", "receiver_account_number_id": "account_number_abc456", "status": "completed", "description": "Monthly transfer", "metadata": {}, "created_at": "2022-06-27T11:22:33Z", "updated_at": "2022-06-27T11:22:33Z" } ``` #### Error Response (404) - **code** (string) - The error code. - **title** (string) - The error title. - **detail** (string) - A detailed error description. - **status** (string) - The HTTP status code. - **invalid_parameters** (array) - Invalid request parameters with reasons, if applicable. - **instance** (string) - The object causing this specific occurrence of the error, if applicable. #### Response Example (404) ```json { "code": "NOT_FOUND", "title": "Not Found", "detail": "The internal_transfer_id passed in is not a valid InternalTransfer ID.", "status": "404", "instance": "/v1/internal_transfer/internal_transfer_invalid" } ``` ``` -------------------------------- ### POST /v1/simulate/wires/{wire_id}/incoming_return Source: https://docs.lead.bank/api-reference/endpoint/simulation/simulate-incoming-wire-return Simulates an incoming Wire Return for a specified wire transaction. This endpoint allows for testing return scenarios by providing a return code and optional additional information. ```APIDOC ## POST /v1/simulate/wires/{wire_id}/incoming_return ### Description Simulate an incoming Wire Return. This endpoint allows you to test scenarios where a wire transfer needs to be returned. ### Method POST ### Endpoint /v1/simulate/wires/{wire_id}/incoming_return ### Parameters #### Path Parameters - **wire_id** (string) - Required - ID of the Wire object you want to return. Example: `wire_xyz001` #### Query Parameters None #### Request Body - **amount** (integer) - Optional - The amount to be returned in USD. Amount of the wire should be in currency's minor units. Example: `5000` - **return_code** (string) - Required - The reason code for the wire return. Refer to `WireReturnCode` schema for eligible codes. - **return_additional_information** (string) - Optional - Additional details about why the wire is being returned. Max length 105 characters. ### Request Example ```json { "amount": 5000, "return_code": "AC06", "return_additional_information": "Account is blocked" } ``` ### Response #### Success Response (200) - **SimulateResponse** (object) - Indicates that the wire return object was successfully created. #### Response Example ```json { "message": "Wire return simulated successfully." } ``` #### Error Responses - **400 Bad Request**: Your request parameters did not validate. - **404 Not Found**: The `wire_id` passed in is not a valid wire object. - **422 Unprocessable Entity**: We couldn't parse your request body, please check that your request body is valid JSON. ``` -------------------------------- ### GET /v1/ach/{ach_id} Source: https://docs.lead.bank/api-reference/endpoint/ach/retrieve-an-ach Retrieve an ACH object by its ID. This endpoint allows you to fetch detailed information about a specific ACH transaction. ```APIDOC ## GET /v1/ach/{ach_id} ### Description Retrieve an ACH object by its ID. This endpoint allows you to fetch detailed information about a specific ACH transaction. ### Method GET ### Endpoint /v1/ach/{ach_id} ### Parameters #### Path Parameters - **ach_id** (string) - Required - ID of the ACH object you want to retrieve. Example: `ach_xyz001`, Pattern: `^ach_\w+` ### Request Example ```json { "example": "No request body for GET request" } ``` ### Response #### Success Response (200) - **id** (string) - id of the ACH object - **created_at** (string) - The ISO-8601 timestamp at which the ACH object was created. - **updated_at** (string) - The ISO-8601 timestamp at which the ACH object was last updated. - **status** (AchStatus) - The current status of the ACH transaction. - **amount** (Amount) - The amount of the ACH transaction. - **account_id** (AccountID) - The ID of the associated account. - **account_number_id** (AccountNumberID) - The ID of the associated account number. - **direction** (Direction) - The direction of the ACH transaction (e.g., inbound or outbound). - **delivery_type** (DeliveryType) - The delivery method for the ACH transaction. - **transaction_type** (TransactionType) - The type of ACH transaction. - **sec_code** (SecCode) - The Standard Entry Class code for the ACH transaction. - **currency_code** (CurrencyCode) - The currency code for the transaction amount. - **statement_descriptor** (StatementDescriptor) - The descriptor for the ACH transaction on statements. - **record_details** (object) - Contains detailed information about the ACH record. - **company_name** (string) - The name of the company initiating or sending the ACH. - **company_id** (string) - A 10-digit unique identifier for companies collecting payments via ACH debit. - **company_discretionary_data** (string) - Additional information from the ACH sender on incoming ACHes. - **effective_date** (string) - The date the ACH transaction is expected to settle. - **settlement_date** (string) - Date by which funds must be posted to the counterparty's account. - **individual_id** (IndividualId) - The ID of the individual involved in the transaction. - **receiver_name** (ReceiverName) - The name of the receiver of the ACH. - **descriptive_date** (DescriptiveDate) - A descriptive date related to the transaction. - **additional_information** (AdditionalInformation) - Additional information related to the ACH record. - **trace_number** (string) - The trace number for the ACH transaction. #### Response Example ```json { "id": "ach_xyz001", "created_at": "2022-06-27T11:22:33Z", "updated_at": "2022-06-27T11:22:33Z", "status": "pending", "amount": 10000, "account_id": "acc_abc123", "account_number_id": "an_def456", "direction": "outbound", "delivery_type": "standard", "transaction_type": "debit", "sec_code": "PPD", "currency_code": "USD", "statement_descriptor": "Payment for services", "record_details": { "company_name": "Acme Inc.", "company_id": "1234567890", "company_discretionary_data": "Optional data", "effective_date": "2022-06-28", "settlement_date": "2022-06-28", "individual_id": "ind_ghi789", "receiver_name": "John Doe", "descriptive_date": "2022-06-27", "additional_information": "Further details", "trace_number": "012345678901234" } } ``` #### Error Response (404) - **code** (string) - Error code. - **message** (string) - Error message. #### Error Response Example ```json { "code": "ACH_NOT_FOUND", "message": "ACH object with ID ach_xyz001 not found." } ``` ``` -------------------------------- ### Get Individual Subledger Balance Source: https://docs.lead.bank/api-reference/endpoint/subledger-balance/retrieve-a-subledger-balance Retrieves a specific Subledger Balance object. This endpoint allows you to fetch detailed balance information for an individual subledger. ```APIDOC ## GET /subledger/balance ### Description Get an individual Subledger Balance object. ### Method GET ### Endpoint /subledger/balance ### Parameters #### Query Parameters - **subledger_id** (string) - Required - The unique identifier for the subledger. ### Request Example ```json { "subledger_id": "sub_123abc" } ``` ### Response #### Success Response (200) - **balance** (number) - The current balance of the subledger. - **currency** (string) - The currency of the balance. - **last_updated** (string) - The timestamp when the balance was last updated. #### Response Example ```json { "balance": 1500.75, "currency": "USD", "last_updated": "2023-10-27T10:00:00Z" } ``` ``` -------------------------------- ### POST /ach/return Source: https://docs.lead.bank/api-reference/endpoint/ach/return-an-ach Initiates a return for a specified incoming ACH transaction. This operation is typically used to dispute or reject an ACH payment. ```APIDOC ## POST /ach/return ### Description Issue a return against an incoming ACH. This endpoint allows you to initiate a return for a specified incoming ACH transaction, often used for disputes or rejections. ### Method POST ### Endpoint /ach/return ### Parameters #### Query Parameters - **ach_id** (string) - Required - The unique identifier of the incoming ACH transaction to be returned. - **reason_code** (string) - Required - The code indicating the reason for the ACH return (e.g., "R01" for insufficient funds). - **description** (string) - Optional - A brief explanation for the return. ### Request Body None ### Response #### Success Response (200) - **status** (string) - Indicates the success status of the return request. - **message** (string) - Provides details about the outcome of the return request. #### Response Example ```json { "status": "success", "message": "ACH return initiated successfully for ACH ID: ach_12345" } ``` ```