<!-- tempo-docs-context -->
> Source: [/docs/guide/payments/accept-a-payment](https://tempo.xyz/developers/docs/guide/payments/accept-a-payment.md)
> Section: [Accounts](https://tempo.xyz/developers/docs/accounts.md). Create accounts, connect wallets, read balances, send and receive payments, and reconcile deposits.
> [Documentation index](https://tempo.xyz/developers/llms.txt) · [Docs skill](https://tempo.xyz/developers/SKILL.md)

> Tempo MCP: Use `search`, `find_pages`, `read_page`, and `code` at `https://mcp.tempo.xyz` for Tempo and related documentation.
> If an indexed page is missing or reflects an older site, read this site’s [documentation index](https://tempo.xyz/developers/llms.txt) and Markdown pages directly.

<span id="how-to-receive-stablecoin-payments" />

<span id="receive-a-payment" />

# Receive payments

Receive stablecoins at a Tempo account, confirm the token and amount delivered, and match the transfer to your payment records. Use [payment references](https://tempo.xyz/developers/docs/guide/payments/transfer-memos) for invoices or [customer deposit addresses](https://tempo.xyz/developers/docs/guide/payments/virtual-addresses) to identify who paid.

<span id="receive-stablecoin-payments" />

## Get a deposit address

Share an account address you control with the sender. For customer-specific addresses that credit a shared account, use [customer deposit addresses](https://tempo.xyz/developers/docs/guide/payments/virtual-addresses); your application maintains the customer ledger. For deposits from other networks, use [Routes](https://tempo.xyz/developers/docs/routes/deposits).

Show the network and token alongside the receiving address, then read incoming transfer events to confirm delivery. To accept only specific tokens or senders, [configure an address-level receive policy](https://tempo.xyz/developers/docs/guide/payments/configure-receive-policies) before sharing the address.

This demo funds a test account and displays its token balances. The examples below use AlphaUSD on Moderato testnet. Configure your client or `RPC_URL` / `TEMPO_RPC_URL` for `https://rpc.moderato.tempo.xyz`; use an account you control as the recipient.

**Interactive demo: Receive a Payment**

1. Connect
2. Add funds

Source: [tempoxyz/examples/tree/main/examples/payments](https://github.com/tempoxyz/examples/tree/main/examples/payments)

<span id="verify-stablecoin-payments" />

## Detect payments

Use the account balance to display available funds. To verify a payment, match the network, token contract, recipient, and amount in its confirmed transfer events to your payment record.

The event examples below read activity for a token contract. Filter by recipient and use the transaction hash and log index to process each payment once. For virtual addresses, follow the [deposit attribution flow](https://tempo.xyz/developers/docs/guide/payments/virtual-addresses#what-to-verify-in-virtual-address-deposits).

For payments held by a receive policy, see [Handle blocked receipts](https://tempo.xyz/developers/docs/guide/payments/configure-receive-policies#monitor-blocked-receipts).

<span id="check-receiver-token-balance" />

For balance snapshots and display formatting, use [Balances and activity](https://tempo.xyz/developers/docs/accounts/balances#read-a-stablecoin-balance). A balance change alone does not identify which customer or invoice to credit.

<span id="listen-for-tip-20-transfer-events" />

Enter the receiving account as both `address` and `recipient`. Set `chainId` to `42431` and `type` to `transfer` to read incoming payments on Moderato:

`GET /v1/addresses/{address}/activities`

List address activities

[API reference](https://tempo.xyz/developers/docs/api/activities#getaddressactivities) — request parameters, authentication, and response schema. The examples below use editable sample values.

**cURL**

```bash
curl 'https://api.tempo.xyz/v1/addresses/0xbe058e1c4df8a4366a387bf595b284246a93039e/activities?chainId=42431&type=transfer'
```

**TypeScript**

```ts
fetch('https://api.tempo.xyz/v1/addresses/0xbe058e1c4df8a4366a387bf595b284246a93039e/activities?chainId=42431&type=transfer')
```

For direct transfer subscriptions, use the [CLI, Viem, or Wagmi setup](https://tempo.xyz/developers/docs/accounts/examples#choose-your-tools). Set `account` to the recipient and `token` to AlphaUSD. Wagmi hooks run inside a React component and clean up on unmount:

:::code-group
```ts [Viem]
const unwatch = client.token.watchTransfer({
  token, args: { to: account },
  onTransfer: (transfer, log) => console.log(transfer, log.transactionHash),
})
// Call unwatch() when the view closes.
```

```bash [CLI]
cast logs 'Transfer(address indexed from,address indexed to,uint256 value)' \
  '' "$TEMPO_ACCOUNT_ADDRESS" --address "$ALPHA_USD" \
  --subscribe --rpc-url wss://rpc.moderato.tempo.xyz
```

```tsx [Wagmi]
import { Hooks } from 'wagmi/tempo'
Hooks.token.useWatchTransfer({
  token, args: { to: account },
  onTransfer: (transfer, log) => console.log(transfer, log.transactionHash),
})
```
:::

Use [webhooks](https://tempo.xyz/developers/docs/api/webhooks) for backend callbacks. Read historical activity after reconnecting and follow pagination to recover missed events. The [complete event examples](https://tempo.xyz/developers/docs/guide/payments/accept-a-payment/examples#listen-for-tip-20-transfer-events) cover direct RPC log queries.

<span id="reconcile-payments-with-memos" />

<span id="payment-reconciliation-with-memos" />

## Match payments to customers

Use the memo to find an invoice, or a [customer deposit address](https://tempo.xyz/developers/docs/guide/payments/virtual-addresses) to identify who paid. Enter the candidate transaction hash and its network below to inspect the token movements.

`GET /v1/transactions/{transactionHash}/activities`

List transaction activities

[API reference](https://tempo.xyz/developers/docs/api/activities#gettransactionactivities) — request parameters, authentication, and response schema. The examples below use editable sample values.

**cURL**

```bash
curl 'https://api.tempo.xyz/v1/transactions/0x4845ae2098724ab26a5d89370dce5124d044be6a5acc164afc348662de67d474/activities?chainId=42431'
```

**TypeScript**

```ts
fetch('https://api.tempo.xyz/v1/transactions/0x4845ae2098724ab26a5d89370dce5124d044be6a5acc164afc348662de67d474/activities?chainId=42431')
```

:::steps
### Find the invoice

Match the transfer's memo using the [same reference encoding](https://tempo.xyz/developers/docs/guide/payments/transfer-memos#encode-a-payment-reference) your application requested.

### Verify delivery

Check the network, token, recipient, and amount against the invoice. Confirm the successful transaction and the delivered `Transfer` event. For a blocked receipt, funds go to the receive-policy guard rather than the intended recipient.

### Record the payment once

Store the network, transaction hash, and transfer log index as a unique event key. Save that event and mark the invoice paid in one database transaction. An API response or matching memo alone must not fulfill an invoice.
:::

Use the [complete TypeScript verifier](https://tempo.xyz/developers/docs/guide/payments/accept-a-payment/examples#verify-an-invoice) for receipt checks, memo matching, and a stable event key.

<span id="smart-contract-integration" />

<span id="receive-payments-in-a-contract" />

<span id="payment-verification-best-practices" />

<span id="record-a-payment-once" />

<span id="cross-stablecoin-payments" />

<span id="convert-a-received-stablecoin" />

<span id="next-steps-for-accepting-payments" />

<span id="continue-your-payment-integration" />

For contract-based collections, read [Receive payments in a contract](https://tempo.xyz/developers/docs/guide/payments/accept-a-payment/examples#receive-payments-in-a-contract). If you need to hold a different stablecoin, [swap the received funds](https://tempo.xyz/developers/docs/guide/stablecoin-dex/executing-swaps) after verifying delivery.
