PaySwitch
PaySwitch API Reference

Event

Server

Manage events


Events - List

POST
https://paysw-wiki.lab.next-on.pro/dev-router
/events/{merchant_id}
api-key (header)

List all Events associated with a Merchant Account or Profile.

Events - List › path Parameters

merchant_id
​string · required

The unique identifier for the Merchant Account.

Events - List › Request Body

The constraints to apply when filtering events.
created_after
​string | null · date-time

Filter events created after the specified time.

created_before
​string | null · date-time

Filter events created before the specified time.

limit
​integer | null · int32 · min: 0

Include at most the specified number of events.

offset
​integer | null · int32 · min: 0

Include events after the specified offset.

object_id
​string | null

Filter all events associated with the specified object identifier (Payment Intent ID, Refund ID, etc.)

event_id
​string | null

Filter all events associated with the specified Event_id

profile_id
​string | null

Filter all events associated with the specified business profile ID.

event_classes
​array | null · unique

Filter events by their class.

Enum values:
payments
refunds
disputes
mandates
payouts
subscriptions
event_types
​array | null · unique

Filter events by their type.

Enum values:
payment_succeeded
payment_failed
payment_processing
payment_cancelled
payment_cancelled_post_capture
payment_authorized
payment_partially_authorized
payment_captured
is_delivered
​boolean | null

Filter all events by is_overall_delivery_successful field of the event.

Events - List › Responses

200

List of Events retrieved successfully

The response body of list initial delivery attempts api call.
​EventListItemResponse[] · required

The list of events

total_count
​integer · int64 · required

Count of total events


Events - List

POST
https://paysw-wiki.lab.next-on.pro/dev-router
/events/profile/list
Bearer (JWT)

List all Events associated with a Profile.

Events - List › Request Body

The constraints to apply when filtering events.
created_after
​string | null · date-time

Filter events created after the specified time.

created_before
​string | null · date-time

Filter events created before the specified time.

limit
​integer | null · int32 · min: 0

Include at most the specified number of events.

offset
​integer | null · int32 · min: 0

Include events after the specified offset.

object_id
​string | null

Filter all events associated with the specified object identifier (Payment Intent ID, Refund ID, etc.)

event_id
​string | null

Filter all events associated with the specified Event_id

profile_id
​string | null

Filter all events associated with the specified business profile ID.

event_classes
​array | null · unique

Filter events by their class.

Enum values:
payments
refunds
disputes
mandates
payouts
subscriptions
event_types
​array | null · unique

Filter events by their type.

Enum values:
payment_succeeded
payment_failed
payment_processing
payment_cancelled
payment_cancelled_post_capture
payment_authorized
payment_partially_authorized
payment_captured
is_delivered
​boolean | null

Filter all events by is_overall_delivery_successful field of the event.

Events - List › Responses

200

List of Events retrieved successfully

The response body of list initial delivery attempts api call.
​EventListItemResponse[] · required

The list of events

total_count
​integer · int64 · required

Count of total events


Events - Delivery Attempt List

GET
https://paysw-wiki.lab.next-on.pro/dev-router
/events/{merchant_id}/{event_id}/attempts
api-key (header)

List all delivery attempts for the specified Event.

Events - Delivery Attempt List › path Parameters

merchant_id
​string · required

The unique identifier for the Merchant Account.

event_id
​string · required

The unique identifier for the Event

Events - Delivery Attempt List › Responses

200

List of delivery attempts retrieved successfully

The response body for retrieving an event.
event_id
​string · maxLength: 64 · required

The identifier for the Event.

Example: evt_018e31720d1b7a2b82677d3032cab959
merchant_id
​string · maxLength: 64 · required

The identifier for the Merchant Account.

Example: y3oqhf46pyzuxjbcn2giaqnb44
profile_id
​string · maxLength: 64 · required

The identifier for the Business Profile.

Example: SqB0zwDGR5wHppWf0bx7GKr1f2
object_id
​string · maxLength: 64 · required

The identifier for the object (Payment Intent ID, Refund ID, etc.)

Example: QHrfd5LUDdZaKtAjdJmMu0dMa1
event_type
​EventType · enum · required
Enum values:
payment_succeeded
payment_failed
payment_processing
payment_cancelled
payment_cancelled_post_capture
payment_authorized
payment_partially_authorized
payment_captured
event_class
​EventClass · enum · required
Enum values:
payments
refunds
disputes
mandates
payouts
subscriptions
initial_attempt_id
​string · maxLength: 64 · required

The identifier for the initial delivery attempt. This will be the same as event_id for the initial delivery attempt.

Example: evt_018e31720d1b7a2b82677d3032cab959
created
​string · date-time · required

Time at which the event was created.

Example: 2022-09-10T10:11:12Z
​OutgoingWebhookRequestContent · required

The request information (headers and body) sent in the webhook.

​OutgoingWebhookResponseContent · required

The response information (headers, body and status code) received for the webhook sent.

is_delivery_successful
​boolean | null

Indicates whether the webhook was ultimately delivered or not.

delivery_attempt
​string · enum
Enum values:
initial_attempt
automatic_retry
manual_retry

Events - Manual Retry

POST
https://paysw-wiki.lab.next-on.pro/dev-router
/events/{merchant_id}/{event_id}/retry
api-key (header)

Manually retry the delivery of the specified Event.

Events - Manual Retry › path Parameters

merchant_id
​string · required

The unique identifier for the Merchant Account.

event_id
​string · required

The unique identifier for the Event

Events - Manual Retry › Responses

200

The delivery of the Event was attempted. Check the response field in the response payload to identify the status of the delivery attempt.

The response body for retrieving an event.
event_id
​string · maxLength: 64 · required

The identifier for the Event.

Example: evt_018e31720d1b7a2b82677d3032cab959
merchant_id
​string · maxLength: 64 · required

The identifier for the Merchant Account.

Example: y3oqhf46pyzuxjbcn2giaqnb44
profile_id
​string · maxLength: 64 · required

The identifier for the Business Profile.

Example: SqB0zwDGR5wHppWf0bx7GKr1f2
object_id
​string · maxLength: 64 · required

The identifier for the object (Payment Intent ID, Refund ID, etc.)

Example: QHrfd5LUDdZaKtAjdJmMu0dMa1
event_type
​EventType · enum · required
Enum values:
payment_succeeded
payment_failed
payment_processing
payment_cancelled
payment_cancelled_post_capture
payment_authorized
payment_partially_authorized
payment_captured
event_class
​EventClass · enum · required
Enum values:
payments
refunds
disputes
mandates
payouts
subscriptions
initial_attempt_id
​string · maxLength: 64 · required

The identifier for the initial delivery attempt. This will be the same as event_id for the initial delivery attempt.

Example: evt_018e31720d1b7a2b82677d3032cab959
created
​string · date-time · required

Time at which the event was created.

Example: 2022-09-10T10:11:12Z
​OutgoingWebhookRequestContent · required

The request information (headers and body) sent in the webhook.

​OutgoingWebhookResponseContent · required

The response information (headers, body and status code) received for the webhook sent.

is_delivery_successful
​boolean | null

Indicates whether the webhook was ultimately delivered or not.

delivery_attempt
​string · enum
Enum values:
initial_attempt
automatic_retry
manual_retry