Concepts
Addresses
Ephemeral invoice addresses and reusable static addresses
Reference
halfin uses two address patterns. Invoice addresses are created for a single payment request. Static addresses are permanent deposit addresses that auto-create invoices when funds arrive.
| Address type | Created by | Best for |
|---|---|---|
| Invoice address | POST /v1/invoices | One customer payment |
| Static address | POST /v1/addresses | Deposits, donations, top-ups |
Usage
Create a static address when the same payer can deposit more than once.
curl -X POST https://api.halfin.xyz/api/v1/addresses \
-H "Content-Type: application/json" \
-H "X-API-Key: $HALFIN_API_KEY" \
-d '{"currency":"BTC","label":"Donation page"}'import { createAddress, createHalfin } from '@halfin/sdk-merchant';
const client = createHalfin({ apiKey: process.env.HALFIN_API_KEY });
const { data } = await createAddress({
client,
body: { currency: 'BTC', label: 'Donation page' },
});# Python SDK coming soon. Use the cURL example for now.Pitfalls
- Some chains require a memo or destination tag. Show it beside the address.
- Do not treat a static address deposit as paid until the invoice webhook confirms it.
Troubleshooting
Deposit not visible usually means the transaction is still unconfirmed, sent on the wrong network, or missing a required memo/tag.