Webhook Events

Detailed payload documentation for all Flintn webhook events.

Event Structure

All webhook events follow this structure:

{
  "event_type": "EVENT_TYPE",
  "event_id": "550e8400-e29b-41d4-a716-446655440000",
  "timestamp": "2024-01-15T10:30:00Z",
  "version": "1.0",
  "data": {
    // Event-specific payload
  }
}
Field
Type
Description

event_type

string

Event type (see below)

event_id

string

Unique event identifier (UUID)

timestamp

string

ISO 8601 timestamp when the event was created

version

string

Webhook payload version (currently "1.0")

data

object

Event-specific payload

Transaction Events

Transaction webhooks contain comprehensive transaction data including customer, card, and risk information.

TRANSACTION_PENDING

Sent when a transaction is created and pending processing.

TRANSACTION_AUTHORIZED

Sent when a transaction is successfully authorized.

TRANSACTION_SETTLED

Sent when a transaction is settled and funds transferred.

TRANSACTION_DECLINED

Sent when a transaction is declined.

TRANSACTION_FAILED

Sent when a transaction fails to process (system error, not a decline).

TRANSACTION_VOIDED

Sent when a transaction is voided (cancelled before settlement).

TRANSACTION_REFUNDED

Sent when a transaction is fully refunded.

TRANSACTION_PARTIALLY_REFUNDED

Sent when a transaction is partially refunded.

Subscription Events

Subscription webhooks contain detailed subscription information including plan details and payment history.

SUBSCRIPTION_ACTIVATED

Sent when a new subscription is activated after successful initial payment.

SUBSCRIPTION_RENEWED

Sent when a subscription successfully renews for a new billing period.

SUBSCRIPTION_CANCELLED

Sent when a subscription is cancelled immediately.

SUBSCRIPTION_CANCELLATION_SCHEDULED

Sent when a subscription cancellation is scheduled for the end of the current billing cycle.

SUBSCRIPTION_EXPIRED

Sent when a subscription expires (after failed retries or end of term).

SUBSCRIPTION_BILLING_RETRY

Sent when a billing retry attempt is made for a failed payment.

Transaction Data Field Reference

Core Fields

Field
Type
Description

id

UUID

Unique transaction identifier

payment_id

UUID

Associated payment identifier

merchant_id

UUID

Merchant identifier

amount

decimal

Transaction amount

currency

string

ISO 4217 currency code (e.g., "USD")

status

string

Transaction status

refunded_amount

decimal

Total amount refunded

description

string

Transaction description

descriptor

string

Transaction descriptor shown on statements

metadata

string

Additional transaction metadata as JSON

initiation_type

string

Payment initiation type (ECOMMERCE, SUBSCRIPTION_FIRST_TIME, SUBSCRIPTION_RENEWAL, UNSCHEDULED)

created_at

timestamp

When the transaction was created

updated_at

timestamp

When the transaction was last updated

settled_at

timestamp

When the transaction was settled (if applicable)

settle_after

timestamp

Scheduled automatic capture timestamp

version

integer

Optimistic locking version

Processor Fields

Field
Type
Description

processor

string

Payment processor (e.g., "STRIPE", "PRIMER")

processor_transaction_id

string

Processor's transaction ID

processor_merchant_id

string

Processor's merchant account ID

provider_transaction_id

string

External provider transaction ID

History

The history field contains a chronological array of status transitions throughout the transaction lifecycle. Each entry records a state change with the following fields:

Field
Type
Description

history[].created_at

timestamp

When this status transition occurred

history[].status

string

Transaction status at this point

history[].amount

decimal

Amount associated with this transition (e.g., refund amount)

history[].currency

string

ISO 4217 currency code

history[].processor_transaction_id

string

Processor-specific transaction ID for this transition

history[].processor

string

Payment processor name for this transition

Subscription Fields

Field
Type
Description

subscription_id

UUID

Associated subscription ID

