TheDocumentation Index
Fetch the complete documentation index at: https://docs.tesouro.com/llms.txt
Use this file to discover all available pages before exploring further.
initiateAccountToAccountBankTransfer mutation enables transfers between bank accounts within the embedded banking platform. This supports moving funds between internal accounts or to/from external bank accounts.
When to use: - Transfer funds between a user’s internal accounts - Move money from an internal
account to an external bank account (ACH transfer) - Transfer funds from an external account to an
internal account
Scenario: Sarah wants to transfer $500 from her business checking account to her business
savings account. She initiates the transfer through your embedded banking interface, and the funds
are moved between her accounts.
Transfer types
| Type | Description |
|---|---|
INTERNAL_TO_INTERNAL | Transfer between two internal accounts owned by the same organization |
INTERNAL_TO_EXTERNAL | Transfer from an internal account to an external bank account (ACH push) |
EXTERNAL_TO_INTERNAL | Transfer from an external bank account to an internal account (ACH pull) |
Required fields
| Field | Description |
|---|---|
fromAccountId | The UUID of the source bank account |
toAccountId | The UUID of the destination bank account |
amount | The amount to transfer (positive decimal value) |
type | The transfer type (see above) |
Idempotency key
TheidempotencyKey is an optional field that prevents duplicate transfers when the same request is submitted multiple times. This is useful for handling network failures, retries, or ensuring exactly-once processing in distributed systems.
Best practice: Always use an idempotency key for production transfers to prevent accidental
duplicate transactions.
How it works
- First request: When you submit a transfer with an idempotency key, the system processes the transfer and associates the result with that key.
-
Subsequent requests: If you submit another transfer request with the same idempotency key:
- If the parameters match the original request, the system returns the original transfer result without creating a duplicate
- If the parameters differ, the system returns a
TRANSFER_IDEMPOTENCY_KEY_CONFLICTerror
Idempotency key requirements
- Must be a unique string (We recommend using a UUID)
- Should be generated client-side before the request
- Can be up to 255 characters
Error handling
| Error code | Description |
|---|---|
TRANSFER_IDEMPOTENCY_KEY_CONFLICT | A transfer with this idempotency key already exists but with different parameters |
Important: An idempotency conflict means the key was already used with different transfer
parameters. Generate a new idempotency key if you need to create a different transfer.
Example usage
Variables