Fetch Payment Status
GET {BASE_URL}/payment/{payment_id}
Retrieves information about specific payment entity.
Parameters
n/a
Response
Returns a JSON object with the following properties:
id
The unique identifier of the transactionamount
Payment amount objectamount
Amount in centscurrency
Currency code
receivedAmount
Settled payment amount objectamount
Amount in centscurrency
Currency code
status
Payment statuscreatedAt
Payment created at timestamp
Example
Request:
fetch('https://sandbox-api.ninjapay.tech/api/v1/payment/fc26571a-1a36-411e-8458-95fb8c06f782', {
method: 'get',
headers: {
Authorization: 'Bearer MERCHANT_SECRET_KEY',
'Content-Type': 'application/json',
},
});
Response:
{
"id": "fc26571a-1a36-411e-8458-95fb8c06f782",
"amount": {
"amount": "100",
"currency": "EUR"
},
"receivedAmount": {
"amount": "100",
"currency": "EUR"
},
"status": "new",
"createdAt": "2024-05-01T00:00:00+00:00"
}
Errors
This API uses the following error codes:
401 Unauthorized
The API key provided was invalid or missing404 Not Found
The requested resource was not found500 Internal Server Error
An unexpected error occurred on the server