subscription_plan_id

UUID

Subscription plan ID

subscription_plan_name

string

Plan name

subscription_plan_website_url

string

Plan website URL

subscription_type

string

Plan type (ONE_TIME, SUBSCRIPTION_NO_TRIAL, SUBSCRIPTION_FREE_TRIAL, SUBSCRIPTION_PAID_TRIAL)

subscription_renewal_retry_attempt

integer

Retry attempt number (null=non-renewal, 0=initial, 1+=retry)

Customer Data

Field
Type
Description

customer_data.customer_id

string

Merchant-provided customer identifier

customer_data.customer_email

string

Customer email address

customer_data.customer_mobile

string

Customer mobile phone number

customer_data.customer_first_name

string

Customer first name

customer_data.customer_last_name

string

Customer last name

customer_data.day_of_birth

date

Customer date of birth

customer_data.billing_country

string

Billing address country code (ISO 3166-1 alpha-2)

customer_data.billing_postal_code

string

Billing address postal code

customer_data.national_document_id

string

National ID or document number

customer_data.payer_email

string

Payer email if different from customer

customer_data.payer_first_name

string

Payer first name if different from customer

customer_data.payer_last_name

string

Payer last name if different from customer

Card Data

Field
Type
Description

card_data.card_first_6

string

First 6 digits (BIN)

card_data.card_last_4

string

Last 4 digits

card_data.card_fingerprint_hash

string

Hashed card fingerprint for deduplication

card_data.card_brand

string

Card brand (VISA, MASTERCARD, etc.)

card_data.card_funding_type

string

DEBIT, CREDIT, PREPAID

card_data.card_country

string

Card issuing country code (ISO 3166-1 alpha-2)

card_data.cardholder_name

string

Cardholder name

card_data.card_exp_month

integer

Expiration month (1-12)

card_data.card_exp_year

integer

Expiration year (4 digits)

card_data.payment_method

string

Payment method type (PAYMENT_CARD, GOOGLE_PAY, APPLE_PAY, PAYPAL, BANK_ACCOUNT)

card_data.payment_type

string

Payment type classification

card_data.card_token

string

Tokenized card reference

card_data.token_provider

string

Token provider name

card_data.network_token

string

Network tokenization reference

card_data.digital_wallet_type

string

Digital wallet type (APPLE_PAY, GOOGLE_PAY, etc.)

card_data.card_auth_method

string

Card authentication method used

BIN Data

Field
Type
Description

bin_data.bin_number

string

Bank Identification Number

bin_data.bin_range

string

BIN range identifier

bin_data.issuer_name

string

Issuing bank name

bin_data.issuer_country

string

Issuing country code (ISO 3166-1 alpha-2)

bin_data.issuer_currency

string

Issuer currency (ISO 4217)

bin_data.card_level

string

Card level (CLASSIC, GOLD, PLATINUM, etc.)

bin_data.card_category

string

Card category classification

bin_data.product_usage_type

string

CONSUMER, BUSINESS

bin_data.is_regulated

boolean

Whether the card is regulated (Durbin Amendment)

Risk Data

Field
Type
Description

risk_data.avs_street_result

string

AVS street verification result (MATCHED, NOT_MATCHED, NOT_VERIFIED, NOT_PROVIDED, NOT_APPLICABLE, SKIPPED)

risk_data.avs_postal_result

string

AVS postal verification result

risk_data.cvc_result

string

CVC verification result

risk_data.risk_score

decimal

Overall risk score (0.0-100.0)

risk_data.fraud_score

decimal

Fraud detection score (0.0-100.0)

risk_data.decline_code

string

Decline reason code if transaction was declined

risk_data.liability_shift

boolean

Whether liability shift occurred (3DS)

Compliance Data

Field
Type
Description

compliance_data.three_ds_version

string

3D Secure protocol version used

compliance_data.three_ds_status

string

3D Secure authentication status

