Handle Airwallex webhook events
POST
/webhooks/airwallex/{siteId}/{accountId}
Path Parameters
- siteIdstringrequired
- accountIdstringrequired
Header Parameters
- x-timestampstringrequired
- x-signaturestringrequired
Responses
201
401
curl
curl --request POST \
--url /webhooks/airwallex/{siteId}/{accountId} \
--header 'accept: application/json' \
--header 'x-timestamp: string' \
--header 'x-signature: string'javascript
var myHeaders = new Headers();
myHeaders.append("accept", "application/json");
myHeaders.append("content-type", "application/json");
myHeaders.append("x-timestamp", "string");
myHeaders.append("x-signature", "string");
var requestOptions = {
method: 'POST',
headers: myHeaders,
redirect: 'follow'
};
fetch("/webhooks/airwallex/{siteId}/{accountId}", requestOptions)
.then(response => response.text())
.then(result => console.log(result))
.catch(error => console.log('error', error));ruby
require "uri"
require "json"
require "net/http"
url = URI("/webhooks/airwallex/{siteId}/{accountId}")
http = Net::HTTP.new(url.host, url.port);
request = Net::HTTP::Post.new(url)
request["accept"] = "application/json"
request["content-type"] = "application/json"
request["x-timestamp"] = "string"
request["x-signature"] = "string"
response = http.request(request)
puts response.read_body
python
import requests
import json
url = "/webhooks/airwallex/{siteId}/{accountId}"
payload = {}
headers = {
'accept': 'application/json',
'content-type': 'application/json',
'x-timestamp': 'string',
'x-signature': 'string'
}
response = requests.request("POST", url, headers=headers, data=payload)
print(response.text)
201
401
// Unauthorized