> ## 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.

# Static memos

<Warning>
  **Static memos are deprecated. Use static templates instead!** Static memos are depcreated, but will continue to be supported. We recommend using static templates instead of static memos since they offer the same functionality as static memos and more across more rails.
</Warning>

Static Memos are long-lived deposit instructions that accept fiat funds through wire and ACH push and send funds to the configured destination wallet. The same Static Memo can receive both wires and ACH pushes interchangeably.

**Don't forget the**`deposit_message !`

For Static Memos, it is very important that the customer includes the `deposit_message` when they send funds. Failure to include the `deposit_message` will result in a significant delay in processing or a return of the funds.

***

## Create a Static Memo

```bash Request expandable theme={null}
curl --location --request POST 'https://api.bridge.xyz/v0/customers/cust_alice/static_memos' \
--header 'Content-Type: application/json' \
--header 'Api-Key: <Api-Key>' \
--header 'Idempotency-Key: <Unique Idempotency Key>' \
--data-raw '{
  "source": {
    "currency": "usd",
    "payment_rail": "wire",
  },
  "destination": {
    "payment_rail": "ethereum",
    "currency": "usdc",
    "address": "0xDEADBEEF"
  },
 "developer_fee_percent": "1.0" // 1%. This is optional and defaults to 0 if not set
}'
```

The response will contain deposit instructions for your customer to send funds to Bridge.

```json Response expandable theme={null}
{
  "id": "static_memo_alice_123",
  "status": "activated",
  "developer_fee_percent": "1.0",
  "customer_id": "cust_alice",
  "source_deposit_instructions": {
    "bank_name": "Lead Bank",
    "bank_address": "1801 Main St., Kansas City, MO 64108",
    "bank_beneficiary_name": "Bridge Ventures Inc",
    "bank_account_number": "123456789",
    "bank_routing_number": "87654321",
    "currency": "usd",
    "deposit_message": "EXAMPLE_MEMO_MESSAGE",
  },
  "destination": {
    "payment_rail": "ethereum",
    "currency": "usdc",
    "address": "0xdeadbeef"
  }
}
```

### **Optional Blockchain memo**

For memo-based blockchains such as Stellar, you may include an optional `blockchain_memo` in the destination field. Bridge will forward the memo when sending crypto funds.

```bash Request theme={null}
curl --location --request POST 'https://api.bridge.xyz/v0/customers/cust_alice/static_memos' \
--header 'Content-Type: application/json' \
--header 'Api-Key: <Api-Key>' \
--header 'Idempotency-Key: <Unique Idempotency Key>' \
--data-raw '{
  "source": {
    "currency": "usd",
    "payment_rail": "wire"
  },
  "destination": {
    "payment_rail": "stellar",
    "currency": "usdc",
    "address": "STELLARADDRESS",
    "blockchain_memo": "STELLARBLOCKCHAINMEMO"
  }
}'
```

## **Listing Static Memos for a Customer**

Example request to retrieve the Static Memos that exist for a customer:

```bash Request theme={null}
curl --request GET \
     --url 'https://api.bridge.xyz/v0/customers/cust_123/static_memos' \
     --header 'Api-Key: <Api-Key>' \
     --header 'accept: application/json'	
```

```json Response expandable theme={null}
{
  "count": 2,
  "data": [
    {
      "id": "static_memo_123",
      "status": "activated",
      "developer_fee_percent": "0.10",
      "customer_id": "cust_alice",
      "source_deposit_instructions": {
        "bank_name": "Lead Bank",
        "bank_address": "1801 Main St., Kansas City, MO 64108",
        "bank_beneficiary_name": "Bridge Ventures Inc",
        "bank_account_number": "123456789",
        "bank_routing_number": "87654321",
        "currency": "usd",
        "deposit_message": "EXAMPLE_MEMO_MESSAGE",
      },
      "destination": {
        "payment_rail": "ethereum",
        "currency": "usdc",
        "address": "0xdeadbeef"
      }
    },
   {
      "id": "static_memo_alice_456",
      "status": "activated",
      "developer_fee_percent": "0.0",
      "customer_id": "cust_alice",
      "source_deposit_instructions": {
        "bank_name": "Lead Bank",
        "bank_address": "1801 Main St., Kansas City, MO 64108",
        "bank_beneficiary_name": "Bridge Ventures Inc",
        "bank_account_number": "123456789",
        "bank_routing_number": "87654321",
        "currency": "usd",
        "deposit_message": "EXAMPLE_MEMO_MESSAGE",
      },
      "destination": {
        "payment_rail": "stellar",
        "currency": "usdc",
        "address": "STELLARADDRESS",
        "blockchain_memo": "STELLARBLOCKCHAINMEMO"
      }
    } 
  ]
}
```

## **Update a Static Memo**

Update the destination details for an existing Static Memo. Future transactions will use the updated destination details. All fields in this request are optional. Updating a Static Memo will also create an `account_update` event in the history for that account.