compliance_data.three_ds_eci

string

Electronic Commerce Indicator from 3DS

compliance_data.cavv

string

Cardholder Authentication Verification Value

compliance_data.xid

string

3D Secure transaction identifier

compliance_data.sca_exemption

string

Strong Customer Authentication exemption type

compliance_data.sca_indicator

string

SCA requirement indicator

compliance_data.moto

boolean

Mail Order/Telephone Order transaction flag

Network Data

Field
Type
Description

network_data.network_transaction_id

string

Payment network transaction identifier

network_data.authorization_code

string

Authorization code from network

network_data.preferred_network

string

Preferred payment network for routing

network_data.actual_network

string

Actual payment network used

network_data.network_token_used

boolean

Whether network tokenization was used

network_data.token_requestor_id

string

Token requestor identifier for network tokens

Processing Data

Field
Type
Description

processing_data.acquirer_name

string

Acquiring bank name

processing_data.processor_name

string

Payment processor name

processing_data.processing_fee

decimal

Processing fee amount

processing_data.interchange_fee

decimal

Interchange fee amount

processing_data.gateway_fee

decimal

Gateway fee amount

processing_data.retry_count

integer

Number of retry attempts

processing_data.processing_time_ms

integer

Processing time in milliseconds

Traffic Data

Field
Type
Description

traffic_data.traffic_source

string

Traffic source identifier

traffic_data.website

string

Website or application identifier

traffic_data.ip_address

string

Customer IP address

traffic_data.ip_country

string

IP-based country code (ISO 3166-1 alpha-2)

traffic_data.ip_city

string

IP-based city name

traffic_data.geo_city

string

Geolocation-based city name

traffic_data.geo_country

string

Geolocation-based country code

Routing Data

Field
Type
Description

routing_data.bank_mid

string

Bank Merchant ID

routing_data.mid_descriptor

string

Merchant descriptor for statements

routing_data.route_id

string

Payment route identifier

routing_data.segment_id

string

Customer segment identifier

routing_data.cascade_number

integer

Cascade attempt number for routing

Subscription Data Field Reference

Core Fields

Field
Type
Description

id

UUID

Subscription identifier

subscription_plan_id

UUID

Subscription plan ID

merchant_id

UUID

Merchant identifier

customer_id

string

Customer identifier

order_id

string

Order identifier

email

string

Customer email address

payment_method

string

Payment method (PAYMENT_CARD, GOOGLE_PAY, APPLE_PAY, PAYPAL, BANK_ACCOUNT)

status

string

Subscription status (ACTIVE, EXPIRED, CANCELLED, BILLING_RETRY, CANCELLATION_PENDING)

term_number

integer

Current billing term number

trial

boolean

Whether subscription is in trial period

product_url

string

Product URL from subscription plan

Timestamps

Field
Type
Description

created_at

timestamp

Subscription creation timestamp

updated_at

timestamp

Last update timestamp

start_date

timestamp

Subscription start date

cancellation_date

timestamp

Cancellation date (if cancelled)

expired_at

timestamp

Expiration timestamp

effective_end_at

timestamp

When subscription access actually ends (for end-of-cycle cancellations)

next_charge_at

timestamp

Next charge timestamp

trial_started_at

timestamp

Trial start timestamp

trial_ends_at

timestamp

Trial end timestamp

pause_start_at

timestamp

Pause start timestamp

pause_end_at

timestamp

Pause end timestamp

Cancellation Fields

Field
Type
Description

cancellation_type

string

IMMEDIATE or END_OF_CYCLE

cancellation_reason_code

string

Reason code (see values below)

cancellation_details

object

Detailed cancellation information

cancellation_details.decline_code

string

Payment decline code

cancellation_details.fraud_case_id

string

Fraud case ID

cancellation_details.fraud_alert_source

string

Source (CB911)

cancellation_details.cancellation_requested_by

string

Person who requested cancellation

