Skip to main content

Documentation Index

Fetch the complete documentation index at: https://apidocs.bridge.xyz/llms.txt

Use this file to discover all available pages before exploring further.

Bridge supports issuing cards that spend directly from a noncustodial wallet controlled by you or your customer, without requiring a separate Bridge Wallet. At the time of each card authorization, Bridge pulls the exact spend amount onchain from the linked wallet—no pre-funding required. To use a noncustodial wallet, specify crypto_wallet[type]=standard when creating the card via the Stripe API (see Funding strategies). You must also set up an onchain approval so Bridge’s smart contract can pull funds at authorization time. This page covers how to set up that approval for each supported chain. Noncustodial direct debit cards are supported on Tempo, Solana, and other EVM chains. The main contract address for each chain is:
ChainAddress
Tempo0x661AA387dF0A94e81c06f5C00e9706665B7be686
SolanacardWArqhdV5jeRXXjUti7cHAa4mj41Nj3Apc6RPZH2
Base0x65bf8b55EEDef53C094E40003a03390De744DF33
World Chain0x6B0D105999491a48d5793FB6Cb54f5cE079E0da9
Linea0x930fa762919fDE945fD2d2c1dE25084daD2f8bBd

Setting Up A Noncustodial Card

Step 1: Provision a card account

In the request to the endpoint to provision a card account, specify the wallet and currency to use. For the crypto_account type, specify standard to indicate that Bridge should pull from the non-custodial wallet. Note that a wallet can only be tied to one card account. Bridge does not allow issuing multiple cards that spend from the same wallet.
{
    "chain": "tempo",
    "currency": "usdc",
    "crypto_account": {
        "type": "standard",
        "address": "0xC37e5d75F3D212D22e943D8DD93849a17F79dc79"
    }
}
When the card account is created, Bridge will submit an onchain transaction to register the program delegate address associated with the specified crypto_account address. Here is a sample transaction doing so. For safety reasons, we recommend provisioning the card account before setting up the delegate approval, so that Bridge ties this address to the customer before any approvals are submitted onchain.

Step 2: Token Approval

For both SPL (Solana-based) and ERC-20 (EVM-based) tokens, end users will need to approve the cards smart contract to pull funds from their wallet.
This example uses the ethers v6 JavaScript SDK to call the ERC-20 approve function. It approves a cards issuer contract to spend up to $100 from its balance.
The card issuer contract in the example blow is not the same contract as the one listed in the table above. The Bridge team will provide you an EVM cards contract unique to your program which interfaces with the global cards contract.
// Simple ERC-20 approve example (ethers v6)
// npm install ethers
import { ethers } from "ethers";

const provider = new ethers.JsonRpcProvider("RPC_URL");
const signer = new ethers.Wallet("PRIVATE_KEY", provider);

const TOKEN_ADDRESS = "TOKEN_ADDRESS"; // the erc20 address of the stablecoin you are using
const ISSUER_ADDRESS = "ISSUER_ADDRESS"; // developer-specific contract address provided by Bridge

const ERC20_ABI = [
  "function approve(address spender, uint256 amount) returns (bool)",
];

async function approve() {
  const token = new ethers.Contract(TOKEN_ADDRESS, ERC20_ABI, signer);

  // Approve $100 tokens (assumes 6 decimal currency such as USDC)
  const amount = ethers.parseUnits("100", 6);

  const tx = await token.approve(ISSUER_ADDRESS, amount);
  console.log("txid:", tx.hash);
  await tx.wait();
}

approve();
The result will be a transaction that resembles this transaction.

Step 3: Consume webhook events for card transactions

