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 typeCreated byBest for
Invoice addressPOST /v1/invoicesOne customer payment
Static addressPOST /v1/addressesDeposits, 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.