Event Notification API documentation version v1
https://checkout-api.paysera.com/notification/rest/v1
API to get and read notifications
/notifications
Get all notifications belonging to client
get /notifications
Get all notifications belonging to client
MAC token
Query Parameters
-
status:
(one of new, read)
Status of notification
- limit: (integer - default: 20)
- offset: (integer)
- order_by: (string - default: id)
- order_direction: (one of desc, asc)
- after: (string)
- before: (string)
HTTP status code 200
Body
Media type: application/json
Type: object
Properties-
_metadata:
required (object)
-
total:
required (integer)
Total count of items
-
offset:
required (integer)
Cursor position
-
limit:
(integer)
Max allowed results
-
order_direction:
(string)
Order direction
-
order_by:
(string)
Order results by some field
-
has_next:
(boolean)
When order_direction=asc, tells whether there are other records whose field referenced in order_by is greater. When order_direction=desc, tells whether there are other records whose field referenced in order_by is lower.
-
has_previous:
(boolean)
When order_direction=asc, tells whether there are other records whose field referenced in order_by is lower. When order_direction=desc, tells whether there are other records whose field referenced in order_by is greater.
-
cursors:
(object)
-
after:
(string)
When order_direction = asc, stores the greatest value of the order_by field. When order_direction = desc, stores the lowest value of the order_by field. In both order directions the client should use this value when retrieving the next page.
-
before:
(string)
When order_direction = asc, stores the lowest value of the order_by field. When order_direction = desc, stores the greatest value of the order_by field.
-
after:
(string)
-
total:
required (integer)
-
items:
required (array of object)
Items: items
-
id:
required (string)
ID of notification
-
status:
required (one of new, read)
Status of notification
-
event:
required (string)
Name of notification event
-
data:
required (object)
Data of notification
-
created_at:
required (integer)
Date when notification was created presented as timestamp
-
id:
required (string)
Example:
{
"items": [
{
"id": "NAr0y2TfKdtty8TDzQChitTLxDzmkKHOUr",
"status": "new",
"event": "payment_request.captured",
"data": {
"payment_request": {
"id": "PRAlocCdnZU3nYT0GMrGvBaPQcZ2EqAE",
"payer": {
"name": "Jon",
"full_name": "Jon Snow",
"email": "jon@snow.com",
"account_number": "401200XXXXXX1112"
},
"price_paid": {
"amount": "1.00",
"currency": "EUR"
},
"gateway_key": "demo",
"first_payment": {
"id": "PAlKTQI1GIUopJwY3iQd9eQubMxlzjD"
},
"is_email_correct": true,
"authorization_url": "https://checkout-frontend/payment-request/PRAlocCdnZU3nYT0GMrGvBaPQcZ2EqAE",
"price": {
"amount": "1.00",
"currency": "EUR"
},
"locale": null,
"business_id": "ibkXXj4Tn2mvJm1zqrH8UCvJqeCaL5Qy",
"order_id": "84e5d03b-3a5f-4bfc-8b97-e8d7c89ef218",
"unique_identifier": null,
"valid_until": null,
"description": "RA72452214 Payment nr 84e5d03b-3a5f-4bfc-8b97-e8d7c89ef218 in site MyShop",
"method_key": "card",
"method_country": null,
"accept_url": "https://localhost/accept",
"cancel_url": "https://localhost/cancel",
"callback_url": "https://localhost/callback",
"affiliate_key": null,
"parameters": {
"version": "1.7"
},
"status": "captured",
"token_strategy": "required",
"created_at": 1681463651,
"issued_token": "successful_token_xxxx"
}
},
"created_at": 1681463681
}
],
"_metadata": {
"total": 1,
"limit": 20,
"offset": 0,
"has_next": false,
"has_previous": false
}
}
Secured by MAC
Headers
-
Authorization:
required (string)
The MAC token, eg 'MAC id="checkout", ts="1606825369", nonce="lnq4tOoiOOqll6SnkMgFeo7K5bsr8XWj", mac="3+nwOCTuwvpuiFyTh9VtcY62gtez8uECo5L+u6zIzdA=", ext=""'
HTTP status code 401
Authentication problem (MAC not set)
Body
Media type: application/json
Type: object
Properties-
error:
required (string)
Error code
-
error_description:
required (string)
Human readable error description
Example:
{
"error": "unauthorized",
"error_description": "You have not provided any credentials or they are invalid"
}
HTTP status code 403
Access denied due to invalid access rights
Body
Media type: application/json
Type: object
Properties-
error:
required (string)
Error code
-
error_description:
required (string)
Human readable error description
Example:
{
"error": "unauthorized",
"error_description": "You have not provided any credentials or they are invalid"
}
Get single notification by id
get /notifications/{id}
Get single notification by id
MAC token
URI Parameters
- id: required (string)
HTTP status code 200
Body
Media type: application/json
Type: object
Properties-
id:
required (string)
ID of notification
-
status:
required (one of new, read)
Status of notification
-
event:
required (string)
Name of notification event
-
data:
required (object)
Data of notification
-
created_at:
required (integer)
Date when notification was created presented as timestamp
Example:
{
"id": "NAr0y2TfKdtty8TDzQChitTLxDzmkKHOUr",
"status": "new",
"event": "payment_request.captured",
"data": {
"payment_request": {
"id": "PRAlocCdnZU3nYT0GMrGvBaPQcZ2EqAE",
"payer": {
"name": "Jon",
"full_name": "Jon Snow",
"email": "jon@snow.com",
"account_number": "401200XXXXXX1112"
},
"price_paid": {
"amount": "1.00",
"currency": "EUR"
},
"gateway_key": "demo",
"first_payment": {
"id": "PAlKTQI1GIUopJwY3iQd9eQubMxlzjD"
},
"is_email_correct": true,
"authorization_url": "https://checkout-frontend/payment-request/PRAlocCdnZU3nYT0GMrGvBaPQcZ2EqAE",
"price": {
"amount": "1.00",
"currency": "EUR"
},
"locale": null,
"business_id": "ibkXXj4Tn2mvJm1zqrH8UCvJqeCaL5Qy",
"order_id": "84e5d03b-3a5f-4bfc-8b97-e8d7c89ef218",
"unique_identifier": null,
"valid_until": null,
"description": "RA72452214 Payment nr 84e5d03b-3a5f-4bfc-8b97-e8d7c89ef218 in site MyShop",
"method_key": "card",
"method_country": null,
"accept_url": "https://localhost/accept",
"cancel_url": "https://localhost/cancel",
"callback_url": "https://localhost/callback",
"affiliate_key": null,
"parameters": {
"version": "1.7"
},
"status": "captured",
"token_strategy": "required",
"created_at": 1681463651,
"issued_token": "successful_token_xxxx"
}
},
"created_at": 1681463681
}
Secured by MAC
Headers
-
Authorization:
required (string)
The MAC token, eg 'MAC id="checkout", ts="1606825369", nonce="lnq4tOoiOOqll6SnkMgFeo7K5bsr8XWj", mac="3+nwOCTuwvpuiFyTh9VtcY62gtez8uECo5L+u6zIzdA=", ext=""'
HTTP status code 401
Authentication problem (MAC not set)
Body
Media type: application/json
Type: object
Properties-
error:
required (string)
Error code
-
error_description:
required (string)
Human readable error description
Example:
{
"error": "unauthorized",
"error_description": "You have not provided any credentials or they are invalid"
}
HTTP status code 403
Access denied due to invalid access rights
Body
Media type: application/json
Type: object
Properties-
error:
required (string)
Error code
-
error_description:
required (string)
Human readable error description
Example:
{
"error": "unauthorized",
"error_description": "You have not provided any credentials or they are invalid"
}
Read notification
put /notifications/{id}/read
Read notification
MAC token
URI Parameters
- id: required (string)
HTTP status code 200
Body
Media type: application/json
Type: object
Properties-
id:
required (string)
ID of notification
-
status:
required (one of new, read)
Status of notification
-
event:
required (string)
Name of notification event
-
data:
required (object)
Data of notification
-
created_at:
required (integer)
Date when notification was created presented as timestamp
Example:
{
"id": "NAr0y2TfKdtty8TDzQChitTLxDzmkKHOUr",
"status": "new",
"event": "payment_request.captured",
"data": {
"payment_request": {
"id": "PRAlocCdnZU3nYT0GMrGvBaPQcZ2EqAE",
"payer": {
"name": "Jon",
"full_name": "Jon Snow",
"email": "jon@snow.com",
"account_number": "401200XXXXXX1112"
},
"price_paid": {
"amount": "1.00",
"currency": "EUR"
},
"gateway_key": "demo",
"first_payment": {
"id": "PAlKTQI1GIUopJwY3iQd9eQubMxlzjD"
},
"is_email_correct": true,
"authorization_url": "https://checkout-frontend/payment-request/PRAlocCdnZU3nYT0GMrGvBaPQcZ2EqAE",
"price": {
"amount": "1.00",
"currency": "EUR"
},
"locale": null,
"business_id": "ibkXXj4Tn2mvJm1zqrH8UCvJqeCaL5Qy",
"order_id": "84e5d03b-3a5f-4bfc-8b97-e8d7c89ef218",
"unique_identifier": null,
"valid_until": null,
"description": "RA72452214 Payment nr 84e5d03b-3a5f-4bfc-8b97-e8d7c89ef218 in site MyShop",
"method_key": "card",
"method_country": null,
"accept_url": "https://localhost/accept",
"cancel_url": "https://localhost/cancel",
"callback_url": "https://localhost/callback",
"affiliate_key": null,
"parameters": {
"version": "1.7"
},
"status": "captured",
"token_strategy": "required",
"created_at": 1681463651,
"issued_token": "successful_token_xxxx"
}
},
"created_at": 1681463681
}
Secured by MAC
Headers
-
Authorization:
required (string)
The MAC token, eg 'MAC id="checkout", ts="1606825369", nonce="lnq4tOoiOOqll6SnkMgFeo7K5bsr8XWj", mac="3+nwOCTuwvpuiFyTh9VtcY62gtez8uECo5L+u6zIzdA=", ext=""'
HTTP status code 401
Authentication problem (MAC not set)
Body
Media type: application/json
Type: object
Properties-
error:
required (string)
Error code
-
error_description:
required (string)
Human readable error description
Example:
{
"error": "unauthorized",
"error_description": "You have not provided any credentials or they are invalid"
}
HTTP status code 403
Access denied due to invalid access rights
Body
Media type: application/json
Type: object
Properties-
error:
required (string)
Error code
-
error_description:
required (string)
Human readable error description
Example:
{
"error": "unauthorized",
"error_description": "You have not provided any credentials or they are invalid"
}