Webhook
WooshPay Webhooks
url
and enabled_events
url
To which Wooshpay sends an http requestenabled_events
An event coresponds to transaction creation or status change. You specify those events that you'd like to be notifed.Steps to Create and Receive Webhooks
1.
2.
3.
2xx
response status codes.4.
5.
How to create a webhook endpoint
Step 1. Identify the events to monitor
Step 2: Create a webhook
{
"url": "https://apitest.wooshpay.com/v1/receives",
"description": "I am description",
"enabled_events": [
"payment_intent.created",
"payment_intent.payment_failed",
"payment_intent.requires_action",
"payment_intent.succeeded",
"payment_intent.canceled",
"charge.refund.updated"
],
"api_version": "1.0.1"
}
{
"id": "we_1600745739909070848",
"object": "webhook_endpoint",
"created": 1670482499000,
"description": "I am description",
"metadata": null,
"secret": "c2tfdGVzdF9kR1Z6ZERwMFpYTjBNVEl6TkRVMjo=",
"status": "enabled",
"url": "https://apitest.wooshpay.com/v1/receives",
"livemode": false,
"api_version": "1.0.1",
"enabled_events": [
"payment_intent.created",
"payment_intent.payment_failed",
"payment_intent.requires_action",
"payment_intent.succeeded",
"payment_intent.canceled",
"charge.refund.updated"
]
}
Step 3: Handle requests from WooshPay
Your endpoint must quickly return a successful status code (2xx) prior to any complex logic that could cause a timeout.
Delivery attempts and retries
In live and test mode, WooshPay attempts to deliver your webhooks for up to three days with an exponential back off, which means in total we will deliver 18 times in 72 hours.
In live and test mode, WooshPay will attempt to notify you of any unsuccessful webhooks via email if an endpoint has not responded with a 2xx HTTP status code. The email will not only tell you the URL that cannot be delivered, but also when we will stop deliver the webhooks, and also the best way for you to reach us.
What the event your server receive looks like
This is a
payment_intent.succeeded
event.{
"id": "evt_1705940809180720000",
"object": "event",
"created": 1702715524825,
"livemode": false,
"data": {
"object": {
"id": "pi_17059408432822016",
"object": "payment_intent",
"created": 1702715520000,
"livemode": true,
"currency": "EUR",
"amount": 6838,
"status": "succeeded",
"metadata": {
"pay_no": "6222623493518490"
},
"merchant_order_id": "6222623493518490",
"client_secret": "pi_17359408432822016_secret_1NFdn5Rsfm0udwLIaWnK",
"payment_method_types": [
"card"
],
"confirmation_method": "automatic",
"payment_method_options": {
"card": {
"client": "android",
"request_three_d_secure": "void"
}
},
"return_url": "https://pay.fordddd.com/v1/payment/redirect/wooshpay/622262349473518490",
"payment_method": "pm_17359484348464",
"amount_received": 6838,
"capture_method": "automatic"
}
},
"type": "payment_intent.succeeded"
}
Modified at 2024-01-25 09:28:28