Skip to main content
POST
Create a Webhook
Use this endpoint to register a webhook URL that VelaFi will call when a specific event type occurs. Each registration is scoped to one event type, so create separate webhooks for each event you want to receive. A request is rejected while an active webhook already exists for that event type. Webhooks belong to your account, so one webhook receives its event for every merchant under the account. The response includes a publicKey you must store — it is used to verify the RSA-SHA256 signature on all subsequent webhook deliveries for this endpoint.
All requests must include the X-BH-TOKEN header and Content-Type: application/json. Store the publicKey from the response securely. It is also returned by List Webhooks.

Endpoint

POST https://api.velafi.com/v2/webhook

Request Parameters

string
required
The event type this webhook should receive. Accepted values:
  • ORDER_WEBHOOK — fiat/crypto order status changes
  • GLOBAL_PAYMENT_WEBHOOK — fiat/fiat global payment status changes
  • FUNDING_WEBHOOK — Pending Fund account activity
  • ON_RAMP_WITHDRAW_WEBHOOK — the crypto withdrawal to the destination wallet of a completed API on-ramp order succeeded
  • STABLE_COIN_PAYMENT_WEBHOOK — a stablecoin payment order was confirmed
  • CRYPTO_WITHDRAW_WEBHOOK — a crypto withdrawal from a merchant wallet succeeded, failed, or was cancelled
string
required
The publicly accessible URL to which VelaFi will POST event notifications. It must start with http. Use an https:// URL.

Response Fields

number
HTTP-style response code. 200 indicates success.
string
Human-readable status message, e.g. SUCCESS.
object

Example

cURL
Response
If you lose the publicKey, retrieve it with List Webhooks. See Webhook Setup for how to use the public key to verify incoming requests.