Documentation Index
Fetch the complete documentation index at: https://docs.bringin.app/llms.txt
Use this file to discover all available pages before exploring further.
What is a Connection?
A connection (BringinLink) is a permanent standing order that links a crypto address to a bank account. Once active, conversions happen automatically — any amount, any time, no further API calls needed. Think of it as a bridge: one side is crypto, the other is fiat. Funds sent to either side are automatically converted and delivered to the other.Supported Connection Types
| Type | Direction | Subtypes | What happens |
|---|---|---|---|
FIAT_TO_CRYPTO | EUR to crypto | ONCHAIN | User sends EUR via SEPA, receives crypto at their address |
CRYPTO_TO_FIAT | Crypto to EUR | ONCHAIN, LN | User sends crypto, receives EUR via SEPA to their bank |
Supported Currencies & Networks
- Buy (EUR to Crypto)
- Sell (Crypto to EUR)
| Currency | Networks | Default |
|---|---|---|
BTC | BTC | BTC |
ETH | ETH | ETH |
USDC | USDC (Ethereum), POLYGON | Must specify |
USDT | USDT (Polygon), ETH (Ethereum) | Must specify |
POL | POL, POLYGON | POLYGON |
Buy Connection (EUR to Crypto)
You provide a crypto address
Your app passes the user’s destination address when creating the connection.
Your app stores and displays the deposit IBAN. The user sends EUR whenever they want to buy crypto — it’s as simple as a bank transfer.
Sell Connection (Crypto to EUR)
On-chain
You provide an IBAN + bank details
Your app passes the user’s bank account details when creating the connection.
Bringin returns a crypto deposit address
Once the connection is active, you receive a unique deposit address.
Lightning Network
For BTC sell connections, you can use Lightning for instant, low-fee transactions:You provide an IBAN + Lightning address username
Your app passes the bank details and a unique Lightning username (e.g.,
alice_wise).Bringin creates a Lightning address
The username becomes
{username}@bringin.xyz — a permanent receive address.How to Create a Connection
Option 1: Single API call (recommended)
Bundle everything intoPOST /application/connect. Bringin handles onboarding, connection creation, and SMS confirmation. You receive webhooks when it’s done.
- Buy (EUR to BTC)
- Sell (BTC to EUR)
- Sell via Lightning
Request
/verification-statuswebhook with the per-user api-key/connection-statuswebhook with the deposit IBAN (or deposit address / LN address)
Option 2: Direct BringinLink API (advanced)
Use this if you already have the user’s per-user api-key and want granular control over the connection lifecycle.List existing connections
Always call Check the response:
GET /bringin-link first before creating a new connection. This prevents duplicate errors and lets you reuse pending connections.- ACTIVE link for same destination — Use it directly, no creation needed
- PENDING link — Show OTP screen with the existing
challengeId - INITIATING link — Poll for status update
- No match — Safe to create a new connection
Create the connection
- Buy (EUR to BTC)
- Sell (BTC to EUR)
- Sell via Lightning
Request
status: "INITIATING". Creation is asynchronous — you must poll for updates.Poll for status
Poll
GET /bringin-link/{id} every 2-3 seconds until the status changes from INITIATING.| Status | Action |
|---|---|
INITIATING | Keep polling (processing takes 5-15 seconds) |
PENDING | Show OTP screen — use challengeId from the response |
ACTIVE | Connection is ready (standing order was reused, no OTP needed) |
FAILED | Show a user-friendly error (see handling failures) |
Confirm with SMS OTP
When the status is On success, the connection becomes
PENDING, the user receives an SMS OTP. Confirm it:Request
ACTIVE and auto-conversions begin.If the user needs a new code, call POST /bringin-link/resend-otp with the existing challengeId.The OTP expires 30 minutes after creation. The resend endpoint does NOT reset this timer. If expired, create a new connection.
Status Lifecycle
| Status | Terminal? | Description |
|---|---|---|
INITIATING | No | Record created, async processing in progress |
PENDING | No | Standing order created, awaiting SMS OTP confirmation |
ACTIVE | No | OTP confirmed, auto-conversions enabled |
FAILED | Yes | Creation failed (support can resume) |
EXPIRED | Yes | OTP not confirmed within 30 minutes |
INACTIVE | Yes | Cancelled by user |
Best Practices
Always check for existing connections first
Always check for existing connections first
Before calling
POST /bringin-link, always call GET /bringin-link to list the user’s existing connections. This prevents:409 DUPLICATE_BRINGIN_LINK— A link already exists for this destination409 DUPLICATE_DESTINATION_ADDRESS— Address already has an active connection409 DUPLICATE_IBAN— IBAN already has an active connection- Unnecessary resource creation on each failed attempt
Reuse PENDING connections instead of creating duplicates
Reuse PENDING connections instead of creating duplicates
If a connection exists in
PENDING status:- Check if
standingOrder.challengeExpiresAtis still in the future - If valid — show the OTP screen with the existing
challengeId - If the user needs a new code — call
POST /bringin-link/resend-otp - If expired — wait for auto-expiry, then create a new connection
Connection names must be unique
Connection names must be unique
The
name field must be unique across all non-terminal connections (INITIATING, PENDING, ACTIVE) for the user. Names from FAILED, EXPIRED, and INACTIVE connections are freed up for reuse.Handle Lightning address usernames carefully
Handle Lightning address usernames carefully
Lightning address usernames (
lnAddress field):- 3-30 characters, lowercase alphanumeric plus
_and- - Must start and end with an alphanumeric character
- No consecutive
_or- - Globally unique — if taken, the API returns
409 LN_ADDRESS_EXISTS - The resulting address is
{username}@bringin.xyz
Handling Failures
When a connection creation fails (status: FAILED):
Failed connections are resumable by the Bringin support team. Your app does not need to handle resume logic — direct users to support.
Provide a “Try Again” button that starts a fresh creation flow (list existing connections first, then create).
Cancelling a Connection
To cancel an active connection, use the standing order cancellation flow:Initiate cancellation
Response
Response
Error Reference
| HTTP | Error Code | When | What to do |
|---|---|---|---|
| 400 | INVALID_BTC_ADDRESS | BTC address fails format check | Show “Please enter a valid Bitcoin address” |
| 400 | INVALID_CURRENCY_NETWORK_COMBINATION | Unsupported currency + network pair | Show valid networks for the currency |
| 400 | RECENTLY_FAILED_IBAN | Same IBAN failed within last 10 minutes | Show “Please wait before retrying this IBAN” |
| 409 | DUPLICATE_NAME | Name already used by active/pending connection | Prompt for a different name |
| 409 | DUPLICATE_IBAN | Active connection already exists for this IBAN | Use the existing connection |
| 409 | DUPLICATE_BRINGIN_LINK | Connection already exists for this destination | Use the existing connection |
| 409 | DUPLICATE_DESTINATION_ADDRESS | Active connection for this address + currency | Use the existing connection |
| 409 | LN_ADDRESS_EXISTS | Lightning address taken | Choose a different username |
| 409 | CONCURRENT_REQUEST | Another creation in progress | Wait 2-3 seconds and retry |
| 429 | TOO_MANY_PENDING_BRINGIN_LINKS | 10+ pending connections | Confirm or wait for existing to expire |