```bash Request theme={null}
curl --location --request PUT 'https://api.bridge.xyz/v0/customers/cust_alice/static_memos/sm_123' \
  --header 'Content-Type: application/json' \
  --header 'Api-Key: <Api-Key>' \
  --data-raw '{
	  "destination": {
	    "payment_rail": "ethereum",
	    "currency": "usdt",
	    "address": "0xDEADBEEF"
	  },
    "developer_fee_percent": "2.5", // 2.5%, omitting will not change the existing dev fee percent
  }'
```

## **History of Static Memo Activity**

This endpoint provide a history of activity for Static Memos such incoming fiat funds received and outgoing payments on chain. See [<u>List History of Static Memo activity</u>](/api-reference/static-memos/static-memo-activity) for more information about the types of events returned from these endpoints.

### **Listing history of Activity for a Static Memo**

```bash Request theme={null}
curl --request GET \
     --url 'https://api.bridge.xyz/v0/customers/cust_123/static_memos/static_memo_alice_123/history' \
     --header 'Api-Key: <Api-Key>' \
     --header 'accept: application/json'
```

The response will contain transactions sent to the static memo and the lifecycle of those payments up until they are delivered.

```json Response expandable theme={null}
[{
  "id": "event_4",
  "customer_id": "cust_alice",
  "static_memo_id": "static_memo_alice_456",
  "type": "payment_submitted",
  "amount": "98.63",
  "currency": "usdc",
  "developer_fee_amount": "0.13",
  "exchange_fee_amount": "0.0",
  "created_at": "2023-11-05T19:39:14.316Z",
  "subtotal_amount": "98.63",
  "gas_fee": "0.0",
  "deposit_id": "deposit_123",
  "source": {
    "payment_rail": "wire",
    "bank_routing_number": "987654321",
    "bank_beneficiary_name": "JOHN SMITH",
    "imad": "20240110RUDJYGYG009092",
    "omad": "20240110RUDJYGYG03151101101621",
  },
  "destination_tx_hash": "0xc99e2d1eaab82f2b293d26bbe58f3e3cc6df0a1276cdad89233767ef619b1e37"
},
{
  "id": "event_3",
  "customer_id": "cust_alice",
  "static_memo_id": "static_memo_alice_456",
  "type": "funds_received",
  "amount": "98.76",
  "currency": "usd",
  "developer_fee_amount": "0.0",
  "exchange_fee_amount": "0.0",
  "created_at": "2023-11-05T19:29:12.621Z",
  "subtotal_amount": "98.76",
  "gas_fee": "0.0",
  "deposit_id": "deposit_123",
  "source": {
    "payment_rail": "wire",
    "bank_routing_number": "987654321",
    "bank_beneficiary_name": "JOHN SMITH",
    "imad": "20240110RUDJYGYG009092",
    "omad": "20240110RUDJYGYG03151101101621",
  }
}]
```

### **Listing history of Activity for all Static Memos**

Event history is also available for all Static Memos across all customers.

```bash theme={null}
curl --request GET \
     --url 'https://api.bridge.xyz/v0/customers/cust_123/static_memos/static_memo_alice_123/history' \
     --header 'Api-Key: <Api-Key>' \
     --header 'accept: application/json'
```

## **Static Memo Events**

### **Event types**

| **Event**           | **Description**                                                                                  |
| :------------------ | :----------------------------------------------------------------------------------------------- |
| `funds_received`    | Bridge has received funds and is preparing to move them on the customer’s behalf.                |
| `payment_submitted` | Bridge has sent the payment and is awaiting confirmation (usually takes a few minutes on-chain). |
| `payment_processed` | Funds have arrived at the destination. Final state.                                              |
| `in_review`         | Temporary review state. Bridge may reach out for additional info.                                |
| `refund`            | Bridge couldn't complete the transfer and is returning funds to the sender.                      |
| `account_update`    | Triggered when a Virtual Account's destination details (e.g. address, currency) are updated.     |

Please note that a transaction will always progress from `funds_received` → `payment_submitted` → `payment_processed`. It can never go backwards.

All transaction-triggered events include a `deposit_id` field. This id is unique for each transaction that Bridge receives through this Static Memo and can be used to link separate events to the same source transaction.

<Warning>
  Static memos do not support microdeposit or challenge deposit verifications.
</Warning>

### **Event breakdown**

