> For the complete documentation index, see [llms.txt](https://docs.gobtcpay.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.gobtcpay.com/api-reference/merchant-api/webhooks.md).

# Webhooks

Configure outbound webhook endpoints (URL, scope, signing secret) so your backend is notified when a payment's status changes — an alternative to polling Get payment.

## Create webhook

> Registers a webhook endpoint. Provide the destination \`url\` and a \`scope\` (\`merchant\` for the whole account, or \`store\` / \`pos\` to narrow delivery); \`events\` defaults to all event types. The response includes the \`signingSecret\` \*\*shown only once\*\* — store it to verify the \`X-GoBTCPay-Signature\` header on incoming deliveries.

```json
{"openapi":"3.1.0","info":{"title":"GoBTC Pay Merchant Account API","version":"1.45.2"},"tags":[{"name":"Webhooks","description":"Configure outbound webhook endpoints (URL, scope, signing secret) so your backend is notified when a payment's status changes — an alternative to polling Get payment."}],"servers":[{"url":"https://api.gobtcpay.com/public/api/v1.1"}],"security":[{"merchantAuth":[]}],"components":{"securitySchemes":{"merchantAuth":{"type":"http","scheme":"bearer","bearerFormat":"JWT","description":"Merchant dashboard access token obtained from `/merchant/auth/login` (or the OAuth / passkey / 2FA login flows). Send it as `Authorization: Bearer <accessToken>`. Refresh it via `/merchant/auth/refresh` when it expires."}}},"paths":{"/merchant/webhook/create":{"post":{"summary":"Create webhook","description":"Registers a webhook endpoint. Provide the destination `url` and a `scope` (`merchant` for the whole account, or `store` / `pos` to narrow delivery); `events` defaults to all event types. The response includes the `signingSecret` **shown only once** — store it to verify the `X-GoBTCPay-Signature` header on incoming deliveries.","tags":["Webhooks"],"parameters":[],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"url":{"type":"string","description":"Destination URL that receives webhook deliveries."},"scope":{"anyOf":[{"type":"object","properties":{"type":{"type":"string","const":"merchant"}},"required":["type"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","const":"store"},"storeId":{"type":"string"}},"required":["type","storeId"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","const":"pos"},"posTerminalId":{"type":"string","description":"Identifier of the POS terminal (UUID)."}},"required":["type","posTerminalId"],"additionalProperties":false}],"description":"Which payments this endpoint receives: `merchant` (whole account), or `store` / `pos` to narrow delivery to one store or terminal."},"events":{"type":"array","items":{"type":"string","enum":["payment.status.updated"]},"description":"Event types this endpoint is subscribed to."},"label":{"type":"string","description":"Human-readable label for the POS terminal (optional)."}},"required":["url","scope"],"additionalProperties":false,"$schema":"http://json-schema.org/draft-07/schema#"}}}},"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string"},"result":{"type":"object","properties":{"$case":{"type":"string","const":"success"},"success":{"type":"object","properties":{"webhook":{"type":"object","properties":{"id":{"type":"string"},"merchantId":{"type":"string","description":"Identifier of the merchant (UUID)."},"url":{"type":"string","description":"Destination URL that receives webhook deliveries."},"scope":{"anyOf":[{"type":"object","properties":{"type":{"type":"string","const":"merchant"}},"required":["type"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","const":"store"},"storeId":{"type":"string"}},"required":["type","storeId"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","const":"pos"},"posTerminalId":{"type":"string","description":"Identifier of the POS terminal (UUID)."}},"required":["type","posTerminalId"],"additionalProperties":false}],"description":"Which payments this endpoint receives: `merchant` (whole account), or `store` / `pos` to narrow delivery to one store or terminal."},"events":{"type":"array","items":{"type":"string","enum":["payment.status.updated"]},"description":"Event types this endpoint is subscribed to."},"status":{"type":"string","enum":["active","disabled"],"description":"Current status. Payments: `initiated` / `paid` / `failed` / `expired` / `canceled` / `cleared`. Payment transactions: `success` / `failed` / `pending` / `cleared`."},"label":{"type":["string","null"],"description":"Human-readable label for the POS terminal (optional)."},"createdAt":{"type":"integer","minimum":0,"description":"Creation time as a Unix timestamp (seconds)."},"updatedAt":{"type":"integer","minimum":0,"description":"UnixTime (seconds since epoch)"},"signingSecret":{"type":"string","description":"Per-endpoint secret used to verify the `X-GoBTCPay-Signature` header. Returned only on create — store it securely."}},"required":["id","merchantId","url","scope","events","status","label","createdAt","updatedAt","signingSecret"],"additionalProperties":false}},"required":["webhook"],"additionalProperties":false}},"required":["$case","success"],"additionalProperties":false}},"required":["id","result"],"additionalProperties":false,"$schema":"http://json-schema.org/draft-07/schema#"}}}},"500":{"description":"Error response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"statusCode":{"type":"number","description":"Numeric error status code."},"description":{"type":"string","description":"Human-readable description."},"statusMessage":{"type":"string","description":"Short machine-readable error message."}},"required":["statusCode","description","statusMessage"],"additionalProperties":false}},"required":["error"],"additionalProperties":false,"$schema":"http://json-schema.org/draft-07/schema#"}}}}}}}}}
```

## List webhooks

> Lists the merchant's webhook endpoints with optional \`pagination\` and a \`status\` filter. Returns \`items\` and \`totalCount\`. The \`signingSecret\` is never included.

```json
{"openapi":"3.1.0","info":{"title":"GoBTC Pay Merchant Account API","version":"1.45.2"},"tags":[{"name":"Webhooks","description":"Configure outbound webhook endpoints (URL, scope, signing secret) so your backend is notified when a payment's status changes — an alternative to polling Get payment."}],"servers":[{"url":"https://api.gobtcpay.com/public/api/v1.1"}],"security":[{"merchantAuth":[]}],"components":{"securitySchemes":{"merchantAuth":{"type":"http","scheme":"bearer","bearerFormat":"JWT","description":"Merchant dashboard access token obtained from `/merchant/auth/login` (or the OAuth / passkey / 2FA login flows). Send it as `Authorization: Bearer <accessToken>`. Refresh it via `/merchant/auth/refresh` when it expires."}}},"paths":{"/merchant/webhook/list":{"post":{"summary":"List webhooks","description":"Lists the merchant's webhook endpoints with optional `pagination` and a `status` filter. Returns `items` and `totalCount`. The `signingSecret` is never included.","tags":["Webhooks"],"parameters":[],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"pagination":{"type":"object","properties":{"limit":{"type":"number","minimum":1,"maximum":100,"default":20},"skip":{"type":"number","minimum":0,"default":0}},"additionalProperties":false},"filters":{"type":"object","properties":{"status":{"type":"string","enum":["active","disabled"],"description":"Current status. Payments: `initiated` / `paid` / `failed` / `expired` / `canceled` / `cleared`. Payment transactions: `success` / `failed` / `pending` / `cleared`."}},"additionalProperties":false}},"additionalProperties":false,"$schema":"http://json-schema.org/draft-07/schema#"}}}},"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string"},"result":{"type":"object","properties":{"$case":{"type":"string","const":"success"},"success":{"type":"object","properties":{"items":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"merchantId":{"type":"string","description":"Identifier of the merchant (UUID)."},"url":{"type":"string","description":"Destination URL that receives webhook deliveries."},"scope":{"anyOf":[{"type":"object","properties":{"type":{"type":"string","const":"merchant"}},"required":["type"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","const":"store"},"storeId":{"type":"string"}},"required":["type","storeId"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","const":"pos"},"posTerminalId":{"type":"string","description":"Identifier of the POS terminal (UUID)."}},"required":["type","posTerminalId"],"additionalProperties":false}],"description":"Which payments this endpoint receives: `merchant` (whole account), or `store` / `pos` to narrow delivery to one store or terminal."},"events":{"type":"array","items":{"type":"string","enum":["payment.status.updated"]},"description":"Event types this endpoint is subscribed to."},"status":{"type":"string","enum":["active","disabled"],"description":"Current status. Payments: `initiated` / `paid` / `failed` / `expired` / `canceled` / `cleared`. Payment transactions: `success` / `failed` / `pending` / `cleared`."},"label":{"type":["string","null"],"description":"Human-readable label for the POS terminal (optional)."},"createdAt":{"type":"integer","minimum":0,"description":"Creation time as a Unix timestamp (seconds)."},"updatedAt":{"type":"integer","minimum":0,"description":"UnixTime (seconds since epoch)"}},"required":["id","merchantId","url","scope","events","status","label","createdAt","updatedAt"],"additionalProperties":false}},"totalCount":{"type":"number","description":"Total number of records matching the filters."}},"required":["items","totalCount"],"additionalProperties":false}},"required":["$case","success"],"additionalProperties":false}},"required":["id","result"],"additionalProperties":false,"$schema":"http://json-schema.org/draft-07/schema#"}}}},"500":{"description":"Error response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"statusCode":{"type":"number","description":"Numeric error status code."},"description":{"type":"string","description":"Human-readable description."},"statusMessage":{"type":"string","description":"Short machine-readable error message."}},"required":["statusCode","description","statusMessage"],"additionalProperties":false}},"required":["error"],"additionalProperties":false,"$schema":"http://json-schema.org/draft-07/schema#"}}}}}}}}}
```

## Get webhook

> Fetches a single webhook endpoint by \`webhookId\`. The \`signingSecret\` is not returned — rotate it to obtain a new one.

```json
{"openapi":"3.1.0","info":{"title":"GoBTC Pay Merchant Account API","version":"1.45.2"},"tags":[{"name":"Webhooks","description":"Configure outbound webhook endpoints (URL, scope, signing secret) so your backend is notified when a payment's status changes — an alternative to polling Get payment."}],"servers":[{"url":"https://api.gobtcpay.com/public/api/v1.1"}],"security":[{"merchantAuth":[]}],"components":{"securitySchemes":{"merchantAuth":{"type":"http","scheme":"bearer","bearerFormat":"JWT","description":"Merchant dashboard access token obtained from `/merchant/auth/login` (or the OAuth / passkey / 2FA login flows). Send it as `Authorization: Bearer <accessToken>`. Refresh it via `/merchant/auth/refresh` when it expires."}}},"paths":{"/merchant/webhook/get":{"post":{"summary":"Get webhook","description":"Fetches a single webhook endpoint by `webhookId`. The `signingSecret` is not returned — rotate it to obtain a new one.","tags":["Webhooks"],"parameters":[],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"webhookId":{"type":"string"}},"required":["webhookId"],"additionalProperties":false,"$schema":"http://json-schema.org/draft-07/schema#"}}}},"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string"},"result":{"type":"object","properties":{"$case":{"type":"string","const":"success"},"success":{"type":"object","properties":{"webhook":{"type":"object","properties":{"id":{"type":"string"},"merchantId":{"type":"string","description":"Identifier of the merchant (UUID)."},"url":{"type":"string","description":"Destination URL that receives webhook deliveries."},"scope":{"anyOf":[{"type":"object","properties":{"type":{"type":"string","const":"merchant"}},"required":["type"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","const":"store"},"storeId":{"type":"string"}},"required":["type","storeId"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","const":"pos"},"posTerminalId":{"type":"string","description":"Identifier of the POS terminal (UUID)."}},"required":["type","posTerminalId"],"additionalProperties":false}],"description":"Which payments this endpoint receives: `merchant` (whole account), or `store` / `pos` to narrow delivery to one store or terminal."},"events":{"type":"array","items":{"type":"string","enum":["payment.status.updated"]},"description":"Event types this endpoint is subscribed to."},"status":{"type":"string","enum":["active","disabled"],"description":"Current status. Payments: `initiated` / `paid` / `failed` / `expired` / `canceled` / `cleared`. Payment transactions: `success` / `failed` / `pending` / `cleared`."},"label":{"type":["string","null"],"description":"Human-readable label for the POS terminal (optional)."},"createdAt":{"type":"integer","minimum":0,"description":"Creation time as a Unix timestamp (seconds)."},"updatedAt":{"type":"integer","minimum":0,"description":"UnixTime (seconds since epoch)"}},"required":["id","merchantId","url","scope","events","status","label","createdAt","updatedAt"],"additionalProperties":false}},"required":["webhook"],"additionalProperties":false}},"required":["$case","success"],"additionalProperties":false}},"required":["id","result"],"additionalProperties":false,"$schema":"http://json-schema.org/draft-07/schema#"}}}},"500":{"description":"Error response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"statusCode":{"type":"number","description":"Numeric error status code."},"description":{"type":"string","description":"Human-readable description."},"statusMessage":{"type":"string","description":"Short machine-readable error message."}},"required":["statusCode","description","statusMessage"],"additionalProperties":false}},"required":["error"],"additionalProperties":false,"$schema":"http://json-schema.org/draft-07/schema#"}}}}}}}}}
```

## Update webhook

> Updates the \`url\`, \`scope\`, \`events\`, \`status\` (active / disabled), and/or \`label\` of the webhook identified by \`webhookId\`. Returns the updated endpoint; the \`signingSecret\` is not re-issued.

```json
{"openapi":"3.1.0","info":{"title":"GoBTC Pay Merchant Account API","version":"1.45.2"},"tags":[{"name":"Webhooks","description":"Configure outbound webhook endpoints (URL, scope, signing secret) so your backend is notified when a payment's status changes — an alternative to polling Get payment."}],"servers":[{"url":"https://api.gobtcpay.com/public/api/v1.1"}],"security":[{"merchantAuth":[]}],"components":{"securitySchemes":{"merchantAuth":{"type":"http","scheme":"bearer","bearerFormat":"JWT","description":"Merchant dashboard access token obtained from `/merchant/auth/login` (or the OAuth / passkey / 2FA login flows). Send it as `Authorization: Bearer <accessToken>`. Refresh it via `/merchant/auth/refresh` when it expires."}}},"paths":{"/merchant/webhook/update":{"post":{"summary":"Update webhook","description":"Updates the `url`, `scope`, `events`, `status` (active / disabled), and/or `label` of the webhook identified by `webhookId`. Returns the updated endpoint; the `signingSecret` is not re-issued.","tags":["Webhooks"],"parameters":[],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"webhookId":{"type":"string"},"url":{"type":"string","description":"Destination URL that receives webhook deliveries."},"scope":{"anyOf":[{"type":"object","properties":{"type":{"type":"string","const":"merchant"}},"required":["type"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","const":"store"},"storeId":{"type":"string"}},"required":["type","storeId"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","const":"pos"},"posTerminalId":{"type":"string","description":"Identifier of the POS terminal (UUID)."}},"required":["type","posTerminalId"],"additionalProperties":false}],"description":"Which payments this endpoint receives: `merchant` (whole account), or `store` / `pos` to narrow delivery to one store or terminal."},"events":{"type":"array","items":{"type":"string","enum":["payment.status.updated"]},"description":"Event types this endpoint is subscribed to."},"status":{"type":"string","enum":["active","disabled"],"description":"Current status. Payments: `initiated` / `paid` / `failed` / `expired` / `canceled` / `cleared`. Payment transactions: `success` / `failed` / `pending` / `cleared`."},"label":{"type":"string","description":"Human-readable label for the POS terminal (optional)."}},"required":["webhookId"],"additionalProperties":false,"$schema":"http://json-schema.org/draft-07/schema#"}}}},"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string"},"result":{"type":"object","properties":{"$case":{"type":"string","const":"success"},"success":{"type":"object","properties":{"webhook":{"type":"object","properties":{"id":{"type":"string"},"merchantId":{"type":"string","description":"Identifier of the merchant (UUID)."},"url":{"type":"string","description":"Destination URL that receives webhook deliveries."},"scope":{"anyOf":[{"type":"object","properties":{"type":{"type":"string","const":"merchant"}},"required":["type"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","const":"store"},"storeId":{"type":"string"}},"required":["type","storeId"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","const":"pos"},"posTerminalId":{"type":"string","description":"Identifier of the POS terminal (UUID)."}},"required":["type","posTerminalId"],"additionalProperties":false}],"description":"Which payments this endpoint receives: `merchant` (whole account), or `store` / `pos` to narrow delivery to one store or terminal."},"events":{"type":"array","items":{"type":"string","enum":["payment.status.updated"]},"description":"Event types this endpoint is subscribed to."},"status":{"type":"string","enum":["active","disabled"],"description":"Current status. Payments: `initiated` / `paid` / `failed` / `expired` / `canceled` / `cleared`. Payment transactions: `success` / `failed` / `pending` / `cleared`."},"label":{"type":["string","null"],"description":"Human-readable label for the POS terminal (optional)."},"createdAt":{"type":"integer","minimum":0,"description":"Creation time as a Unix timestamp (seconds)."},"updatedAt":{"type":"integer","minimum":0,"description":"UnixTime (seconds since epoch)"}},"required":["id","merchantId","url","scope","events","status","label","createdAt","updatedAt"],"additionalProperties":false}},"required":["webhook"],"additionalProperties":false}},"required":["$case","success"],"additionalProperties":false}},"required":["id","result"],"additionalProperties":false,"$schema":"http://json-schema.org/draft-07/schema#"}}}},"500":{"description":"Error response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"statusCode":{"type":"number","description":"Numeric error status code."},"description":{"type":"string","description":"Human-readable description."},"statusMessage":{"type":"string","description":"Short machine-readable error message."}},"required":["statusCode","description","statusMessage"],"additionalProperties":false}},"required":["error"],"additionalProperties":false,"$schema":"http://json-schema.org/draft-07/schema#"}}}}}}}}}
```

## Delete webhook

> Deletes the webhook endpoint identified by \`webhookId\`. Returns \`{ ok }\`.

```json
{"openapi":"3.1.0","info":{"title":"GoBTC Pay Merchant Account API","version":"1.45.2"},"tags":[{"name":"Webhooks","description":"Configure outbound webhook endpoints (URL, scope, signing secret) so your backend is notified when a payment's status changes — an alternative to polling Get payment."}],"servers":[{"url":"https://api.gobtcpay.com/public/api/v1.1"}],"security":[{"merchantAuth":[]}],"components":{"securitySchemes":{"merchantAuth":{"type":"http","scheme":"bearer","bearerFormat":"JWT","description":"Merchant dashboard access token obtained from `/merchant/auth/login` (or the OAuth / passkey / 2FA login flows). Send it as `Authorization: Bearer <accessToken>`. Refresh it via `/merchant/auth/refresh` when it expires."}}},"paths":{"/merchant/webhook/delete":{"post":{"summary":"Delete webhook","description":"Deletes the webhook endpoint identified by `webhookId`. Returns `{ ok }`.","tags":["Webhooks"],"parameters":[],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"webhookId":{"type":"string"}},"required":["webhookId"],"additionalProperties":false,"$schema":"http://json-schema.org/draft-07/schema#"}}}},"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string"},"result":{"type":"object","properties":{"$case":{"type":"string","const":"success"},"success":{"type":"object","properties":{"ok":{"type":"boolean"}},"required":["ok"],"additionalProperties":false}},"required":["$case","success"],"additionalProperties":false}},"required":["id","result"],"additionalProperties":false,"$schema":"http://json-schema.org/draft-07/schema#"}}}},"500":{"description":"Error response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"statusCode":{"type":"number","description":"Numeric error status code."},"description":{"type":"string","description":"Human-readable description."},"statusMessage":{"type":"string","description":"Short machine-readable error message."}},"required":["statusCode","description","statusMessage"],"additionalProperties":false}},"required":["error"],"additionalProperties":false,"$schema":"http://json-schema.org/draft-07/schema#"}}}}}}}}}
```

## Rotate webhook secret

> Rotates the signing secret for the webhook identified by \`webhookId\`, invalidating the previous secret and returning a fresh \`signingSecret\` (shown only once).

```json
{"openapi":"3.1.0","info":{"title":"GoBTC Pay Merchant Account API","version":"1.45.2"},"tags":[{"name":"Webhooks","description":"Configure outbound webhook endpoints (URL, scope, signing secret) so your backend is notified when a payment's status changes — an alternative to polling Get payment."}],"servers":[{"url":"https://api.gobtcpay.com/public/api/v1.1"}],"security":[{"merchantAuth":[]}],"components":{"securitySchemes":{"merchantAuth":{"type":"http","scheme":"bearer","bearerFormat":"JWT","description":"Merchant dashboard access token obtained from `/merchant/auth/login` (or the OAuth / passkey / 2FA login flows). Send it as `Authorization: Bearer <accessToken>`. Refresh it via `/merchant/auth/refresh` when it expires."}}},"paths":{"/merchant/webhook/rotate-secret":{"post":{"summary":"Rotate webhook secret","description":"Rotates the signing secret for the webhook identified by `webhookId`, invalidating the previous secret and returning a fresh `signingSecret` (shown only once).","tags":["Webhooks"],"parameters":[],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"webhookId":{"type":"string"}},"required":["webhookId"],"additionalProperties":false,"$schema":"http://json-schema.org/draft-07/schema#"}}}},"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string"},"result":{"type":"object","properties":{"$case":{"type":"string","const":"success"},"success":{"type":"object","properties":{"signingSecret":{"type":"string","description":"The freshly rotated signing secret. Returned once — store it securely."}},"required":["signingSecret"],"additionalProperties":false}},"required":["$case","success"],"additionalProperties":false}},"required":["id","result"],"additionalProperties":false,"$schema":"http://json-schema.org/draft-07/schema#"}}}},"500":{"description":"Error response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"statusCode":{"type":"number","description":"Numeric error status code."},"description":{"type":"string","description":"Human-readable description."},"statusMessage":{"type":"string","description":"Short machine-readable error message."}},"required":["statusCode","description","statusMessage"],"additionalProperties":false}},"required":["error"],"additionalProperties":false,"$schema":"http://json-schema.org/draft-07/schema#"}}}}}}}}}
```

## Send test event

> Dispatches a sample \`payment.status.updated\` delivery to the endpoint identified by \`webhookId\` so you can verify your receiver and signature validation. Returns \`{ ok }\` once the test delivery is queued.

```json
{"openapi":"3.1.0","info":{"title":"GoBTC Pay Merchant Account API","version":"1.45.2"},"tags":[{"name":"Webhooks","description":"Configure outbound webhook endpoints (URL, scope, signing secret) so your backend is notified when a payment's status changes — an alternative to polling Get payment."}],"servers":[{"url":"https://api.gobtcpay.com/public/api/v1.1"}],"security":[{"merchantAuth":[]}],"components":{"securitySchemes":{"merchantAuth":{"type":"http","scheme":"bearer","bearerFormat":"JWT","description":"Merchant dashboard access token obtained from `/merchant/auth/login` (or the OAuth / passkey / 2FA login flows). Send it as `Authorization: Bearer <accessToken>`. Refresh it via `/merchant/auth/refresh` when it expires."}}},"paths":{"/merchant/webhook/test":{"post":{"summary":"Send test event","description":"Dispatches a sample `payment.status.updated` delivery to the endpoint identified by `webhookId` so you can verify your receiver and signature validation. Returns `{ ok }` once the test delivery is queued.","tags":["Webhooks"],"parameters":[],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"webhookId":{"type":"string"}},"required":["webhookId"],"additionalProperties":false,"$schema":"http://json-schema.org/draft-07/schema#"}}}},"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string"},"result":{"type":"object","properties":{"$case":{"type":"string","const":"success"},"success":{"type":"object","properties":{"ok":{"type":"boolean"}},"required":["ok"],"additionalProperties":false}},"required":["$case","success"],"additionalProperties":false}},"required":["id","result"],"additionalProperties":false,"$schema":"http://json-schema.org/draft-07/schema#"}}}},"500":{"description":"Error response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"statusCode":{"type":"number","description":"Numeric error status code."},"description":{"type":"string","description":"Human-readable description."},"statusMessage":{"type":"string","description":"Short machine-readable error message."}},"required":["statusCode","description","statusMessage"],"additionalProperties":false}},"required":["error"],"additionalProperties":false,"$schema":"http://json-schema.org/draft-07/schema#"}}}}}}}}}
```


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter, and the optional `goal` query parameter:

```
GET https://docs.gobtcpay.com/api-reference/merchant-api/webhooks.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
