testWebhook
Overview
This mutation takes in a Webhook Id and tests the webhook for functionality.
Special Considerations
None.
Inputs
TestWebhookArgs
Required Data
id: ID
Returns
Promise<TestWebhookResult>
A promise containing the following data:
payload: json
response: json
Example
Running this mutation:
mutation {
testWebhook(data: ckb9th6fv00cg0716rzpy15a6) {
payload
response
}
}
Gives us:
{
"data": {
"payload": {
"sub": "borderless webhook",
"iat": 1592399672,
"paymentId": "aaa111bbb222ccc333",
"amount": 590.27,
"currency": "USD",
"description": "A unique identifier or order number goes here",
"status": "TEST"
},
"response": "example text"
}
}
Common Errors
When running this mutation some of the common errors encountered include:
- Trouble posting test webhook to your system (I-2202w).
- There was a system error in testing the webhook. Validate the webhook ID.