<AccordionGroup>
  <Accordion title="Funds received">
    Information about a fiat deposit received. The `funds_received` event amount always matches the full amount that the customer sent before any fees are deducted. We also provide any source information we have about the sender of a deposit. The information available differs by source payment rail:

    * **ACH:** description, payment rail
    * **Wire:** beneficiary name, routing number, bank name, IMAD, OMAD (deprecated), payment rail

    ```json expandable theme={null}
    {
      "id": "sm_event_457",
      "customer_id": "cust_alice",
      "static_memo_id": "sm_123",
      "type": "funds_received",
      "amount": "120.0",
      "currency": "usd",
      "developer_fee_amount": "1.25",
      "exchange_fee_amount": "2.2",
      "subtotal_amount": "120.0",
      "gas_fee": "0.0",
      "deposit_id": "deposit_123",
      "created_at": "2020-01-01T00:00:00.000Z",
      "source_deposit_instructions": {
        "deposit_message": "EXAMPLE_MEMO_MESSAGE",    
      },
      "source": {
        "payment_rail": "wire",
        "bank_routing_number": "987654321",
        "bank_beneficiary_name": "JANE DOE",
        "imad": "20240110FIUGEYG009092",
        "omad": "20240110FIUGEYGYG03151101101621",
      }
    }
    ```
  </Accordion>

  <Accordion title="Payment submitted">
    Information about any funds sent on chain using the deposit instructions. This event is created when the funds are sent on chain. The `payment_submitted` event amount is the funds sent to the destination after all fees are taken out and includes a breakdown of the amount of each customer-facing fee. Some information such as `destination_tx_hash` may not be available immediately after the `payment_submitted` event is created but will be populated later when the transaction is confirmed on chain.

    For convenience, the source deposit information is included in this event as well if available.

    ```json expandable theme={null}
    {
      "id": "sm_event_456",
      "customer_id": "cust_alice",
      "static_memo_id": "sm_123",
      "type": "payment_submitted",
      "amount": "120.0",
      "currency": "usd",
      "developer_fee_amount": "1.25",
      "exchange_fee_amount": "2.2",
      "subtotal_amount": "120.0",
      "gas_fee": "0.0",
      "deposit_id": "deposit_123",
      "created_at": "2020-01-01T00:00:00.000Z",
      "destination_tx_hash": "0xdeadbeef",
      "source_deposit_instructions": {
        "deposit_message": "EXAMPLE_MEMO_MESSAGE",    
      },
      "source": {
        "payment_rail": "wire",
        "bank_routing_number": "987654321",
        "bank_beneficiary_name": "JANE DOE",
        "imad": "20240110FIUGEYG009092",
        "omad": "20240110FIUGEYGYG03151101101621",
      }
    }
    ```
  </Accordion>

  <Accordion title="Payment processed">
    Information about any funds sent on chain using the deposit instructions. This event is created when the funds are confirmed on chain. The `payment_processed` event amount is the funds sent to the destination after all fees are taken out and includes a breakdown of the amount of each fee. The`destination_tx_hash`will always be populated for these events. This is final event in the onramp payment lifecycle and the best event to determine when a payment is fully complete.

    For convenience, the source deposit information is included in this event as well if available.

    ```json expandable theme={null}
    {
      "id": "sm_event_456",
      "customer_id": "cust_alice",
      "static_memo_id": "sm_123",
      "type": "payment_processed",
      "amount": "120.0",
      "currency": "usd",
      "developer_fee_amount": "1.25",
      "exchange_fee_amount": "2.2",
      "subtotal_amount": "120.0",
      "gas_fee": "0.0",
      "deposit_id": "deposit_123",
      "created_at": "2020-01-01T00:00:00.000Z",
      "destination_tx_hash": "0xdeadbeef",
      "source_deposit_instructions": {
        "deposit_message": "EXAMPLE_MEMO_MESSAGE",    
      },
      "source": {
        "payment_rail": "wire",
        "bank_routing_number": "987654321",
        "bank_beneficiary_name": "JANE DOE",
        "imad": "20240110FIUGEYG009092",
        "omad": "20240110FIUGEYGYG03151101101621",
      }
    }
    ```
  </Accordion>

  <Accordion title="In review">
    This event happens when a transaction enters the manual review queue. Bridge may reach out to obtain more information about the transaction before processing.

    ```json expandable theme={null}
    {
      "id": "sm_event_363",
      "customer_id": "cust_alice",
      "static_memo_id": "sm_123",
      "type": "in_review",
      "amount": "120.0",
      "currency": "usd",
      "developer_fee_amount": "1.25",
      "exchange_fee_amount": "2.2",
      "subtotal_amount": "120.0",
      "gas_fee": "0.0",
      "created_at": "2020-01-01T00:00:00.000Z",
      "deposit_id": "deposit_123",
      "source": {
        "payment_rail": "ach_push",
        "description": "ACH description",
        "sender_name": "The name of the business or individual who sent the ACH",
        "sender_bank_routing_number": "The routing number of the entity who sent this ACH transaction"
      }
    }
    ```
  </Accordion>

  <Accordion title="Account update">
    If a Static Memo is modified using the [<u>Update a Static Memo</u>](https://apidocs.bridge.xyz/reference/put_customers-customerid-static-memos-staticmemoid) endpoint, its history will include an `account_update` event to track what changed. The `account_updates` field in this event will contain a map of fields with their previous and updated values.

    ```json expandable theme={null}
    {
      "id": "sm_event_456",
      "customer_id": "cust_alice",
      "static_memo_id": "sm_123",
      "type": "account_update",
      "amount": "0.0",
      "currency": "usd",
      "created_at": "2020-01-01T00:00:00.000Z",
      "account_updates": {
        "destination_currency": ["usdc", "usdt"],
      }
    ```
  </Accordion>
</AccordionGroup>
