# Read Subscription Bot Provider Webhook Setup

> Read payment-provider webhook setup status and instructions for your Telegram or Discord subscription bot with an unrestricted project API key.

Source: https://docs.botsubscription.com/api/merchant-accounts/verify-webhook/

Read setup status and instructions for payment-provider notifications to your <strong>Telegram subscription bot</strong> or <strong>Discord subscription bot</strong>. Custom integrations use the separate [outbound webhook API](https://docs.botsubscription.com/webhooks/overview/).

<ApiEndpoint method="POST" endpoint="/v2/projects/{project_id}/merchant-accounts/{merchant_account_id}/verify-webhook" />

<ApiAuthorization type="Bearer API Key" />

**API key access:** Unrestricted project API key required. Restricted keys cannot call this endpoint.

<ApiSection title="Path Parameters">
  <ApiParameter name="project_id" type="string" required description="The UUID of the project." />
  <ApiParameter name="merchant_account_id" type="string" required description="The merchant account UUID." />
</ApiSection>

## Read setup status

Send an empty body or `{}`. This reads stored or derived status; it does not contact the provider or send a test delivery.

Project API keys cannot override verification and never receive stored webhook signing secrets. Configure provider credentials and verification through your project dashboard. Use [Get Merchant Account](https://docs.botsubscription.com/api/merchant-accounts/get/) to refresh account details.

## Retry recovery

This endpoint uses the common [optional idempotency header](https://docs.botsubscription.com/api/overview/#idempotency-for-authenticated-writes), with a nonreplayable success response. If a completed keyed request returns `409 IDEMPOTENCY_RESPONSE_NOT_REPLAYABLE`, reconcile account state before issuing a new logical request.

<ApiSamplePane>

<ApiRequestSample title="Request">

```bash
curl -X POST "https://api.botsubscription.com/v2/projects/YOUR_PROJECT_ID/merchant-accounts/YOUR_ACCOUNT_ID/verify-webhook" \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{}'
```

```javascript
const response = await fetch("https://api.botsubscription.com/v2/projects/YOUR_PROJECT_ID/merchant-accounts/YOUR_ACCOUNT_ID/verify-webhook", {
  method: "POST",
  headers: { "Authorization": "Bearer YOUR_API_KEY" }
});
const result = await response.json();
```

```python
import requests

response = requests.post(
    "https://api.botsubscription.com/v2/projects/YOUR_PROJECT_ID/merchant-accounts/YOUR_ACCOUNT_ID/verify-webhook",
    headers={"Authorization": "Bearer YOUR_API_KEY"}
)
result = response.json()
```

```php
$ch = curl_init("https://api.botsubscription.com/v2/projects/YOUR_PROJECT_ID/merchant-accounts/YOUR_ACCOUNT_ID/verify-webhook");
curl_setopt($ch, CURLOPT_CUSTOMREQUEST, 'POST');
curl_setopt($ch, CURLOPT_HTTPHEADER, ['Authorization: Bearer YOUR_API_KEY']);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
$response = curl_exec($ch);
```

</ApiRequestSample>

<ApiResponseTabs>
  <ApiResponse status={200} description="Provider needs no manual webhook setup">

```json
{
  "ok": true,
  "request_id": "44444444-4444-4444-8444-444444444444",
  "method": "POST",
  "path": "/v2/projects/11111111-1111-4111-8111-111111111111/merchant-accounts/11111111-1111-4111-8111-111111111111/verify-webhook",
  "code": 200,
  "message": "Success",
  "data": {
    "merchant_account_id": "11111111-1111-4111-8111-111111111111",
    "webhook_verification": {
      "required": false,
      "mode": "none",
      "status": "not_required",
      "verification_method": null,
      "verification_supported": false,
      "can_mark_verified": false,
      "action_required": false
    }
  }
}
```

  </ApiResponse>
  <ApiResponse status={200} description="Manual provider setup is still pending">

```json
{
  "ok": true,
  "request_id": "44444444-4444-4444-8444-444444444444",
  "method": "POST",
  "path": "/v2/projects/11111111-1111-4111-8111-111111111111/merchant-accounts/22222222-2222-4222-8222-222222222222/verify-webhook",
  "code": 200,
  "message": "Webhook setup status retrieved",
  "data": {
    "merchant_account_id": "22222222-2222-4222-8222-222222222222",
    "webhook_setup": {
      "required": true,
      "mode": "manual",
      "status": "pending",
      "webhook_url": "https://api.example.com/v2/ipn/11111111-1111-4111-8111-111111111111/frisbii/22222222-2222-4222-8222-222222222222",
      "instructions": [
        {
          "step": 1,
          "text": "Open the Frisbii admin and go to Developers \u2192 Webhooks, or use the button below. New accounts have webhooks turned off; turn them on."
        },
        {
          "step": 2,
          "text": "Add the Webhook URL shown above to the webhook URL list. Keep any existing URLs: every listed URL receives each event."
        },
        {
          "step": 3,
          "text": "Select at least these events: invoice_authorized, invoice_settled, invoice_failed, invoice_cancelled, invoice_refund, invoice_refund_failed and every invoice_dispute event. Then save."
        },
        {
          "step": 4,
          "text": "Copy the webhook secret from the same page and paste it here with Enter Webhook Secret."
        },
        {
          "step": 5,
          "text": "After the secret is saved, resend a recent event from the webhook log (or make a test payment). The first signed delivery verifies this account."
        }
      ],
      "dashboard_url": "https://admin.frisbii.com/",
      "missing_credentials": [
        "frisbii_webhook_secret"
      ]
    },
    "webhook_verification": {
      "required": true,
      "mode": "manual",
      "status": "pending",
      "verification_method": "webhook_arrival",
      "verification_supported": true,
      "can_mark_verified": false,
      "action_required": true
    }
  }
}
```

  </ApiResponse>
  <ApiResponse status={422} description="Invalid merchant account ID">

```json
{
  "ok": false,
  "request_id": "44444444-4444-4444-8444-444444444444",
  "method": "POST",
  "path": "/v2/projects/11111111-1111-4111-8111-111111111111/merchant-accounts/not-a-uuid/verify-webhook",
  "code": 422,
  "errors": [
    {
      "message": "params: merchant_account_id Invalid UUID",
      "error_code": "VALIDATION_ERROR"
    }
  ]
}
```

  </ApiResponse>
  <ApiResponse status={404} description="Merchant account not found">

```json
{
  "ok": false,
  "request_id": "44444444-4444-4444-8444-444444444444",
  "method": "POST",
  "path": "/v2/projects/11111111-1111-4111-8111-111111111111/merchant-accounts/22222222-2222-4222-8222-222222222222/verify-webhook",
  "code": 404,
  "error": {
    "error_code": "NOT_FOUND",
    "message": "Merchant account not found"
  }
}
```

  </ApiResponse>
  <ApiResponse status={401} description="Invalid or expired API key">

```json
{
  "ok": false,
  "request_id": "44444444-4444-4444-8444-444444444444",
  "method": "POST",
  "path": "/v2/projects/11111111-1111-4111-8111-111111111111/merchant-accounts/22222222-2222-4222-8222-222222222222/verify-webhook",
  "code": 401,
  "error": {
    "message": "Invalid or expired authentication token.",
    "error_code": "UNAUTHORIZED"
  }
}
```

  </ApiResponse>
</ApiResponseTabs>

</ApiSamplePane>
