Skip to content
Authorization<token>

Use a public key (pk./pk_test.) for payment initialization. Use a secret key (sk./sk_test.) for sensitive operations (transfers, refunds, balance), or a restricted key (rk./rk_test.) scoped to specific permissions. The _test. variant of any key selects the sandbox environment — there is no separate sandbox URL. Never expose your secret key in client-side code.

In: header

Request Body

application/json

TypeScript Definitions

Use the request body type in TypeScript.

url*string

Must be a valid URL. Must not be greater than 2048 characters.

events?array<string>

Must not be greater than 100 characters.

description?string | null

Must not be greater than 500 characters.

Response Body

application/json

application/json

curl -X POST "https://example.com/webhooks" \  -H "Content-Type: application/json" \  -d '{    "url": "http://www.bailey.biz/quos-velit-et-fugiat-sunt-nihil-accusantium-harum.html"  }'
POST
/webhooks
{
  "code": 201,
  "endpoint": {
    "id": "wh_01JXXX",
    "url": "https://example.com/webhooks/wajub",
    "secret": "whsec_…",
    "events": [
      "payment.succeeded"
    ]
  }
}
{
  "code": 422,
  "errors": {
    "url": [
      "The url must be a valid URL."
    ]
  }
}