cancellation_details.support_case_id

string

Support case ID

cancellation_details.notes

string

Additional context

Cancellation Reason Codes: PAYMENT_HARD_DECLINE, PAYMENT_DECLINED_UNRETRIABLE, PAYMENT_DECLINED_RETRY_EXHAUSTED, MERCHANT_INITIATED, SUSPECTED_FRAUD_ATTEMPT, CHARGEBACK, CLIENT_REQUESTED, DUPLICATED_PAYMENT, SUSPECTED_SCAM_ATTEMPT, OTHER

Retry Fields

Field
Type
Description

retry_attempt_count

integer

Number of retry attempts made

last_retry_at

timestamp

Timestamp of the last retry attempt

next_retry_at

timestamp

Timestamp when the next retry should occur

Subscription Plan Object

Field
Type
Description

subscription_plan.id

UUID

Plan identifier

subscription_plan.name

string

Plan name

subscription_plan.description

string

Plan description

subscription_plan.website_url

string

Plan website URL

subscription_plan.type

string

ONE_TIME, SUBSCRIPTION_NO_TRIAL, SUBSCRIPTION_FREE_TRIAL, SUBSCRIPTION_PAID_TRIAL

subscription_plan.currency

string

ISO 4217 currency code

subscription_plan.full_price_amount

decimal

Full price amount

subscription_plan.billing_frequency_value

integer

Billing frequency value

subscription_plan.billing_frequency_unit

string

DAYS, WEEKS, MONTHS, YEARS

subscription_plan.trial_price_amount

decimal

Trial price amount

subscription_plan.trial_period_value

integer

Trial period value

subscription_plan.trial_period_unit

string

DAYS, WEEKS, MONTHS, YEARS

subscription_plan.retry_strategy_id

integer

Retry strategy ID

subscription_plan.settlement_interval_hours

integer

Settlement interval in hours

subscription_plan.status

string

ACTIVE, DRAFT, DEACTIVATED

subscription_plan.active_subscriptions_count

integer

Count of active subscriptions

Payment Info Array

Field
Type
Description

payment_info[].id

UUID

Payment info record ID

payment_info[].payment_id

string

Payment ID from payment service

payment_info[].transaction_id

UUID

Transaction ID

payment_info[].currency

string

ISO 4217 currency code

payment_info[].amount

decimal

Payment amount

payment_info[].status

string

Payment status

payment_info[].provider

string

Payment provider (PRIMER, STRIPE, ADYEN, YUNO, GATEWAY)

payment_info[].created_at

timestamp

Payment creation timestamp

payment_info[].decline_code

string

Decline code for failed payments

payment_info[].retry_number

integer

Retry attempt number (0 for initial, 1+ for retries)

Handling Events

Event Idempotency

Events may be delivered more than once. Use the event_id field to ensure idempotent processing:

Event Ordering

Events may arrive out of order. Use timestamps and status checks:

Event Summary Table

Event
Description

TRANSACTION_PENDING

Transaction pending processing

TRANSACTION_AUTHORIZED

Transaction authorized

TRANSACTION_DECLINED

Transaction declined

TRANSACTION_FAILED

Transaction failed (system error)

TRANSACTION_VOIDED

Transaction voided

TRANSACTION_SETTLED

Transaction settled

TRANSACTION_REFUNDED

Transaction fully refunded

TRANSACTION_PARTIALLY_REFUNDED

Transaction partially refunded

SUBSCRIPTION_ACTIVATED

New subscription activated

SUBSCRIPTION_RENEWED

Subscription renewed for new period

SUBSCRIPTION_CANCELLED

Subscription cancelled

SUBSCRIPTION_CANCELLATION_SCHEDULED

Subscription cancellation scheduled for end of cycle

SUBSCRIPTION_EXPIRED

Subscription expired

SUBSCRIPTION_BILLING_RETRY

Failed payment retry attempt

Next Steps

Last updated