A webhook endpoint must have a url and a list of enabled_events.
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 *****************
Header Params
Body Params application/json
Example
{"description":"This is your description of the webhook","enabled_events":["payment_intent.succeeded","payment_intent.payment_failed","charge.refund.updated","charge.dispute.updated"],"url":"https://your_call_back_address.com"}
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 POST 'https://apitest.wooshpay.com/v1/webhook_endpoints' \
--header'Accept;' \
--header'Content-Type: application/json' \
--header'Authorization: Basic Og==' \
--data-raw'{
"description": "This is your description of the webhook",
"enabled_events": [
"payment_intent.succeeded",
"payment_intent.payment_failed",
"charge.refund.updated",
"charge.dispute.updated"
],
"url": "https://your_call_back_address.com"
}'
Responses
🟢200OK
application/json
Body
Example
{"id":"we_1M3fqHHTdYyGj2Y6LeGVaamQ","object":"webhook_endpoint","api_version":null,"created":1668344601,"description":"This is my webhook, I like it a lot","enabled_events":["payment_intent.succeeded","payment_intent.payment_failed","charge.refund.updated","charge.dispute.updated"],"livemode":false,"metadata":{},"status":"enabled","url":"https://example.com/my/webhook/endpoint","secret":"whsec_9rMfZUGWM3gTTBtn0f8kPEfmiIJCmzQi"}