Docs menu

Payment API

Not on a supported processor? Send each payment from your server and it's attributed the same way.

Updated 21 Oct 2026

Send a payment

Create a Read and write key under Settings → API keys and MCP, then post each payment when it succeeds. Pass the visit ids you collected at checkout with atrby.ids().

curl
curl https://app.atrby.site/api/v1/payments \
  -H "Authorization: Bearer $ATRBY_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "site": "acme.io",
    "id": "order_1042",
    "amount": 49.00,
    "currency": "USD",
    "atrby_sid": "<from atrby.ids()>",
    "atrby_uid": "user_123",
    "email": "buyer@example.com"
  }'

Fields

NameTypeRequiredDescription
sitestringRequiredSite domain (acme.io) or id (st_…).
idstringRequiredYour order or payment id, up to 128 characters. Sending the same id again is ignored.
amountnumberRequiredIn major units: 49.00 means $49.
currencystringOptionalThree-letter code. Default USD.
atrby_sidstringOptionalThe visit id from atrby.ids() at checkout.
atrby_uidstringOptionalYour user id, as passed to identify.
emailstringOptionalCustomer email, shown in the payments list.
namestringOptionalCustomer name, up to 120 characters.
occurred_atstringOptionalISO 8601 time of the payment. Default: now.

Response

201 {"result": "attributed"}Stored and matched to a visit.
201 {"result": "unattributed"}Stored, but no visit matched the ids.
200 {"result": "duplicate"}A payment with this id was already recorded. Safe to retry.
400 / 401 / 403 / 429Invalid body, bad key, read-only key, or over the rate limit. See REST API.

Refunds can't be sent through the Payment API yet.

Was this helpful?
Ask a question about this page