POST
/
api
/
v1
/
webhook_subscription
curl --request POST \
  --url https://checkout.suave.money/api/v1/webhook_subscription \
  --header 'Content-Type: application/json' \
  --data '{
  "webhook_url": "<string>",
  "env_mode": "live"
}'
{
  "message": "Successfully registered webhook endpoint in test|live mode for {vendor_name}.",
  "data": {
    "webhook_id": "ep_2k4DQEpnKDxp1TcvsNIRiKDBQtj",
    "webhook_url": "webhook endpoint url",
    "env_mode": "test",
    "created_at": "2024-08-01T17:38:56.892Z",
    "updated_at": "2024-08-01T17:38:56.892Z"
  }
}

Body

application/json
webhook_url
string
env_mode
enum<string>
default:live

The env_mode parameter allows you to specify whether the webhook is intended for testing or production environments.

Available options:
test,
live

Response

200 - application/json
Subscription created successfully
message
string
Example:

"Successfully registered webhook endpoint in test|live mode for {vendor_name}."

data
object