Skip to content

Checking payment status

GET /payments/{paymentId} returns the current state of a payment. It is the authoritative answer to “was I paid?”, and the thing to call when a payer lands on your callback URL.

This endpoint takes no credential. There is no Authorization header and no company scoping: the payment id is the whole of the lookup. Anyone holding a payment id can read that payment, so keep ids out of URLs you publish, emails you forward and logs you ship to third parties.

GET /payments/pay_4KdR8s2Xn1QwZ7 HTTP/1.1
Host: pay-api.paydot.eu
{
"companyId": "acme",
"paymentId": "pay_4KdR8s2Xn1QwZ7",
"amountCents": 2599,
"currency": "EUR",
"reference": "ORDER 1042",
"status": "EXECUTED",
"createdAt": 1787086549556,
"updatedAt": 1787086901233,
"merchantReturn": true
}
FieldMeaning
companyIdYour company id.
paymentIdThe Paydot payment id, the same value you received on your callback URL.
amountCentsThe amount in minor units, and the amount actually paid.
currencyISO 4217 currency code.
referenceThe reference shown to the payer.
statusOne of the eight values below.
createdAtWhen the payment was created, epoch milliseconds.
updatedAtWhen the status last changed, epoch milliseconds. Absent until the status changes for the first time.
merchantReturntrue when the payment came from a link you generated, which is why Paydot offers the payer a return step back to you. It does not mean the payer took it.
const response = await fetch(`https://pay-api.paydot.eu/payments/${paymentId}`);
if (!response.ok) {
throw new Error(`Paydot API error: ${response.status} ${await response.text()}`);
}
const payment = await response.json();
const paid = payment.status === "EXECUTED" || payment.status === "SETTLED";
StatusFinalMeaning
PENDINGNoCreated, waiting on the payer at their bank.
AUTHORISEDNoThe payer finished at their bank.
EXECUTEDYesThe bank reports the payment as executed.
SETTLEDYesFunds have settled.
FAILEDYesThe bank reported a failure.
CANCELLEDYesCancelled before it completed.
INCOMPLETENoThe payer left without finishing. Still resumable.
UNKNOWNNoNo status could be resolved.

A non-final status can still change. A final one will not.

StatusCause
404No payment with that id. The body is a ProblemDetail (RFC 7807) whose detail reads Payment not found.

The detail is localised from the request’s Accept-Language, so match on the status code rather than on the message.

You do not have to poll. Configure a webhook and Paydot posts a signed payment.status_changed event whenever a payment reaches EXECUTED, SETTLED, FAILED or CANCELLED, retried for roughly 22 hours if your endpoint is down.

Fetch a payment when you have a reason to: a payer just arrived on your callback URL, someone opened an order in your admin, or you are reconciling after an outage that outlasted the retry window. A payment created from a link you generated does not expire, so a fetch days later still answers.