Squarepay API
  1. Webhooks
Squarepay API
  • Authentication
    • Test Authentication
      POST
  • PayTo
    • Agreements
      • Create Agreement
      • List Agreements
      • Show Agreement
      • Show Agreement History
    • Agreement Actions
      • Cancel Agreement
    • Payments
      • Create Payment
      • List Payments
      • Show Payment
      • Retry Payment
  • Webhook Subscriptions
    • Create Webhook Subscription
      POST
    • List Webhook Subscriptions
      GET
    • Update Webhook Subscription
      PUT
    • Delete Webhook Subscription
      DELETE
  • Webhooks
    • List Webhooks
      GET
    • Show Webhook
      GET
    • Resend Webhook
      POST
  1. Webhooks

List Webhooks

GET
/webhooks
payto

Request

Authorization
Send your HTTP requests with an
Authorization
header that contains the word Basic followed by a space and a base64-encoded string username:password
Example:
Authorization: Basic *****************
Query Params
webhook_subscription_id
string 
optional
Search by the webhook subscription id
Example:
7e9f4299-6049-4c11-abed-dcdb27102e33
webhook_status
string 
optional
PENDING, SUCCCESSFUL, RETRYING, FAILED
Example:
FAILED
event_type
string 
optional
eg. payto_payment.cleared, payto_agreement.activated
Example:
payto_payment.cleared
after
string 
optional
Filter webhooks after a specified date_filter (inclusive). If after is provided then date_filter must be included in the request, Date format yyyy-mm-dd
Example:
2024-02-16
before
string 
optional
Filter webhooks before a specified date_filter (inclusive). If before is provided then date_filter must be included in the request, Date format yyyy-mm-dd
Example:
2024-02-16
on
string 
optional
Filter webhooks on the specified date_filter date. If on is provided then date_filter must be included in the request, Date format yyyy-mm-dd
Example:
2024-02-16
page
integer 
optional
Index pointing to the start of the desired set, first page is 1. Page defaults to 1.
Example:
1
limit
integer 
optional
Number of records to return, defaults to 100.
Example:
100
Header Params
Accept
string 
optional
Example:
application/json

Request samples

Shell
JavaScript
Java
Swift
Go
PHP
Python
HTTP
C
C#
Objective-C
Ruby
OCaml
Dart
R
Request Request Example
Shell
JavaScript
Java
Swift
curl --location --request GET 'https://api-sandbox.squarepay.com.au/v2/webhooks?webhook_subscription_id=7e9f4299-6049-4c11-abed-dcdb27102e33&webhook_status=FAILED&event_type=payto_payment.cleared&after=2024-02-16&before=2024-02-16&on=2024-02-16&page=1&limit=100' \
--header 'Accept: application/json' \
--header 'Authorization: Basic Og=='

Responses

🟢200OK
application/json
Body
data
array[object (Webhook) {7}] 
required
webhook_id
string 
required
webhook_subscription_id
string 
required
<= 36 characters
event_type
enum<string> 
required
Allowed values:
direct_debit.cleareddirect_debit.faileddisbursement.cleareddisbursement.faileddisbursement.change_railsdisbursement.cancelledpayid.activatedpayid.failedpayid.disabledpayid.deregisteredpayto_agreement.activatedpayto_agreement.declinedpayto_agreement.expiredpayto_agreement.failedpayto_agreement.cancelledpayto_agreement.reactivatedpayto_agreement.suspendedpayto_agreement.amendedpayto_payment.clearedpayto_payment.failedpayto_payment.under_investigationreceivable.cleared
event_ref_id
string 
required
This is the Identifier of the resource.
>= 1 characters<= 512 characters
webhook_date
string 
required
webhook_status
enum<string> 
required
Allowed values:
PENDINGSUCCESSFULRETRYINGFAILEDCANCELLED
response_status_code
integer  | null 
required
HTTP response status code.
Example
{
  "data": [
    {
      "webhook_id": "2b4288d1-ad24-4e02-8916-0f5694a40ff7",
      "webhook_subscription_id": "7e9f4299-6049-4c11-abed-dcdb27102e33",
      "webhook_status": "SUCCESSFUL",
      "response_status_code": 200,
      "event_type": "payto_payment.cleared",
      "event_ref_id": "94968d84-6551-446d-9ceb-bad3ca62e8b7",
      "webhook_date": "2024-02-16T14:30:22"
    }
  ]
}
🟠401Unauthorised
🟠422Unprocessable Entity
🔴500Server Error
Previous
Delete Webhook Subscription
Next
Show Webhook
Built with