The card is now ready to use. When the card is used for a purchase at a merchant, you will receive webhook events informing you about it. This webhook event will contain information about both the card network authorization and the onchain transaction. Transactions will be submitted onchain at the time of card authorization, but complete asynchronously. This will cause two webhook events to be published. When the card authorization initially occurs, you will receive a webhook like the following, without the crypto transaction details:
{
  "api_version": "v0",
  "event_id": "wh_tuvB3rbeBKREPEgZ2jmnB4k",
  "event_developer_id": "d76d99b4-f4e8-4799-9907-10c965e0e9fc",
  "event_sequence": 13426,
  "event_category": "card_transaction",
  "event_type": "card_transaction.created",
  "event_object_id": "86d30f38-5ea0-402d-ad48-48003d3b3f29",
  "event_object_status": "approved",
  "event_object": {
    "id": "86d30f38-5ea0-402d-ad48-48003d3b3f29",
    "amount": "-10.0",
    "status": "approved",
    "category": "purchase",
    "currency": "usd",
    "created_at": "2025-12-11T17:47:32.152Z",
    "updated_at": "2025-12-11T17:47:45.153Z",
    "customer_id": "2c21ddbb-cf34-4170-b9b2-076a3ed55de9",
    "authorized_at": "2025-12-11T17:47:32.167Z",
    "merchant_name": "BRIDGE CAFE, SAN FRANCISCO, CA",
    "status_reason": "approved",
    "billing_amount": "-10.0",
    "card_account_id": "3d698985-fbd4-4889-999a-4fa7bd578452",
    "original_amount": "-10.0",
    "merchant_location": "+18886772541, CAUS",
    "authorization_infos": [
      {
        "amount": "-10.0",
        "wallet": "other",
        "account": {
          "last_4": "2960"
        },
        "network": "visa",
        "currency": "usd",
        "merchant": {
          "state": "CA",
          "country": "USA",
          "description": "BRIDGE CAFE, SAN FRANCISCO, CA",
          "postal_code": "94306",
          "category_code": "6012"
        },
        "auth_type": "auth",
        "recurring": false,
        "created_at": "2025-12-11T17:47:31.000Z",
        "fee_amount": "0.00",
        "customer_id": "2c21ddbb-cf34-4170-b9b2-076a3ed55de9",
        "card_present": false,
        "entry_method": "card_not_present",
        "international": false,
        "status_reason": "approved",
        "billing_amount": "-10.0",
        "transaction_id": "86d30f38-5ea0-402d-ad48-48003d3b3f29",
        "approval_status": "approved",
        "card_account_id": "3d698985-fbd4-4889-999a-4fa7bd578452",
        "cashback_amount": "0.00",
        "authorization_id": "3aa53334-29c5-4db2-b5fc-bf0a330a7c4c",
        "partial_supported": false,
        "verification_data": {
          "cvv_check": "not_provided",
          "pin_check": "no_pin_passed",
          "address_check": "mismatch",
          "three_d_secure_check": "authenticated",
          "address_postal_code_check": "mismatch"
        },
        "local_transaction_details": {
          "amount": "-10.0",
          "currency": "usd",
          "exchange_rate": "1.0"
        }
      }
    ],
    "merchant_category_code": "6012",
    "transaction_description": "BRIDGE CAFE, SAN FRANCISCO, CA"
  },
  "event_object_changes": {},
  "event_created_at": "2025-12-11T17:47:45.900Z"
}
Subsequently (on the order of seconds) when the crypto transaction is confirmed onchain, another webhook event will be published with the details:
{
  "api_version": "v0",
  "event_id": "wh_tdcF5jcwFPT1cg5mvmeKMG1",
  "event_developer_id": "d76d99b4-f4e8-4799-9907-10c965e0e9fc",
  "event_sequence": 13428,
  "event_category": "card_transaction",
  "event_type": "card_transaction.updated",
  "event_object_id": "86d30f38-5ea0-402d-ad48-48003d3b3f29",
  "event_object_status": "approved",
  "event_object": {
    "id": "86d30f38-5ea0-402d-ad48-48003d3b3f29",
    "amount": "-10.0",
    "status": "approved",
    "category": "purchase",
    "currency": "usd",
    "created_at": "2025-12-11T17:47:32.152Z",
    "updated_at": "2025-12-11T17:47:51.785Z",
    "customer_id": "2c21ddbb-cf34-4170-b9b2-076a3ed55de9",
    "authorized_at": "2025-12-11T17:47:32.167Z",
    "merchant_name": "BRIDGE CAFE, SAN FRANCISCO, CA",
    "status_reason": "approved",
    "billing_amount": "-10.0",
    "card_account_id": "3d698985-fbd4-4889-999a-4fa7bd578452",
    "original_amount": "-10.0",
    "merchant_location": "+18886772541, CAUS",
    "authorization_infos": [
      {
        "amount": "-10.0",
        "wallet": "other",
        "account": {
          "last_4": "2960"
        },
        "network": "visa",
        "currency": "usd",
        "merchant": {
          "state": "CA",
          "country": "USA",
          "description": "BRIDGE CAFE, SAN FRANCISCO, CA",
          "postal_code": "94306",
          "category_code": "6012"
        },
        "auth_type": "auth",
        "recurring": false,
        "created_at": "2025-12-11T17:47:31.000Z",
        "fee_amount": "0.00",
        "customer_id": "2c21ddbb-cf34-4170-b9b2-076a3ed55de9",
        "card_present": false,
        "entry_method": "card_not_present",
        "international": false,
        "status_reason": "approved",
        "billing_amount": "-10.0",
        "crypto_details": {
          "chain": "solana",
          "amount": "10.0",
          "tx_hash": "618p4RWZ4UPe6uCeFo0BaRb2H4gSQJjLayDihFD7fERAnfyoxyMJQZc4WmKkPkLu7QHnXgpWp6pPUMqc2HzGqH3",
          "currency": "usdc",
          "tx_reference": "d0b935bf-300e-431b-82bd-311ef7115f86"
        },
        "transaction_id": "86d30f38-5ea0-402d-ad48-48003d3b3f29",
        "approval_status": "approved",
        "card_account_id": "3d698985-fbd4-4889-999a-4fa7bd578452",
        "cashback_amount": "0.00",
        "authorization_id": "c9537b55-094f-4bd5-b8f5-4a27c37ce83d",
        "partial_supported": false,
        "verification_data": {
          "cvv_check": "not_provided",
          "pin_check": "no_pin_passed",
          "address_check": "mismatch",
          "three_d_secure_check": "authenticated",
          "address_postal_code_check": "mismatch"
        },
        "local_transaction_details": {
          "amount": "-10.0",
          "currency": "usd",
          "exchange_rate": "1.0"
        }
      }
    ],
    "merchant_category_code": "6012",
    "transaction_description": "BRIDGE CAFE, SAN FRANCISCO, CA"
  },
  "event_object_changes": {
    ...
  },
  "event_created_at": "2025-12-11T17:47:52.380Z"
}
You can see more card transaction scenarios in the Card Transaction Webhooks section of the documentation. Incremental authorizations will cause additional transactions to be submitted onchain to cover the additional charge.