# Give every customer a fixed deposit address: the Assign Deposit Address API

> If you want the same customer to deposit repeatedly to the same address, assign them a fixed one. Once assigned, the address is permanent for that customer.

- Canonical URL: https://payramhost.com/en/docs/deposit-address-api/
- Other languages: 中文: https://payramhost.com/docs/deposit-address-api/
- Published: 2026-11-09 · Last updated: 2026-11-29
- Site: PayRamHost (independently operated; not affiliated with PayRam)

> PayRamHost hosted merchant onboarding has been paused since 29 November 2026. Where this guide mentions PayRamHost, it describes the situation before the pause; the PayRam usage it explains still applies.

> **The short version:** normally every payment gets its own payment page and receiving address. If you want **the same customer to deposit repeatedly to the same address** (prepaid balances, member top-ups, repeat purchases), call the assign-deposit-address endpoint, `POST /api/v1/deposit-address/reference/{reference_id}`, to assign that customer a fixed address in a blockchain family. **Once assigned, the address is permanent for that customer** and later payments reuse it. Ethereum, Base and Polygon belong to one family (`ETH_Family`).

## 1. When you need a fixed deposit address

The official documentation calls this capability Customer Deposit Wallets: give each customer their own deposit address so they can top up, settle balances or pay repeatedly without you issuing a new address or link each time. The benefits it lists:

- **Frictionless deposits:** customers can deposit at any time without waiting for a new address.
- **Reuse:** the same address works repeatedly, often called a “permanent deposit address”.
- **Simple accounting:** funds map directly to a customer, which makes ledgers and attribution easier.
- **Better experience:** returning customers do not request a new address every time.

