Main
/Payments
/Testing webhook
Copy page
To validate the signature from the webhook data array, use the payment API key.
To ensure that you are correctly receiving webhooks and can validate the signature, you should use this method to test webhooks for payment.
Please note that no data is saved to the database, and any data received in the webhook is only stored in an array for testing purposes to ensure the correctness of the signature and to test the retrieval of this array from us.
To test a webhook with an existing invoice, please provide its uuid or order ID. If these parameters are not provided, the webhook will be sent with a test invoice.
| Name | Parameter type | Default value | Definition |
|---|---|---|---|
| url_callback* | stringmin:6max:150url | URL to which webhooks with payment status will be sent | |
| currency* | string | Invoice currency code | |
| network* | string | Invoice network code | |
| uuid | stringuuid | random uuid string | uuid of the invoice |
| order_id | stringmin:1max:32alpha_dash | random string | Order ID of the invoice |
| status* | string | paid | Payment statusAvailable options:• process• check• paid• paid_over• fail• wrong_amount• cancel• system_fail• refund_process• refund_fail• refund_paid• locked |
* - mandatory parameter
curl https://api.heleket.com/v1/test-webhook/payment \
-X POST \
-H 'merchant: 860166ce-478c-4087-9813-55cfb6c34580' \
-H 'sign: a466b82fad9415cdbf5f47802b8d376c' \
-H 'Content-Type: application/json' \
-d '{
"uuid": "e1830f1b-50fc-432e-80ec-15b58ccac867",
"currency": "ETH",
"url_callback": "https://your.site/callback",
"network": "eth",
"status": "paid"
}'Copy
1{
2 "state": 0,
3 "result": []
4}CopyTo validate the signature from the webhook data array, use the payment API key.
| Name | Parameter type | Default value | Definition |
|---|---|---|---|
| url_callback* | stringmin:6max:150url | URL to which webhooks with payment status will be sent | |
| currency* | string | Payout currency code | |
| network* | string | Payout network code | |
| uuid | stringuuid | random uuid string | uuid of the payout |
| order_id | stringmin:1max:32alpha_dash | random string | Order ID of the payout |
| status* | string | paid | Payout statusAvailable options:• process• check• paid• fail• cancel• system_fail |
* - mandatory parameter
curl https://api.heleket.com/v1/test-webhook/payout \
-X POST -H 'merchant: 860166ce-478c-4087-9813-55cfb6c34580' \
-H 'sign: a466b82fad9415cdbf5f47802b8d376c' \
-H 'Content-Type: application/json' \
-d '{
"uuid": "e1830f1b-50fc-432e-80ec-15b58ccac867",
"currency": "ETH",
"url_callback": "https://your.site/callback",
"network": "eth",
"status": "paid"
}'Copy
1{
2 "state": 0,
3 "result": []
4}CopyTo validate the signature from the webhook data array, use the payment API key.
| Name | Parameter type | Default value | Definition |
|---|---|---|---|
| url_callback* | stringmin:6max:150url | URL to which webhooks with payment status will be sent | |
| currency* | string | Payment currency code | |
| network* | string | Payment network code | |
| uuid | stringuuid | random uuid string | uuid of business walletRequired if order_id is missing |
| order_id | stringmin:1max:32alpha_dash | random string | Order ID of the invoiceRequired if uuid is missing |
| status* | string | paid | Payment statusAvailable options:• process• check• paid• paid_over• fail• wrong_amount• cancel• system_fail• refund_process• refund_fail• refund_paid• locked |
* - mandatory parameter
curl https://api.heleket.com/v1/test-webhook/wallet \
-X POST -H 'merchant: 860166ce-478c-4087-9813-55cfb6c34580' \
-H 'sign: a466b82fad9415cdbf5f47802b8d376c' \
-H 'Content-Type: application/json' \
-d '{
"uuid": "e1830f1b-50fc-432e-80ec-15b58ccac867",
"currency": "ETH",
"url_callback": "https://your.site/callback",
"network": "eth",
"status": "paid"
}'Copy
1{
2 "state": 0,
3 "result": []
4}Copycode : 422
example responses:
If you pass uuid or order_id and invoice/static wallet/payout is not found:
1{
2 "state": 1,
3 "message": "Not found payment"
4}Copy
1{
2 "state": 1,
3 "message": "Not found payout"
4}Copy
1{
2 "state": 1,
3 "message": "Not found wallet"
4}CopyIf you don’t pass the required parameters:
1{
2 "state": 1,
3 "errors": {
4 "currency": ["validation.required"]
5 }
6}CopyIf the provided currency and network are not crypto or not supported:
1{
2 "state": 1,
3 "message": "Payment service not found"
4}Copy
1{
2 "state": 1,
3 "message": "Payout service not found"
4}Copy