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 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
| Name | Type | Required | Description |
|---|---|---|---|
| site | string | Required | Site domain (acme.io) or id (st_…). |
| id | string | Required | Your order or payment id, up to 128 characters. Sending the same id again is ignored. |
| amount | number | Required | In major units: 49.00 means $49. |
| currency | string | Optional | Three-letter code. Default USD. |
| atrby_sid | string | Optional | The visit id from atrby.ids() at checkout. |
| atrby_uid | string | Optional | Your user id, as passed to identify. |
| string | Optional | Customer email, shown in the payments list. | |
| name | string | Optional | Customer name, up to 120 characters. |
| occurred_at | string | Optional | ISO 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 / 429 | Invalid body, bad key, read-only key, or over the rate limit. See REST API. |
Refunds can't be sent through the Payment API yet.