Authorization webhooks are an Enterprise feature. Contact Slash support to
turn them on.
Setting up
Create the webhookinactive with
PUT /v2/accounts/{accountId}/authorization-webhook,
so you can store its signingSecret before any request arrives:
status to active with
PATCH /v2/accounts/{accountId}/authorization-webhook.
The secret doesn’t change when the webhook does.
GET /v2/accounts/{accountId}/authorization-webhook
returns the current configuration. A webhook set up with v1 is the same
webhook here.
Requests
Slash sends each authorization towebhookUrl as a JSON POST:
transaction.id is the providerAuthorizationId of the resulting card
transaction. currencyConversion is only there when the merchant charged in
another currency; amount is always in USD. v1 webhooks receive the same
body, so its amounts are integer cents rather than v2’s Money.
Verifying requests
Every request carriesx-webhook-id, x-webhook-timestamp (Unix seconds)
and x-webhook-signature. Reject a request whose timestamp is more than two
minutes old. The signature is v1= followed by the base64 HMAC-SHA256 of
{x-webhook-id}.{x-webhook-timestamp}.{raw body}, keyed with signingSecret
base64-decoded after its whsec_ prefix:
Answering
Respond withintimeoutDurationMs with a 2xx status and a JSON body:
approved: true lets the authorization continue through Slash’s checks, and
false declines it. reason is optional and shows on the transaction in the
Slash dashboard.
Fallback
config decides an authorization your endpoint doesn’t answer: it times out,
returns a non-2xx status or a body without a boolean approved, or can’t
be reached, including when Slash can’t consult webhooks at all. reject
declines it. default lets it continue, or with when, only when it matches
and declines the rest: