Payments API
These endpoints read the payments your forms took through Przelewy24, Stripe, PayU or PayPal, and refund them. Use them to bring each day’s payments into your accounting system, or to give a fee back from your own booking system when a participant cancels. The submissions the payments were for are on Form submissions.
Connecting a payment provider and adding the payment element to a form happen in the app, not through an access key.
Before you start
Section titled “Before you start”The overview explains sending requests and lists, and the errors page the errors every endpoint can answer.
Every amount is given twice: amount in the currency’s main unit as a string with every decimal place, such as "490.00" PLN, and amountMinor as a whole number in its smallest unit, such as 49000 grosze. minorDigits says how many decimal places the currency has: 2 for PLN, 0 for JPY. Use the minor units for sums, and send them when you refund. Times are ISO 8601 with an offset, as everywhere in the API.
A payment’s status:
| Value | Meaning |
|---|---|
pending |
Sent, and the payer has until windowEndsAt to pay. |
succeeded |
Paid. |
expired |
The 24 hours passed unpaid. |
partially_refunded |
Paid, and part of it given back. |
refunded |
Paid, and all of it given back. |
List payments
Section titled “List payments”GET/v1/payments
Every payment of your organization, the newest first.
Key permission: get_payments (List payments)
Headers: X-Api-Key, X-Api-Secret
Query parameters: the list parameters, and these:
| Parameter | What it does |
|---|---|
filter[status][eq], filter[status][in] |
By status, such as succeeded, or several separated by commas. |
filter[provider][eq] |
przelewy24, stripe, payu or paypal. |
filter[integration][eq] |
The payments of one integration, by its identifier. |
filter[form][eq] |
The payments of one form, by its identifier. |
filter[subjectType][eq] |
What they paid for: form_submission. |
filter[testMode][eq] |
true for test payments only, false for real ones only. |
filter[createdAt][gte], filter[createdAt][lte] |
Started from or until a moment. |
filter[search][eq] |
Finds text in the description, the form’s name and the provider’s reference, and part of the payment’s identifier. Never the payer’s email address. |
sort |
Any field of the payment, such as createdAt, paidAt or amountMinor. -createdAt by default. |
Response: 200, with these fields for each item:
| Field | Type | Meaning |
|---|---|---|
id |
string | The payment’s identifier. |
status |
string | See above. |
amount, amountMinor |
string, integer | What was asked for. |
refundedAmount, refundedMinor |
string, integer | What successful refunds have given back. |
currency |
string | Such as PLN. |
minorDigits |
integer | The currency’s decimal places. |
description |
string | What the provider showed the payer. |
provider |
string | przelewy24, stripe, payu or paypal. |
testMode |
boolean | true for a payment through an integration in test mode, where no money moved. |
subject |
object | What it paid for: type (form_submission), id (the submission, null once deleted), title (the form’s name when the payment was made, kept after the submission is deleted), formId and formTitle (both null once the submission is deleted). |
integration |
object or null | The integration it went through, id and name; null once deleted. |
paidAt |
string or null | When it was paid. |
createdAt |
string | When it started. |
| Status | When |
|---|---|
400 |
A filter, sort, or page isn’t valid. |
Example
Section titled “Example”curl -G 'https://api.doxtly.com/v1/payments' \ -H "X-Api-Key: $DOXTLY_API_KEY" \ -H "X-Api-Secret: $DOXTLY_API_SECRET" \ --data-urlencode 'perPage=3'Response 200:
{ "items": [ { "id": "01a1e622-9e65-7475-86bb-d5b37969fca7", "status": "refunded", "amount": "350.00", "amountMinor": 35000, "refundedAmount": "350.00", "refundedMinor": 35000, "currency": "PLN", "minorDigits": 2, "description": "Contract review consultation", "provider": "stripe", "testMode": true, "subject": { "type": "form_submission", "id": "01a1e622-9e5f-7031-9755-aa183b9113c6", "title": "Contract review consultation", "formId": "01a1e61d-aa2d-7038-bb61-5ca2254c0a42", "formTitle": "Contract review consultation" }, "integration": { "id": "01a1e61c-daf1-795a-aa69-350c811c5f8e", "name": "Northbridge Stripe" }, "paidAt": "2026-11-16T21:53:12+01:00", "createdAt": "2026-11-16T21:53:10+01:00" }, { "id": "01a1e622-8f37-7696-a9f6-005d51180b05", "status": "partially_refunded", "amount": "350.00", "amountMinor": 35000, "refundedAmount": "150.00", "refundedMinor": 15000, "currency": "PLN", "minorDigits": 2, "description": "Contract review consultation", "provider": "stripe", "testMode": true, "subject": { "type": "form_submission", "id": "01a1e622-8f30-7adb-ac8c-35a61c5652df", "title": "Contract review consultation", "formId": "01a1e61d-aa2d-7038-bb61-5ca2254c0a42", "formTitle": "Contract review consultation" }, "integration": { "id": "01a1e61c-daf1-795a-aa69-350c811c5f8e", "name": "Northbridge Stripe" }, "paidAt": "2026-11-16T21:53:08+01:00", "createdAt": "2026-11-16T21:53:06+01:00" }, { "id": "01a1e622-7363-7acc-ab03-4e9d0d7a94c8", "status": "pending", "amount": "1470.00", "amountMinor": 147000, "refundedAmount": "0.00", "refundedMinor": 0, "currency": "PLN", "minorDigits": 2, "description": "Contract drafting workshop: 3 seat(s) for Corrib Energy", "provider": "przelewy24", "testMode": true, "subject": { "type": "form_submission", "id": "01a1e622-735a-79d6-87ab-f52bfe86c7ed", "title": "Contract drafting workshop", "formId": "01a1e61d-a979-754a-9c99-eeb66e0473fb", "formTitle": "Contract drafting workshop" }, "integration": { "id": "01a1e61a-f96f-7854-8314-a17036db4d79", "name": "Northbridge Przelewy24" }, "paidAt": null, "createdAt": "2026-11-16T21:52:59+01:00" } ], "meta": { "total": 6, "page": 1, "perPage": 3, "totalPages": 2, "hasMore": true, "hasPrevious": false }}What the list is filtered by
Section titled “What the list is filtered by”GET/v1/payments/filter_options
The values the list’s filters can take in your organization: the providers and payment integrations, and the forms that took payments. The app fills its filters from it.
Key permission: get_payments (List payments)
Headers: X-Api-Key, X-Api-Secret
Response: 200:
| Field | Type | Meaning |
|---|---|---|
providers |
array of strings | przelewy24, stripe, payu and paypal. |
integrations |
array | Your payment integrations: id, name, provider and testMode. |
forms |
array | The forms payments were taken through: id and title. |
Example
Section titled “Example”curl 'https://api.doxtly.com/v1/payments/filter_options' \ -H "X-Api-Key: $DOXTLY_API_KEY" \ -H "X-Api-Secret: $DOXTLY_API_SECRET"Response 200:
{ "providers": [ "przelewy24", "stripe" ], "integrations": [ { "id": "01a1e61a-f96f-7854-8314-a17036db4d79", "name": "Northbridge Przelewy24", "provider": "przelewy24", "testMode": true }, { "id": "01a1e61c-daf1-795a-aa69-350c811c5f8e", "name": "Northbridge Stripe", "provider": "stripe", "testMode": true } ], "forms": [ { "id": "01a1e61d-a979-754a-9c99-eeb66e0473fb", "title": "Contract drafting workshop" }, { "id": "01a1e61d-aa2d-7038-bb61-5ca2254c0a42", "title": "Contract review consultation" } ]}Totals of the list
Section titled “Totals of the list”GET/v1/payments/stats
What the payments that the list’s filters find add up to, each currency on its own: amounts in different currencies are never added together. The app’s stat cards above the Payments list come from it, for the period and the filters chosen there.
Key permission: get_payments (List payments)
Headers: X-Api-Key, X-Api-Secret
Query parameters: the filters of List payments, such as filter[createdAt][gte] and filter[createdAt][lte] for a period. Page and sort don’t apply.
Response: 200, with currencies: one item for each currency paid in, in the order of their codes, each with currency, minorDigits and four totals of count, amount and amountMinor:
| Total | What it counts |
|---|---|
received |
The payments that were paid, late ones included. |
refunded |
What refunds that succeeded gave back; count is the payments refunded, in full or in part. |
failed |
The payments that ended unpaid. |
pending |
The payments still waiting for the payer. |
With no payment found, currencies is empty.
Example
Section titled “Example”curl 'https://api.doxtly.com/v1/payments/stats?filter[createdAt][gte]=2026-11-01T00:00:00%2B01:00' \ -H "X-Api-Key: $DOXTLY_API_KEY" \ -H "X-Api-Secret: $DOXTLY_API_SECRET"Response 200:
{ "currencies": [ { "currency": "PLN", "minorDigits": 2, "received": { "count": 12, "amount": "5400.00", "amountMinor": 540000 }, "refunded": { "count": 1, "amount": "100.00", "amountMinor": 10000 }, "failed": { "count": 2, "amount": "900.00", "amountMinor": 90000 }, "pending": { "count": 1, "amount": "450.00", "amountMinor": 45000 } } ]}List refunds
Section titled “List refunds”GET/v1/payments/refunds
Every refund of your organization’s payments, each as its own item, the newest first. The app’s Refunds tab on the Payments page shows the same list.
Key permission: get_payment_refunds (List refunds)
Headers: X-Api-Key, X-Api-Secret
Query parameters: the list parameters, and these:
| Parameter | What it does |
|---|---|
filter[status][eq], filter[status][in] |
pending, succeeded or failed, or several separated by commas. |
filter[reason][eq] |
manual (asked for by someone) or late_payment (made by Doxtly for a payment that came too late). |
filter[createdAt][gte], filter[createdAt][lte] |
Asked for from or until a moment. |
sort |
Any field of the refund, such as createdAt or amountMinor. -createdAt by default. |
Response: 200, with these fields for each item:
| Field | Type | Meaning |
|---|---|---|
id |
string | The refund’s identifier. |
amount, amountMinor |
string, integer | What it gives back. |
currency, minorDigits |
string, integer | The payment’s currency and its decimal places. |
status |
string | pending, succeeded or failed. |
reason |
string | manual or late_payment. |
note |
string or null | What whoever asked for it wrote. |
failureReason |
string or null | Why the provider refused it, for a failed one. |
requestedBy |
object or null | Who asked for it, id and name; null for one Doxtly made, one asked for with an access key, or once the person was deleted. |
payment |
object | The payment it gives back: id, title (what it paid for), provider and testMode. |
createdAt, updatedAt |
string | When it was asked for, and when it last changed. |
| Status | When |
|---|---|
400 |
A filter, sort, or page isn’t valid. |
Example
Section titled “Example”curl 'https://api.doxtly.com/v1/payments/refunds?filter[status][eq]=succeeded' \ -H "X-Api-Key: $DOXTLY_API_KEY" \ -H "X-Api-Secret: $DOXTLY_API_SECRET"Response 200:
{ "items": [ { "id": "01a1e628-3c1e-7b0a-9f4e-6d2b8a1c5e77", "amount": "100.00", "amountMinor": 10000, "currency": "PLN", "minorDigits": 2, "status": "succeeded", "reason": "manual", "note": "Cancelled a week before the workshop", "failureReason": null, "requestedBy": { "id": "01a1e5f0-11c2-7d4e-8a3b-2f6c9d0e1a45", "name": "Anna Kowalska" }, "payment": { "id": "01a1e620-9b7d-7f31-b6a2-0c4e5d8f9a12", "title": "Contract drafting workshop", "provider": "przelewy24", "testMode": true }, "createdAt": "2026-11-16T21:58:21+01:00", "updatedAt": "2026-11-16T21:58:27+01:00" } ], "meta": { "total": 1, "page": 1, "perPage": 20, "totalPages": 1, "hasMore": false, "hasPrevious": false }}Get a payment
Section titled “Get a payment”GET/v1/payments/{id}
One payment with everything the app’s payment page shows: the payer’s email address, each attempt and each refund.
Key permission: read_payment (Read a payment)
Headers: X-Api-Key, X-Api-Secret
Path parameters: id, the payment’s identifier.
Response: 200, with the list’s fields and these:
| Field | Type | Meaning |
|---|---|---|
payerEmail |
string or null | The address the provider sent its receipt to, if the form named one. |
providerReference |
string or null | The provider’s reference of what was paid: Przelewy24’s or PayU’s order number, PayPal’s capture, or Stripe’s payment intent (pi_…). |
paymentMethod |
string or null | How the payer paid, as the provider names the method (for example pbl at PayU, paypal at PayPal); null where the provider does not say. |
providerFee, providerFeeMinor |
string or null, integer or null | The provider’s fee for the payment, in major and in minor units, where the provider says it. The provider keeps it when the payment is refunded. |
windowEndsAt |
string | When the time to pay ends. |
endedAt |
string or null | When it ended: paid (the same as paidAt) or ended unpaid. |
updatedAt |
string | When it last changed. |
refundable, refundableMinor |
string, integer | What can still be given back: the amount less what was refunded and what refunds in progress hold. |
refundAvailable |
boolean | Whether a refund can be asked for now: paid, and nothing in refundBlockedReason. |
refundBlockedReason |
string or null | Why a paid payment can’t be refunded now, decided before the provider is asked: integration_deleted, nothing_left (everything given back, or held by refunds in progress) or window_passed (the provider’s time for refunds is over). null when it can be refunded, or isn’t paid. |
refundWindowEndsAt |
string or null | Until when the provider takes a refund, where it has such a limit: PayPal, 180 days after the payment. null for no limit. |
refundFromBalance |
boolean | The provider pays a refund from your balance with it and refuses one the balance doesn’t cover: Przelewy24, PayU and PayPal. |
providerKeepsFee |
boolean | The provider keeps its fee (providerFee) when the payment is refunded. |
providerDashboardUrl |
string or null | The payment in Stripe’s dashboard; null for Przelewy24, PayU and PayPal. |
attempts |
array | Each time the payer went to the provider’s page, by number: id, number, status (open, succeeded, failed, expired or canceled), failureReason, expiresAt, finishedAt and createdAt. |
refunds |
array | Its refunds, newest first, as described under Refund a payment. |
An attempt’s failureReason is a code, such as refused (the provider refused it), unavailable (it didn’t answer), amount_too_small or reconnect_required (the integration has to be connected again).
| Status | When |
|---|---|
404 |
No such payment in your organization. |
Example
Section titled “Example”curl 'https://api.doxtly.com/v1/payments/01a1e622-6377-71d9-9521-e76085f009b2' \ -H "X-Api-Key: $DOXTLY_API_KEY" \ -H "X-Api-Secret: $DOXTLY_API_SECRET"Response 200:
{ "id": "01a1e622-6377-71d9-9521-e76085f009b2", "status": "partially_refunded", "amount": "490.00", "amountMinor": 49000, "refundedAmount": "90.00", "refundedMinor": 9000, "currency": "PLN", "minorDigits": 2, "description": "Contract drafting workshop: 1 seat(s) for Meridian Foods", "provider": "przelewy24", "testMode": true, "subject": { "type": "form_submission", "id": "01a1e622-636c-7538-8422-18d72d798756", "title": "Contract drafting workshop", "formId": "01a1e61d-a979-754a-9c99-eeb66e0473fb", "formTitle": "Contract drafting workshop" }, "integration": { "id": "01a1e61a-f96f-7854-8314-a17036db4d79", "name": "Northbridge Przelewy24" }, "paidAt": "2026-11-16T21:52:57+01:00", "createdAt": "2026-11-16T21:52:55+01:00", "payerEmail": "tom.okafor@meridianfoods.example", "providerReference": "314612780", "paymentMethod": "p24-154", "providerFee": "0.75", "providerFeeMinor": 75, "windowEndsAt": "2026-11-17T21:52:55+01:00", "endedAt": "2026-11-16T21:52:57+01:00", "updatedAt": "2026-11-16T21:58:27+01:00", "refundable": "400.00", "refundableMinor": 40000, "refundAvailable": true, "refundBlockedReason": null, "refundWindowEndsAt": null, "refundFromBalance": true, "providerKeepsFee": true, "providerDashboardUrl": null, "attempts": [ { "id": "01a1e622-6376-79ce-adf2-e8aecf69ffa2", "number": 1, "status": "succeeded", "failureReason": null, "expiresAt": "2026-11-16T23:31:55+01:00", "finishedAt": "2026-11-16T21:52:57+01:00", "createdAt": "2026-11-16T21:52:55+01:00" } ], "refunds": [ { "id": "01a1e627-6708-7295-8e5b-71b425341b0a", "amount": "90.00", "amountMinor": 9000, "currency": "PLN", "status": "succeeded", "reason": "manual", "note": "Lunch not taken", "failureReason": null, "requestedBy": null, "createdAt": "2026-11-16T21:58:24+01:00", "updatedAt": "2026-11-16T21:58:27+01:00" } ]}Refund a payment
Section titled “Refund a payment”POST/v1/payments/{id}/refunds
Gives a paid payment back to the payer through the provider, in full or in part. The provider makes the refund in its own time, so the answer is 202 with the refund, usually still pending. Read the payment again later, or listen to paymentRefunded with an outgoing webhook, to learn when it succeeded.
Key permission: refund_payment (Refund a payment)
Headers: X-Api-Key, X-Api-Secret, Content-Type: application/json
Path parameters: id, the payment’s identifier.
Body:
| Field | Type | Required | Meaning |
|---|---|---|---|
amount |
integer | No | How much to give back, in the currency’s smallest unit: 15000 for 150.00 PLN. Left out or null, all that remains. More than zero. |
note |
string | No | Your own note, up to 255 characters. Kept with the refund; never sent to the provider or shown to the payer. |
Refunds asked for at the same moment never give back more than was paid between them: a refund in progress already counts against what remains.
Response: 202, the refund:
| Field | Type | Meaning |
|---|---|---|
id |
string | The refund’s identifier. |
amount, amountMinor, currency |
string, integer, string | How much it gives back. |
status |
string | pending, then succeeded or failed. |
reason |
string | manual, or late_payment for an automatic refund of a payment that arrived after the time to pay. |
note |
string or null | The note. |
failureReason |
string or null | Why the provider refused it, for a failed one. |
requestedBy |
object or null | The person who asked for it, id and name; null for one asked for with an access key, made by Doxtly, or once the person was deleted. |
createdAt, updatedAt |
string | When it was asked for, and when its status last changed. |
| Status | When |
|---|---|
404 |
No such payment in your organization. |
409 |
The integration has to be connected again (reconnect_required), or the provider already has this request with other details (idempotency_conflict). |
422 |
amount isn’t a whole number above zero, or the note is too long. Or the refund can’t be made: more than remains (refund_exceeds_remaining), a payment not paid or whose integration was deleted (refund_not_allowed), the provider refused it (refused), in which case the refund is recorded as failed, or the provider no longer takes the integration’s keys or Doxtly’s address (invalid_credentials, ip_not_allowed). |
429 |
The provider is limiting requests (rate_limited). Try again in a moment. |
503 |
The provider can’t be reached (unavailable). Try again in a moment. |
Example
Section titled “Example”A partial refund of 90.00 PLN:
curl -X POST 'https://api.doxtly.com/v1/payments/01a1e622-6377-71d9-9521-e76085f009b2/refunds' \ -H "X-Api-Key: $DOXTLY_API_KEY" \ -H "X-Api-Secret: $DOXTLY_API_SECRET" \ -H 'Content-Type: application/json' \ -d '{"amount": 9000, "note": "Lunch not taken"}'Response 202:
{ "id": "01a1e627-6708-7295-8e5b-71b425341b0a", "amount": "90.00", "amountMinor": 9000, "currency": "PLN", "status": "pending", "reason": "manual", "note": "Lunch not taken", "failureReason": null, "requestedBy": null, "createdAt": "2026-11-16T21:58:24+01:00", "updatedAt": "2026-11-16T21:58:24+01:00"}Asking for more than remains:
{ "type": "https://tools.ietf.org/html/rfc4918#section-11.2", "title": "Validation Error", "status": 422, "detail": "The refund is larger than what remains of the payment.", "instance": "/v1/payments/01a1e622-6377-71d9-9521-e76085f009b2/refunds", "code": "payment_refund_exceeds_remaining"}What the API doesn’t cover
Section titled “What the API doesn’t cover”- Connecting payment providers, and changing their settings: in the app, under Integrations.
- Starting a payment: a payment is made only by a visitor sending a form with a Payment element.
- Refunds made in the provider’s own panel: Doxtly doesn’t know of them.