- Authentication
- PayTo
- Agreements
- Agreement Actions
- Payments
- Webhook Subscriptions
- Webhooks
Show Webhook
GET
/webhooks/{webhook_id}
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 *****************
Path Params
webhook_id
string
required
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/' \
--header 'Accept: application/json' \
--header 'Authorization: Basic Og=='
Responses
🟢200OK
application/json
Body
data
object (SingleWebhook)
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
>= 1 characters<= 512 characters
webhook_date
string
required
payload
object (Payment)
required
webhook_status
enum<string>
required
Allowed values:
PENDINGSUCCESSFULRETRYINGFAILEDCANCELLED
response_status_code
integer | null
required
webhook_request_date
string | null
required
webhook_request_body
string | null
required
webhook_request_headers
object | null
required
webhook_response_date
string | null
required
webhook_response_body
string | null
required
webhook_response_headers
string | null
required
Example
{
"data": {
"webhook_id": "2b4288d1-ad24-4e02-8916-0f5694a40ff7",
"webhook_subscription_id": "7e9f4299-6049-4c11-abed-dcdb27102e33",
"webhook_status": "CANCELLED",
"response_status_code": 200,
"event_type": "payto_payment.cleared",
"event_ref_id": "94968d84-6551-446d-9ceb-bad3ca62e8b7",
"webhook_date": "2024-02-16T14:30:22",
"payload": {
"uuid": "ad9234b0-0a5b-4078-9d7f-115b819c636f",
"reference": "Loan1337-1",
"agreement_uuid": "2e9d9df0-5c70-4bdf-b031-1caa64121602",
"amount": 10000,
"priority": "unattended",
"statement_reference": "Loan #1337",
"statement_description": "Loan Payment 1 of 10",
"last_payment": true,
"payment_date": "2024-02-01"
},
"webhook_request_date": "2024-02-16T14:30:24",
"webhook_request_body": "{\\\"data\\\":{\\\"webhook_id\\\":\\\"2b4288d1-ad24-4e02-8916-0f5694a40ff7\\\",\\\"webhook_subscription_id\\\":\\\"7e9f4299-6049-4c11-abed-dcdb27102e33\\\",\\\"event_type\\\":\\\"payid.failed\\\",\\\"event_ref_id\\\":\\\"94968d84-6551-446d-9ceb-bad3ca62e8b7\\\",\\\"webhook_date\\\":\\\"2024-02-16T14:30:22\\\",\\\"payload\\\":{\\\"uuid\\\":\\\"c83fa816-6d71-4aae-b6be-44e7124468b7\\\",\\\"reference\\\":\\\"Loan1337-1\\\",\\\"agreement_uuid\\\":\\\"2e9d9df0-5c70-4bdf-b031-1caa64121602\\\",\\\"amount\\\":10000,\\\"priority\\\":\\\"unattended\\\",\\\"statement_reference\\\":\\\"Loan #1337\\\",\\\"statement_description\\\":\\\"Loan Payment 1 of 10\\\",\\\"last_payment\\\":true,\\\"payment_date\\\":\\\"2024-02-01\\\"}}}",
"webhook_request_headers": {
"Content-Type": "application/json",
"X-Signature-SHA256": "LfqR8ybCT0ZIINMMZVc2KBfei8t3JXnGzu8f+3suvSw=",
"X-Signature-Timestamp": "1685865753"
},
"webhook_response_date": "2024-02-16T14:30:25",
"webhook_response_body": "{\\\"success\\\":true}",
"webhook_response_headers": null
}
}
🟠401Unauthorised
🟠404Not Found
🔴500Server Error