This page is part of the legacy Bridge Cards API. For new integrations, use the consumer issuing guide instead.
Consider carefully before enabling. Due to the constraints of on-chain transactions, card authorizations operate within a tight latency window. Adding real-time authorization introduces additional latency that may result in increased timeout rates and declined transactions. We recommend enabling this feature only if your use case requires real-time decisioning that cannot be achieved through Bridge’s built-in authorization controls.
Overview
Real-time authorization allows you to make custom approval or decline decisions during card transactions. When a cardholder attempts to make a purchase, Bridge calls your webhook endpoint synchronously, enabling you to apply your own business logic before the transaction is approved or declined.
This gives you fine-grained control over card spending, such as:
- Custom spending limits and velocity controls
- Merchant category restrictions
- Geographic restrictions
- Fraud detection and risk scoring
Real-time authorization is optional. If not configured, Bridge will authorize transactions based on available balance and other built-in controls.
Quick Start
- Set up an HTTPS endpoint that can handle POST requests
- Configure your webhook URL via the Bridge API
- Implement signature verification for security
- Return authorization decisions within the timeout window
How It Works
When a card is used for a purchase, the following flow occurs:
- Card network receives transaction: The cardholder initiates a purchase
- Bridge receives authorization request: The card network sends the authorization to Bridge
- Bridge calls your webhook: Bridge forwards the authorization details to your configured endpoint
- Your decision: Your webhook returns an approve or decline decision
- Bridge responds to network: Bridge relays your decision back to the card network
- Transaction completes: The purchase is approved or declined
Even if your webhook returns approved: true, the transaction may still be declined if the total end-to-end latency exceeds the card network’s timeout. You will be informed of the final authorization result through the regular card transaction webhooks.
Webhook Request
When a card transaction requires authorization, Bridge sends a POST request to your configured webhook URL.
| Header | Description |
|---|
X-Webhook-Signature | RSA signature for payload verification |
Content-Type | application/json |
Request Body Example
Field Reference
Top-level Fields
| Field | Type | Description |
|---|
event_id | string (UUID) | Unique identifier for this authorization request |
api_version | string | API version of the payload schema |
timestamp | string (ISO-8601) | UTC timestamp when the event was generated |
data | object | Authorization data (see below) |
Data Object
| Field | Type | Description |
|---|
authorization_id | string (UUID) | Unique identifier for this authorization |
auth_type | string | Type of authorization: auth or incremental_auth |
partial_supported | boolean | Whether the merchant supports partial authorization |
network | string | Card network: visa, mastercard, discover, amex |
international | boolean | Whether this is a cross-border transaction |
original_authorization_id | string/null | Reference to original auth for incremental authorizations |
transaction_id | string (UUID) | Card transaction identifier |
account.last_4 | string | Last 4 digits of the card PAN |
currency | string | Transaction currency (ISO-4217) |
amount | string | Transaction amount (negative for purchases) |
billing_amount | string | Amount in billing currency |
cashback_amount | string | Requested cashback amount |
card_account_id | string (UUID) | Bridge card account identifier |
customer_id | string (UUID) | Bridge customer identifier |
created_at | string (ISO-8601) | When the authorization was initiated |
Merchant Object
| Field | Type | Description |
|---|
description | string/null | Merchant name/descriptor |
postal_code | string/null | Merchant postal/ZIP code |
state | string/null | Merchant state/province code |
country | string/null | Merchant country code |
category | string/null | MCC category name |
category_code | string | Merchant Category Code (MCC) |
Local Transaction Details
| Field | Type | Description |
|---|
amount | string | Amount in merchant’s local currency |
currency | string | Merchant’s local currency code |
exchange_rate | string | Conversion rate from local to billing currency |
Verification Data
| Field | Type | Values |
|---|
cvv_check | string | match, mismatch, not_provided |
address_check | string | match, mismatch, not_provided |
address_postal_code_check | string | match, mismatch, not_provided |
pin_check | string/null | verified, failed, blocked, locked, not_set, no_pin_passed |
three_d_secure_check | string/null | attempt_acknowledged, authenticated, failed, required |
Entry Method Values
| Value | Description |
|---|
chip | EMV chip transaction |
contactless | NFC/contactless transaction |
swipe | Magnetic stripe transaction |
manual | Manually keyed transaction |
online | E-commerce transaction |
other | Other entry method |
Wallet Values
| Value | Description |
|---|
apple_pay | Apple Pay |
google_pay | Google Pay |
samsung_pay | Samsung Pay |
other | Other digital wallet |
null | Physical card (no wallet) |
Webhook Response
Your webhook must return a JSON response with HTTP status code 200.
| Header | Value |
|---|
Content-Type | application/json |
Response Body
| Field | Required | Type | Description |
|---|
approved | Yes | boolean | true to approve, false to decline |
balance | No | object | Current user balance on your platform |
decision_reason | No | string | Human-readable reason for the decision |
Response Examples
Security
HTTPS Requirement
Your webhook endpoint must use HTTPS. HTTP endpoints are not supported.
Signature Verification
Every webhook request includes an RSA signature in the X-Webhook-Signature header using the format:
You should verify this signature to ensure request authenticity and freshness.
Verification Steps
- Extract the timestamp (
t) and signature (v0) from the header
- Check that the timestamp is recent (reject events older than 10 minutes)
- Create the signed payload string:
{timestamp}.{raw_request_body}
- Verify the RSA signature using Bridge’s public key
Bridge’s public key is provided when you configure your webhook endpoint. You can retrieve it via the webhook settings API.
Timeouts and Fallback Behavior
Timeout Configuration
The default timeout for webhook responses is 500ms. If your webhook doesn’t respond within this window:
- Bridge stops waiting for your response
- The configured fallback behavior is applied
- The transaction continues based on fallback settings
Fallback Modes
| Mode | Description |
|---|
DECLINE | Automatically decline the transaction (default) |
APPROVE | Automatically approve the transaction |
The default fallback mode is DECLINE. This means if your webhook is slow or unavailable, transactions will be declined. Consider your use case carefully before changing to APPROVE.
Retrieve Current Settings
Response:
Create Webhook Configuration
Update Webhook Configuration
Update webhook URL:
Disable webhook:
Webhook Handler Integration
Here’s a complete example webhook handler in Python:
Test your webhook integration thoroughly in the sandbox environment before going live. Simulate various scenarios including timeouts, errors, and edge cases.