Developer docs

Migration guide

Nothing breaks: the old names still work. This is just the new shape of the API.

The API used to be escrow-first. It is now a payments API with escrow as one product on top. The endpoints you already call still behave exactly as before — we added clearer names and kept the old ones as aliases.

New names

  • POST /charge → POST /collections
  • GET /charge/{reference} → GET /collections/{reference}
  • POST /payouts → POST /transfers
  • GET /payouts → GET /transfers
  • GET /payouts/{reference} → GET /transfers/{reference}
  • GET /balance → GET /balances

Both names return the same body. Move when you are ready.

What changed in behaviour

  • Fees. The API price is a capped collection fee plus a flat payout fee. See pricing.
  • Reference reuse is checked. Posting the same reference with a different amount or customer now returns 409 instead of returning the old collection.
  • return_url is optional on collections.
  • Payouts only go to your registered revenue account, and only from a live key.
  • Commission splits. You can take your cut of an escrow with split: { commission_bps: 500 } — see create escrow.

Before you switch

cURL
# old
curl -X POST https://www.harrenapay.com/api/public/v1/charge  -H "Authorization: Bearer hpay_live_…" -d '{…}'
curl -X POST https://www.harrenapay.com/api/public/v1/payouts -H "Authorization: Bearer hpay_live_…" -d '{…}'

# new
curl -X POST https://www.harrenapay.com/api/public/v1/collections -H "Authorization: Bearer hpay_live_…" -d '{…}'
curl -X POST https://www.harrenapay.com/api/public/v1/transfers   -H "Authorization: Bearer hpay_live_…" -d '{…}'