Webhooks
Subscribe to real-time events from Airwallex organisations or accounts via webhooks.
The event types available to you are limited by the API key scopes granted to the API key used in your authentication.
POST /api/v1/webhooks/createGET /api/v1/webhooks/{id}POST /api/v1/webhooks/{id}/updatePOST /api/v1/webhooks/{id}/deleteGET /api/v1/webhooks
Create a webhook
POST /api/v1/webhooks/create
Creates a new Webhook and subscribes to a list of webhook events from Airwallex.
A list of events subscribed by this webhook. Events cannot be modified after creation. Only events matching your API key scopes are allowed.
A unique request identifier specified by the client for idempotency. Up to 50 characters.
The endpoint where events are sent to.
The API version which controls the event payload structure. It should be in YYYY-MM-DD format, e.g. 2022-11-11.
The time when this webhook was created.
A list of events subscribed by this webhook. Events cannot be modified after creation. Only events matching your API key scopes are allowed.
The unique identifier of the Webhook object.
A unique request identifier specified by the client for idempotency. Up to 50 characters.
The secret to verify that events are sent from Airwallex. See this guide for details.
The time when this webhook was last updated.
The endpoint where events are sent to.
The API version which controls the event payload structure. It should be in YYYY-MM-DD format, e.g. 2022-11-11.
| Error status | Description |
|---|---|
| 400 | Possible errors: |
| 401 | Possible errors: |
| 409 | Possible errors: |
| 429 | Too many requests |
| 500 | Service unavailable |
$curl --request POST \> --url 'https://api.sandbox.airwallex.com/api/v1/webhooks/create' \> --header 'Authorization: Bearer {{ACCESS_TOKEN}}' \> --header 'Content-Type: application/json' \> --data '{> "url": "https://www.airwallex.com",> "version": "2022-11-11",> "events": [> "account.active",> "account.connected",> "account.suspended"> ],> "request_id": "c238a67b-75ae-446f-919c-e62c2a577631">}'
1{2 "id": "wh_E6JwepZbKpppjYftl3JUEXPI-ocQiSHS",3 "url": "https://www.airwallex.com",4 "secret": "whsec_RBS_GKogxv5PAdFUPABg94kjjLGRW50I",5 "version": "2022-11-11",6 "events": [7 "account.active",8 "account.connected",9 "account.suspended"10 ],11 "created_at": "2022-12-23T02:57:29+0000",12 "updated_at": "2022-12-23T02:57:29+0000",13 "request_id": "c238a67b-75ae-446f-919c-e62c2a577631"14}
Retrieve a webhook
GET /api/v1/webhooks/{id}
Retrieves the details of a Webhook.
Unique identifier of the Webhook object.
The time when this webhook was created.
A list of events subscribed by this webhook. Events cannot be modified after creation. Only events matching your API key scopes are allowed.
The unique identifier of the Webhook object.
A unique request identifier specified by the client for idempotency. Up to 50 characters.
The secret to verify that events are sent from Airwallex. See this guide for details.
The time when this webhook was last updated.
The endpoint where events are sent to.
The API version which controls the event payload structure. It should be in YYYY-MM-DD format, e.g. 2022-11-11.
| Error status | Description |
|---|---|
| 400 | Possible errors: |
| 401 | Possible errors: |
| 404 | The requested resource doesn't exist |
| 429 | Too many requests |
| 500 | Service unavailable |
$curl --request GET \> --url 'https://api.sandbox.airwallex.com/api/v1/webhooks/webhook_id' \> --header 'Authorization: Bearer {{ACCESS_TOKEN}}' \> --header 'Content-Type: application/json'
1{2 "id": "wh_E6JwepZbKpppjYftl3JUEXPI-ocQiSHS",3 "url": "https://www.airwallex.com",4 "secret": "whsec_RBS_GKogxv5PAdFUPABg94kjjLGRW50I",5 "version": "2022-11-11",6 "events": [7 "account.active",8 "account.connected",9 "account.suspended"10 ],11 "created_at": "2022-12-23T02:57:29+0000",12 "updated_at": "2022-12-23T02:57:29+0000",13 "request_id": "c238a67b-75ae-446f-919c-e62c2a577631"14}
Update a webhook
POST /api/v1/webhooks/{id}/update
Updates the attributes of an existing Webhook. Only updates to url are currently supported.
Unique identifier of the Webhook object.
The endpoint where events are sent to.
The time when this webhook was created.
A list of events subscribed by this webhook. Events cannot be modified after creation. Only events matching your API key scopes are allowed.
The unique identifier of the Webhook object.
A unique request identifier specified by the client for idempotency. Up to 50 characters.
The secret to verify that events are sent from Airwallex. See this guide for details.
The time when this webhook was last updated.
The endpoint where events are sent to.
The API version which controls the event payload structure. It should be in YYYY-MM-DD format, e.g. 2022-11-11.
| Error status | Description |
|---|---|
| 400 | Possible errors: |
| 401 | Possible errors: |
| 404 | The requested resource doesn't exist |
| 429 | Too many requests |
| 500 | Service unavailable |
$curl --request POST \> --url 'https://api.sandbox.airwallex.com/api/v1/webhooks/webhook_id/update' \> --header 'Authorization: Bearer {{ACCESS_TOKEN}}' \> --header 'Content-Type: application/json' \> --data '{> "url": "https://www.airwallex.com">}'
1{2 "id": "wh_E6JwepZbKpppjYftl3JUEXPI-ocQiSHS",3 "url": "https://www.airwallex.com",4 "secret": "whsec_RBS_GKogxv5PAdFUPABg94kjjLGRW50I",5 "version": "2022-11-11",6 "events": [7 "account.active",8 "account.connected",9 "account.suspended"10 ],11 "created_at": "2022-12-23T02:57:29+0000",12 "updated_at": "2022-12-23T02:57:29+0000",13 "request_id": "c238a67b-75ae-446f-919c-e62c2a577631"14}
Delete a webhook
POST /api/v1/webhooks/{id}/delete
Deletes a Webhook. A deleted webhook will no longer receive webhook events of any Airwallex organisations or accounts.
Unique identifier of the Webhook object.
Whether the webhook was successfully deleted
Unique identifier of the Webhook object.
| Error status | Description |
|---|---|
| 400 | Possible errors: |
| 401 | Possible errors: |
| 404 | The requested resource doesn't exist |
| 429 | Too many requests |
| 500 | Service unavailable |
$curl --request POST \> --url 'https://api.sandbox.airwallex.com/api/v1/webhooks/webhook_id/delete' \> --header 'Authorization: Bearer {{ACCESS_TOKEN}}' \> --header 'Content-Type: application/json'
1{2 "id": "wh_E6JwepZbKpppjYftl3JUEXPI-ocQiSHS",3 "deleted": false4}
Get a list of webhooks
GET /api/v1/webhooks
Retrieves a list of Webhooks.
A bookmark for use in pagination to retrieve either the next page or the previous page of results. You can fetch the value for this identifier from the response of the previous API call. To retrieve the next page of results, pass the value of page_after (if not null) from the response to a subsequent call. To retrieve the previous page of results, pass the value of page_before (if not null) from the response to a subsequent call.
Number of Webhooks per page. Defaults to 20.
Paged results.
The time when this webhook was created.
A list of events subscribed by this webhook. Events cannot be modified after creation. Only events matching your API key scopes are allowed.
The unique identifier of the Webhook object.
A unique request identifier specified by the client for idempotency. Up to 50 characters.
The secret to verify that events are sent from Airwallex. See this guide for details.
The time when this webhook was last updated.
The endpoint where events are sent to.
The API version which controls the event payload structure. It should be in YYYY-MM-DD format, e.g. 2022-11-11.
The page cursor used for searching after page.
The page cursor used for searching before page.
| Error status | Description |
|---|---|
| 400 | Possible errors: |
| 401 | Possible errors: |
| 429 | Too many requests |
| 500 | Service unavailable |
$curl --request GET \> --url 'https://api.sandbox.airwallex.com/api/v1/webhooks' \> --header 'Authorization: Bearer {{ACCESS_TOKEN}}' \> --header 'Content-Type: application/json'
1{2 "items": [3 {4 "id": "wh_E6JwepZbKpppjYftl3JUEXPI-ocQiSHS",5 "url": "https://www.airwallex.com",6 "secret": "whsec_RBS_GKogxv5PAdFUPABg94kjjLGRW50I",7 "version": "2022-11-11",8 "events": [9 "account.active",10 "account.connected",11 "account.suspended"12 ],13 "created_at": "2022-12-23T02:57:29+0000",14 "updated_at": "2022-12-23T02:57:29+0000",15 "request_id": "c238a67b-75ae-446f-919c-e62c2a577631"16 }17 ],18 "page_before": "<string>",19 "page_after": "<string>"20}