GET
/
webhook-subscriptions
/
{subscription_id}
Get webhook subscription
package main

import (
	"fmt"
	"net/http"
	"io"
)

func main() {

	url := "https://api.sandbox.{id}.gr4vy.app/webhook-subscriptions/{subscription_id}"

	req, _ := http.NewRequest("GET", url, nil)

	req.Header.Add("Authorization", "Bearer <token>")

	res, _ := http.DefaultClient.Do(req)

	defer res.Body.Close()
	body, _ := io.ReadAll(res.Body)

	fmt.Println(res)
	fmt.Println(string(body))

}
{
  "id": "ef9496d8-53a5-4aad-8ca2-00eb68334389",
  "type": "webhook-subscription",
  "merchant_account_id": "default",
  "active": true,
  "url": "https://www.gr4vy.com/webhooks",
  "authentication": {
    "kind": "basic",
    "password": "super-strong-password",
    "username": "gr4vy"
  },
  "secret": "234567890abcdef1234567890abcdef",
  "rotating": false,
  "creator": {
    "email_address": "jhon.doe@gr4vy.com",
    "id": "07e70d14-a0c0-4ff5-bd4a-509959af0e4d",
    "name": "Jhon Doe"
  }
}
This endpoint requires the webhook-subscriptions.read scope.

Authorizations

Authorization
string
header
required

Bearer authentication header of the form Bearer <token>, where <token> is your auth token.

Headers

x-gr4vy-merchant-account-id
string | null

The ID of the merchant account to use for this request.

Examples:

"default"

Path Parameters

subscription_id
string<uuid>
required

The ID of the webhook subscription

Examples:

"ef9496d8-53a5-4aad-8ca2-00eb68334389"

Response

200
application/json

Successful Response

The response is of type object.