Typical cases: account balance top-ups, wallet top-ups for a game or platform, and repeat payments from regular customers. If every order is an independent one-off purchase, an ordinary [create payment](https://payramhost.com/en/docs/create-payment-api/) call is enough and you do not need a fixed address.

The official feature description also says the system monitors the chain, attributes incoming deposits to the right customer and credits them only after the required number of confirmations (configurable). That description is fairly general, so go by what your dashboard actually shows.

## 2. The whole flow

1. **Create a payment and get the `reference_id`.** Use the [create-payment endpoint](https://payramhost.com/en/docs/create-payment-api/) to create a payment for this customer (a `customerID` is required); the response contains a `reference_id`.
2. **(Optional) Check whether the customer already has an address.** Call `GET /api/v1/blockchain-currency/reference/{reference_id}` and look at `customerAddress` in each payment option. For a first-time customer it is empty, meaning no address has been assigned yet. The endpoint is described in [the ticker and currency API](https://payramhost.com/en/docs/ticker-and-currency-api/).
3. **Assign an address.** When `customerAddress` is empty for a family, call the endpoint in this guide to give the customer a fixed address in that family.
4. **Show it to the customer.** Display the address, the network and the coin clearly, with a QR code if useful.
5. **Wait for the notification.** Confirm receipt with [webhooks](https://payramhost.com/en/docs/webhook-guide/) or the [status endpoint](https://payramhost.com/en/docs/payment-statuses/).

## 3. Request and response

The endpoint is `POST {BASE_URL}/api/v1/deposit-address/reference/{reference_id}`. `BASE_URL` is the address of your merchant dashboard (shown under Settings → Site URL).

| Header | Notes |
| --- | --- |
| `API-Key` | A project API key, one per project, generated in the dashboard |
| `Content-Type` | `application/json` |

| Body field | Notes |
| --- | --- |
| `blockchain_code` | The blockchain to assign an address for: `BTC`, `ETH`, `TRX`, `BASE` or `POLYGON` |

```bash
curl --location '${BASE_URL}/api/v1/deposit-address/reference/{reference_id}' \
--header 'API-Key: <your_api_key>' \
--header 'Content-Type: application/json' \
--data '{
  "blockchain_code": "ETH"
}'
```

In the response, three fields matter most (note the capital first letters):

| Field | Meaning |
| --- | --- |
| `Address` | The deposit address assigned to this customer. It is reused for all later payments in the same family |
| `Family` | The blockchain family, for example `ETH_Family`, `BTC_Family` or `TRX_Family` |
| `Status` | The state of the address, for example `active` or `inactive` |

```json
{
  "id": 324,
  "createdAt": "2025-11-05T06:53:42.419556Z",
  "Address": "0xCb12499d865271D1FfFf16308E523e0BB624a779",
  "Family": "ETH_Family",
  "Status": "active",
  "MemberID": 271,
  ...
}
```

The response also carries the member, the family and the wallet objects, which are omitted here.

> **Once assigned, it is permanent.** The official documentation says that after assignment the address is permanent for that customer within the same blockchain family, and PayRam reuses it automatically for later transactions. So think before you call it, and do not assign addresses to real customers just to test.

## 4. What a family is

PayRam groups chains that use the same address format into a **family**:

| Family | Contains |
| --- | --- |
| `ETH_Family` | Ethereum, Base, Polygon (EVM chains) |
| `TRX_Family` | Tron |
| `BTC_Family` | Bitcoin |

The official documentation says an address is reused for all later payments in the same family, and that Base, Polygon and Ethereum share `ETH_Family`. Going by that, the same customer should use one and the same 0x address on all three chains. Before going live, we suggest testing each chain with a small amount to confirm that receipt and attribution are correct.

PayRamHost currently offers Ethereum, Base and Polygon, which is `ETH_Family`; Tron and Bitcoin are planned.

## 5. A Node.js example

```javascript
const BASE_URL = process.env.PAYRAM_BASE_URL;
const API_KEY = process.env.PAYRAM_API_KEY; // project API key, server side only

async function assignDepositAddress(referenceId, blockchainCode = 'ETH') {
  const res = await fetch(`${BASE_URL}/api/v1/deposit-address/reference/${referenceId}`, {
    method: 'POST',
    headers: { 'API-Key': API_KEY, 'Content-Type': 'application/json' },
    body: JSON.stringify({ blockchain_code: blockchainCode }),
  });
  if (!res.ok) throw new Error(`HTTP ${res.status}`);

  const data = await res.json();
  // note the capital first letters of the response fields
  return { address: data.Address, family: data.Family, status: data.Status };
}
```

Once you have the address, store it together with your own customer ID. The next time the customer comes back, check your own records first, show the address if you already have one, and call the endpoint only if you do not.

## 6. Integration advice

These are our recommendations, not official requirements:

- **Spell out the network and the coin.** Next to the address, say “send this coin on this chain”. If a customer sends on the wrong network, the funds usually cannot be recovered. If you build your own page, show only the payment options the API returns and that you have enabled.
- **Mind the sweep minimum.** A deposit address must reach a one-time minimum balance (by default roughly the equivalent of 5 US dollars) before it is swept. Keep that in mind for tiny top-ups; see [SmartSweep explained](https://payramhost.com/en/docs/smartsweep-explained/).
- **One address per customer, never shared.** Do not give one customer’s fixed address to another, and do not share one `customerID` between customers.
- **Book deposits from webhooks.** Confirm receipt with a webhook or the status endpoint before you add to the customer’s balance. Never credit a balance because a front-end “I have sent it” button was clicked.
- **Test first.** Run a test customer through the whole flow: assign an address, send a small amount, receive the notification, see the balance rise. The list is in the [go-live checklist](https://payramhost.com/en/docs/go-live-checklist/).

## 7. FAQ

### How is a fixed address different from an ordinary payment page?

An ordinary payment page belongs to a single order; a fixed address belongs to a customer and can receive repeatedly. The latter suits prepaid balances and top-ups, the former one-off purchases.

### What happens if a customer sends money to the address and I have not created a payment?

The official documentation says that once an address is assigned to a customer, PayRam automatically reuses it for later transactions. How such a deposit shows up as a record and a notification is best confirmed by testing on your own dashboard.

### Can I replace a customer’s fixed address?

The official documentation provides no way to replace it and says assignment is permanent. If you need one replaced, contact us.

### `blockchain_code` includes `BTC` and `TRX`. Can I use them on PayRamHost?

The endpoint accepts those codes, but PayRamHost currently offers only Ethereum, Base and Polygon. What you can use is determined by the networks enabled in your merchant dashboard.

## Related reading

- [Create payments via API](https://payramhost.com/en/docs/create-payment-api.md): Add crypto payments to your own site with the PayRam API: create a payment and get a payment link, send the customer to the payment page, confirm receipt with webhooks and the status endpoint, and reconcile by order number. With curl, Node.js and Python examples.
- [Ticker and currency API](https://payramhost.com/en/docs/ticker-and-currency-api.md): PayRam's two helper endpoints: the public /api/v1/ticker returns supported coins with live US-dollar prices, and /api/v1/blockchain-currency returns the payment options available for one payment. Field meanings, the formula for estimating the amount due and usage advice.
- [Subscription billing](https://payramhost.com/en/docs/crypto-subscription-billing.md): PayRam has no built-in subscriptions; its docs say they must be built at the application layer. Two workable designs: create an invoice every period and extend on the webhook, or use fixed deposit addresses for prepaid credit. With a renewal timeline, status mapping and a code skeleton.
- [SmartSweep](https://payramhost.com/en/docs/smartsweep-explained.md): How SmartSweep moves funds from customer deposit addresses into your cold wallet: the three triggers (amount, address count, time), why small test payments are not swept, who pays the gas, and why Bitcoin is different.

## Sources

This guide is based on the PayRam official documentation below, checked on 2026-11-09. PayRamHost is an independently operated service and is not affiliated with PayRam. If anything differs, the official documentation prevails.

- [Assign Deposit Address](https://docs.payram.com/api-integration/payments-api/assign-deposit-address)
- [Customer Deposit Wallets](https://docs.payram.com/features/customer-deposit-wallets)
- [Get Blockchain Currencies](https://docs.payram.com/api-integration/payments-api/get-blockchain-currencies)
