feat(platform): support platform-aware outgoing webhook delivery#11643
Conversation
…olution Route outgoing webhooks to the correct recipient based on the initiator in a platform setup. When a platform merchant initiates an operation, the webhook goes to the platform's default profile with the provider's keystore. When a connected merchant initiates, the webhook goes to the connected merchant's profile with the processor's keystore. Standard merchants are unaffected. Key changes: - Add `processor_merchant_id` column to events table and domain models - Add `is_platform_initiated` and `processor_merchant_id` to webhook retry tracking data for correct keystore resolution during retries - Add `processor_merchant_id` to OutgoingWebhook API model and Kafka events - Add webhook recipient resolution helpers in webhooks/utils.rs: `resolve_webhook_recipient_from_initiator` (direct flows) and `resolve_webhook_recipient_from_created_by` (incoming webhook flows) - Refactor outgoing.rs and outgoing_v2.rs to accept Platform + resolved WebhookRecipientContext instead of raw Processor - Update all V1/V2 call sites (payments, refunds, payouts, disputes, mandates, subscriptions, incoming webhooks) to resolve recipient first - Update retry workflow to construct Platform correctly and use resolved credentials instead of redundant DB queries - Update webhook events APIs (list, retry) with provider/credential resolution for Standard, Connected, and Platform merchant types - Enable platform merchant access on all webhook event endpoints Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
…in webhook delivery The event update and lookup operations in trigger_webhook_to_merchant were using business_profile.merchant_id, which is the webhook recipient's ID. In platform flows where the recipient is the processor, this doesn't match the event's merchant_id (always the provider), causing DB lookups to fail. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
…in V2 webhook delivery Same fix as the V1 outgoing.rs — trigger_webhook_to_merchant in outgoing_v2.rs was using business_profile.merchant_id for event DB operations, but events are stored under the provider's merchant_id. Added provider_merchant_id parameter and use it for handle_success_response and handle_error_response calls. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
… in incoming webhooks Payment methods are stored under the provider (platform merchant), not the processor. Three call sites in incoming.rs were incorrectly using get_processor() for find_payment_method, update_payment_method, and fetch_payment_method_for_network_token_webhooks. Changed to get_provider(). Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
…ecipient resolution The Platform initiator reflects who called the current API, not who created the resource. In incoming webhook flows, the initiator is the connected merchant (whose URL the connector hits), but the payment may have been created by the platform. This caused webhooks to be routed to the connected merchant instead of the platform. Switch all call sites from resolve_webhook_recipient_from_initiator to resolve_webhook_recipient_from_created_by, which uses the persisted created_by field on the resource (payment_attempt, refund, dispute, payout). This is always the correct source of truth regardless of the current API caller. Remove resolve_webhook_recipient_from_initiator entirely. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Clone created_by from payment_data before it is consumed by payments_to_payments_response, avoiding a borrow-after-move error. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
…o_merchant Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
| state.clone(), | ||
| merchant_key_store.clone(), | ||
| &business_profile.merchant_id, | ||
| provider_merchant_id, |
There was a problem hiding this comment.
We changed this merchant_id from processor to provider?
There was a problem hiding this comment.
Modified to use webhook_recipient_merchant_id
| pub(crate) merchant_id: common_utils::id_type::MerchantId, | ||
| /// The business profile of the webhook recipient (initiator's profile). | ||
| pub(crate) business_profile_id: common_utils::id_type::ProfileId, | ||
| /// The processor merchant id whose credentials were used for payment processing. |
There was a problem hiding this comment.
Can we please change this comment? We mean connector credentials. Or you can write comment in better. The merchant_id of the merchant whose connector credentials..........
| invoice_sync::InvoiceSyncHandler::form_response_for_retry_outgoing_webhook_task( | ||
| state.clone().into(), | ||
| &key_store, | ||
| platform.get_processor().get_key_store(), |
There was a problem hiding this comment.
why this is at processor level?
There was a problem hiding this comment.
This is for fetching invoice and subscription. Currently the data is being stored on the processor level, so used processor credentials here.
| .unwrap(), | ||
| }), | ||
| is_overall_delivery_successful: Some(false), | ||
| processor_merchant_id: Some(merchant_id.to_owned()), |
There was a problem hiding this comment.
For test shall we keep it as none, or generate a new processor_merchant_id above and populate it? Or this can be true for standard case.
There was a problem hiding this comment.
We can keep it as merchant_id itself and treat it as standard case
| /// Indicates whether the event was ultimately delivered. | ||
| pub is_overall_delivery_successful: Option<bool>, | ||
|
|
||
| /// The processor merchant id whose credentials are used for payment processing. |
There was a problem hiding this comment.
Please change this comment.
| let created_by = refund | ||
| .created_by | ||
| .as_deref() | ||
| .and_then(|s| s.parse::<common_utils::types::CreatedBy>().ok()); |
There was a problem hiding this comment.
Don't we wanna propagate the error in case of parse failures?
There was a problem hiding this comment.
The impl_enum_str! macro already handles parse failures internally — it logs the error and returns the Invalid variant instead of an Err.
So parse() never actually fails here. The .ok() is just to convert the Result to Option for chaining, and Invalid is handled downstream in resolve_webhook_recipient_from_created_by where it defaults to the processor (connected merchant), which is the correct fallback behavior.
| response, | ||
| )); | ||
| let webhook_recipient = | ||
| crate::core::webhooks::utils::resolve_webhook_recipient_from_created_by( |
There was a problem hiding this comment.
Please avoid absolute imports
apoorvdixit88
left a comment
There was a problem hiding this comment.
Please check whether we need to change queries, to work for both processor and provider.
| store | ||
| .list_initial_events_by_merchant_id_primary_object_id( | ||
| merchant_account.get_id(), | ||
| provider_merchant_account.get_id(), |
There was a problem hiding this comment.
We will be changing it to processor_merchant_id later?
There was a problem hiding this comment.
Needs discussion for this
| store | ||
| .list_initial_events_by_merchant_id_constraints( | ||
| merchant_account.get_id(), | ||
| provider_merchant_account.get_id(), |
There was a problem hiding this comment.
This is will list all the events for all the connected merchant?
There was a problem hiding this comment.
This query will not be executed for platform-connected merchants, profile_id has been made compulsary now, for correct decryption of events
4183bed
Type of Change
Description
This PR adds platform-aware outgoing webhook routing so that webhooks are delivered to the correct recipient based on who initiated the operation.
Problem
In a platform setup, there are two merchant identities:
Previously, outgoing webhooks always went to the processor (connected merchant) regardless of who initiated the payment. This is incorrect when the platform merchant initiates an operation — the webhook should go to the platform's own profile with the platform's encryption credentials.
Solution
Webhook Recipient Resolution
Two new helpers in
webhooks/utils.rsresolve the correct webhook recipient:resolve_webhook_recipient_from_initiator— Used in direct flows (payment create, refund, payout). ChecksPlatform::initiator.is_platform()to route webhooks.resolve_webhook_recipient_from_created_by— Used in incoming webhook flows where the Platform struct has no initiator. Examines thecreated_byfield on the resource to determine routing.Both return a
WebhookRecipientContextcontaining the recipient's merchant account, keystore, business profile, and whether the operation was platform-initiated.Event Storage
merchant_id = provider(the platform/business owner)processor_merchant_idcolumn tracks the connected merchant whose credentials were usedOutgoing Webhook Flow
create_event_and_trigger_outgoing_webhooknow acceptsPlatform+WebhookRecipientContextinstead of rawProcessorOutgoingWebhookAPI model includesprocessor_merchant_idfor downstream consumersprocessor_merchant_idRetry Workflow
OutgoingWebhookTrackingDatanow includesis_platform_initiatedandprocessor_merchant_idso retries can reconstruct the correct keystore contextget_outgoing_webhook_content_and_event_typeaccepts&Platform(correctly constructed by the caller) instead of building a wrong one internallyWebhook Events APIs
All webhook event endpoints (
list_initial_delivery_attempts,list_delivery_attempts,retry_delivery_attempt) updated with proper provider/credential resolution:get_platform_account_and_key_store, uses provider's merchant_id for event queries, own keystore for decryptionprocessor_merchant_idfrom eventretry_delivery_attemptincludes keystore fallback — tries processor's keystore first, falls back to provider's if they differ (handles both processor-targeted and platform-initiated events).All 4 webhook event endpoints now have
allow_platform: true.Additional Changes
API contract:
OutgoingWebhookstruct gains optionalprocessor_merchant_idfield (non-breaking).Database schema: New nullable
processor_merchant_idcolumn oneventstable. Old rows haveNULL(backward compatible). Newprocessor_merchant_idcolumn also added to ClickHouse outgoing webhook event tables/views.Motivation and Context
Platform merchants need webhooks routed to themselves when they initiate operations on behalf of connected merchants. Without this, the platform has no visibility into webhook delivery for operations they initiated, and the encryption/signature uses the wrong merchant's credentials.
How did you test it?
cargo buildcreated_by→ routes to correct merchantmerchant_id= provider,processor_merchant_id= connected,business_profile_id= recipient's profileCreate a Platform Organization with a Platform Merchant, 2 Connected Merchants and 1 Standard Merchant
Platform Organization:{ "merchant_id": "merchant_1774770747", "org_id": "org_RCIkaQ5MiQfpoXugA3Mj", "profile_id": "pro_mmb2IiMGVlHwawyXhp44", "api_key": "dev_YJjSTjPe7u6sVHANMS9aDoRT6yN69l7O4JUbwxmQSXIOyDSWKNa42nWhuLomC8zH" }{ "merchant_id": "merchant_1774771168", "org_id": "org_RCIkaQ5MiQfpoXugA3Mj", "profile_id": "pro_tGbbq73tVsUoGF1Bcwe3", "api_key": "dev_uPvoTxMVUNSAc2ZqkBPwwxaDANsPXnqCHDzKyTOwhQ3pk4EXmuB9aVT5v6i2OCYu" }{ "merchant_id": "merchant_1774771173", "org_id": "org_RCIkaQ5MiQfpoXugA3Mj", "profile_id": "pro_VpSYMCzoLgk3gAh2Toch", "api_key": "dev_UbsKzvxvkm1eccBxrrUkztwEcQm75WFY3zt6c8yVfA0WLMegXHehj6x4i3c7rTpp" }{ "merchant_id": "merchant_1774771179", "org_id": "org_RCIkaQ5MiQfpoXugA3Mj", "profile_id": "pro_q5Tz6mDDARjUeqKPuKfl", "api_key": "dev_Di93e5ZDTHt2xoCbkLBjJPLv874w1tJnTAWvJQ7G6Z8nPumOA2LvUbie7iiDwWcZ" }Create MCA for Connected and Standard Merchants:
{ "connector_type": "payment_processor", "connector_name": "stripe", "connector_label": "stripe_default3", "merchant_connector_id": "mca_8i4hPSXaEPdyIlLm7POn", "profile_id": "pro_tGbbq73tVsUoGF1Bcwe3", "connector_account_details": { "auth_type": "HeaderKey", "api_key": "<api-key>" }, "payment_methods_enabled": [ { "payment_method": "card", "payment_method_types": [ { "payment_method_type": "debit", "payment_experience": null, "card_networks": [ "Mastercard" ], "accepted_currencies": { "type": "enable_only", "list": [ "USD", "GBP", "INR" ] }, "accepted_countries": { "type": "disable_only", "list": [ "HK" ] }, "minimum_amount": 0, "maximum_amount": 68607706, "recurring_enabled": true, "installment_payment_enabled": true }, { "payment_method_type": "debit", "payment_experience": null, "card_networks": [ "Visa" ], "accepted_currencies": null, "accepted_countries": null, "minimum_amount": 0, "maximum_amount": 68607706, "recurring_enabled": true, "installment_payment_enabled": false }, { "payment_method_type": "debit", "payment_experience": null, "card_networks": [ "Interac" ], "accepted_currencies": null, "accepted_countries": null, "minimum_amount": 0, "maximum_amount": 68607706, "recurring_enabled": true, "installment_payment_enabled": false }, { "payment_method_type": "debit", "payment_experience": null, "card_networks": [ "AmericanExpress" ], "accepted_currencies": null, "accepted_countries": null, "minimum_amount": 0, "maximum_amount": 68607706, "recurring_enabled": true, "installment_payment_enabled": false }, { "payment_method_type": "debit", "payment_experience": null, "card_networks": [ "JCB" ], "accepted_currencies": null, "accepted_countries": null, "minimum_amount": 0, "maximum_amount": 68607706, "recurring_enabled": true, "installment_payment_enabled": false }, { "payment_method_type": "debit", "payment_experience": null, "card_networks": [ "DinersClub" ], "accepted_currencies": null, "accepted_countries": null, "minimum_amount": 0, "maximum_amount": 68607706, "recurring_enabled": true, "installment_payment_enabled": false }, { "payment_method_type": "debit", "payment_experience": null, "card_networks": [ "Discover" ], "accepted_currencies": null, "accepted_countries": null, "minimum_amount": 0, "maximum_amount": 68607706, "recurring_enabled": true, "installment_payment_enabled": false }, { "payment_method_type": "debit", "payment_experience": null, "card_networks": [ "CartesBancaires" ], "accepted_currencies": null, "accepted_countries": null, "minimum_amount": 0, "maximum_amount": 68607706, "recurring_enabled": true, "installment_payment_enabled": false }, { "payment_method_type": "debit", "payment_experience": null, "card_networks": [ "UnionPay" ], "accepted_currencies": null, "accepted_countries": null, "minimum_amount": 0, "maximum_amount": 68607706, "recurring_enabled": true, "installment_payment_enabled": false }, { "payment_method_type": "credit", "payment_experience": null, "card_networks": [ "Mastercard" ], "accepted_currencies": { "type": "enable_only", "list": [ "USD", "GBP", "INR" ] }, "accepted_countries": { "type": "disable_only", "list": [ "HK" ] }, "minimum_amount": 0, "maximum_amount": 68607706, "recurring_enabled": true, "installment_payment_enabled": true } ] }, { "payment_method": "pay_later", "payment_method_types": [ { "payment_method_type": "credit", "payment_experience": null, "card_networks": [ "Visa" ], "accepted_currencies": null, "accepted_countries": null, "minimum_amount": 0, "maximum_amount": 68607706, "recurring_enabled": true, "installment_payment_enabled": false }, { "payment_method_type": "credit", "payment_experience": null, "card_networks": [ "Interac" ], "accepted_currencies": null, "accepted_countries": null, "minimum_amount": 0, "maximum_amount": 68607706, "recurring_enabled": true, "installment_payment_enabled": false }, { "payment_method_type": "credit", "payment_experience": null, "card_networks": [ "AmericanExpress" ], "accepted_currencies": null, "accepted_countries": null, "minimum_amount": 0, "maximum_amount": 68607706, "recurring_enabled": true, "installment_payment_enabled": false }, { "payment_method_type": "credit", "payment_experience": null, "card_networks": [ "JCB" ], "accepted_currencies": null, "accepted_countries": null, "minimum_amount": 0, "maximum_amount": 68607706, "recurring_enabled": true, "installment_payment_enabled": false }, { "payment_method_type": "credit", "payment_experience": null, "card_networks": [ "DinersClub" ], "accepted_currencies": null, "accepted_countries": null, "minimum_amount": 0, "maximum_amount": 68607706, "recurring_enabled": true, "installment_payment_enabled": false }, { "payment_method_type": "credit", "payment_experience": null, "card_networks": [ "Discover" ], "accepted_currencies": null, "accepted_countries": null, "minimum_amount": 0, "maximum_amount": 68607706, "recurring_enabled": true, "installment_payment_enabled": false }, { "payment_method_type": "credit", "payment_experience": null, "card_networks": [ "CartesBancaires" ], "accepted_currencies": null, "accepted_countries": null, "minimum_amount": 0, "maximum_amount": 68607706, "recurring_enabled": true, "installment_payment_enabled": false }, { "payment_method_type": "credit", "payment_experience": null, "card_networks": [ "UnionPay" ], "accepted_currencies": null, "accepted_countries": null, "minimum_amount": 0, "maximum_amount": 68607706, "recurring_enabled": true, "installment_payment_enabled": false } ] } ], "connector_webhook_details": null, "metadata": {}, "test_mode": true, "disabled": false, "frm_configs": null, "business_country": null, "business_label": null, "business_sub_label": null, "applepay_verified_domains": null, "pm_auth_config": null, "status": "active", "additional_merchant_data": null, "connector_wallets_details": null, "webhook_setup_capabilities": { "is_webhook_auto_configuration_supported": false, "requires_webhook_secret": null, "config_type": null } }Configure outgoing webhook in platform merchant's default profile and connected merchant's profile where connector is configured.

For connected merchant:
For platform merchant:

Payments Flow - triggering outgoing webhook:
Create payment using connected merchant's API key:
{ "payment_id": "pay_mVyLXcypouZUD0S6kq58", "merchant_id": "merchant_1774770747", "status": "succeeded", "amount": 6540, "net_amount": 6540, "shipping_cost": null, "amount_capturable": 0, "amount_received": 6540, "processor_merchant_id": "merchant_1774771168", "initiator": "connected", "sdk_authorization": "cHJvZmlsZV9pZD1wcm9fdEdiYnE3M3RWc1VvR0YxQmN3ZTMscHVibGlzaGFibGVfa2V5PXBrX2Rldl83MmUzYjZkNTExMGE0OGM2YTkwMDZjYzllODA1YTliYSxjbGllbnRfc2VjcmV0PXBheV9tVnlMWGN5cG91WlVEMFM2a3E1OF9zZWNyZXRfQnQyMThvcmdzY0ltZzduOWlsR04sY3VzdG9tZXJfaWQ9Y29ubmVjdGVkMQ==", "connector": "stripe", "state_metadata": null, "client_secret": "pay_mVyLXcypouZUD0S6kq58_secret_Bt218orgscImg7n9ilGN", "created": "2026-03-29T08:37:04.511Z", "modified_at": "2026-03-29T08:37:06.237Z", "currency": "USD", "customer_id": null, "customer": null, "description": "Its my first payment request", "refunds": null, "disputes": null, "mandate_id": null, "mandate_data": null, "setup_future_usage": "on_session", "off_session": null, "capture_on": null, "capture_method": "automatic", "payment_method": "card", "payment_method_data": { "card": { "last4": "4242", "card_type": null, "card_network": null, "card_issuer": null, "card_issuing_country": null, "card_isin": "424242", "card_extended_bin": null, "card_exp_month": "07", "card_exp_year": "27", "card_holder_name": "joseph Doe", "payment_checks": { "cvc_check": "pass", "address_line1_check": "pass", "address_postal_code_check": "pass" }, "authentication_data": null, "auth_code": null }, "billing": { "address": { "city": "San Fransico", "country": "US", "line1": "1467", "line2": "Harrison Street", "line3": "Harrison Street", "zip": "94122", "state": "California", "first_name": "joseph", "last_name": "Doe", "origin_zip": null }, "phone": { "number": "8056594427", "country_code": "+91" }, "email": "guest3@example.com" } }, "payment_token": null, "shipping": { "address": { "city": "San Fransico", "country": "US", "line1": "1467", "line2": "Harrison Street", "line3": "Harrison Street", "zip": "94122", "state": "California", "first_name": "joseph", "last_name": "Doe", "origin_zip": null }, "phone": { "number": "8056594427", "country_code": "+91" }, "email": "guest@example.com" }, "billing": { "address": { "city": "San Fransico", "country": "US", "line1": "1467", "line2": "Harrison Street", "line3": "Harrison Street", "zip": "94122", "state": "California", "first_name": "joseph", "last_name": "Doe", "origin_zip": null }, "phone": { "number": "8056594427", "country_code": "+91" }, "email": "guest@example.com" }, "order_details": [ { "sku": null, "upc": null, "brand": null, "amount": 6540, "category": null, "quantity": 1, "tax_rate": null, "product_id": null, "description": null, "product_name": "Apple iphone 15", "product_type": null, "sub_category": null, "total_amount": null, "commodity_code": null, "unit_of_measure": null, "product_img_link": null, "product_tax_code": null, "total_tax_amount": null, "requires_shipping": null, "unit_discount_amount": null } ], "email": null, "name": null, "phone": null, "return_url": "https://google.com/", "authentication_type": "no_three_ds", "statement_descriptor_name": "joseph", "statement_descriptor_suffix": "JS", "next_action": null, "cancellation_reason": null, "error_code": null, "error_message": null, "unified_code": null, "unified_message": null, "error_details": null, "payment_experience": null, "payment_method_type": "credit", "connector_label": null, "business_country": null, "business_label": "default", "business_sub_label": null, "allowed_payment_method_types": null, "manual_retry_allowed": null, "connector_transaction_id": "pi_3TGEqDIVaesDjvMP2VCwQwGn", "frm_message": null, "metadata": { "udf1": "value1", "login_date": "2019-09-10T10:11:12Z", "new_customer": "true" }, "connector_metadata": { "apple_pay": null, "airwallex": null, "noon": { "order_category": "pay" }, "braintree": null, "adyen": null, "peachpayments": null, "santander": null }, "connector_response_metadata": null, "feature_metadata": { "redirect_response": null, "search_tags": null, "apple_pay_recurring_details": null, "pix_additional_details": null, "boleto_additional_details": null }, "reference_id": "pi_3TGEqDIVaesDjvMP2VCwQwGn", "payment_link": null, "profile_id": "pro_tGbbq73tVsUoGF1Bcwe3", "surcharge_details": null, "attempt_count": 1, "merchant_decision": null, "merchant_connector_id": "mca_8i4hPSXaEPdyIlLm7POn", "incremental_authorization_allowed": false, "authorization_count": null, "incremental_authorizations": null, "external_authentication_details": null, "external_3ds_authentication_attempted": false, "expires_on": "2026-03-29T08:52:04.511Z", "fingerprint": null, "browser_info": { "language": "nl-NL", "time_zone": 0, "ip_address": "128.0.0.1", "user_agent": "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/70.0.3538.110 Safari/537.36", "color_depth": 24, "java_enabled": true, "screen_width": 1536, "accept_header": "text/html,application/xhtml+xml,application/xml;q=0.9,image/webp,image/apng,*/*;q=0.8", "screen_height": 723, "java_script_enabled": true }, "payment_channel": null, "payment_method_id": null, "network_transaction_id": "115103708757668", "payment_method_status": null, "updated": "2026-03-29T08:37:06.237Z", "split_payments": null, "frm_metadata": null, "extended_authorization_applied": false, "extended_authorization_last_applied_at": null, "request_extended_authorization": null, "capture_before": null, "merchant_order_reference_id": "test_ord", "order_tax_amount": null, "connector_mandate_id": null, "card_discovery": "manual", "force_3ds_challenge": false, "force_3ds_challenge_trigger": false, "issuer_error_code": null, "issuer_error_message": null, "is_iframe_redirection_enabled": null, "whole_connector_response": null, "enable_partial_authorization": null, "enable_overcapture": null, "is_overcapture_enabled": false, "network_details": null, "is_stored_credential": null, "mit_category": null, "billing_descriptor": null, "tokenization": null, "partner_merchant_identifier_details": null, "payment_method_tokenization_details": null, "installment_options": null, "installment_data": null }Received outgoing webhook at the webhook endpoint configured for connected merchant:

{ "merchant_id": "merchant_1774770747", "event_id": "evt_019d38bd584779d3b45f66984aa5c6ea", "event_type": "payment_succeeded", "content": { "type": "payment_details", "object": { "payment_id": "pay_mVyLXcypouZUD0S6kq58", "merchant_id": "merchant_1774770747", "status": "succeeded", "amount": 6540, "net_amount": 6540, "shipping_cost": null, "amount_capturable": 0, "amount_received": 6540, "processor_merchant_id": "merchant_1774771168", "initiator": "connected", "sdk_authorization": "cHJvZmlsZV9pZD1wcm9fdEdiYnE3M3RWc1VvR0YxQmN3ZTMscHVibGlzaGFibGVfa2V5PXBrX2Rldl83MmUzYjZkNTExMGE0OGM2YTkwMDZjYzllODA1YTliYSxjbGllbnRfc2VjcmV0PXBheV9tVnlMWGN5cG91WlVEMFM2a3E1OF9zZWNyZXRfQnQyMThvcmdzY0ltZzduOWlsR04sY3VzdG9tZXJfaWQ9Y29ubmVjdGVkMQ==", "connector": "stripe", "state_metadata": null, "client_secret": "pay_mVyLXcypouZUD0S6kq58_secret_Bt218orgscImg7n9ilGN", "created": "2026-03-29T08:37:04.511Z", "modified_at": "2026-03-29T08:37:06.237Z", "currency": "USD", "customer_id": null, "customer": null, "description": "Its my first payment request", "refunds": null, "disputes": null, "mandate_id": null, "mandate_data": null, "setup_future_usage": "on_session", "off_session": null, "capture_on": null, "capture_method": "automatic", "payment_method": "card", "payment_method_data": { "card": { "last4": "4242", "card_type": null, "card_network": null, "card_issuer": null, "card_issuing_country": null, "card_isin": "424242", "card_extended_bin": null, "card_exp_month": "07", "card_exp_year": "27", "card_holder_name": "joseph Doe", "payment_checks": { "cvc_check": "pass", "address_line1_check": "pass", "address_postal_code_check": "pass" }, "authentication_data": null, "auth_code": null }, "billing": { "address": { "city": "San Fransico", "country": "US", "line1": "1467", "line2": "Harrison Street", "line3": "Harrison Street", "zip": "94122", "state": "California", "first_name": "joseph", "last_name": "Doe", "origin_zip": null }, "phone": { "number": "8056594427", "country_code": "+91" }, "email": "guest3@example.com" } }, "payment_token": null, "shipping": { "address": { "city": "San Fransico", "country": "US", "line1": "1467", "line2": "Harrison Street", "line3": "Harrison Street", "zip": "94122", "state": "California", "first_name": "joseph", "last_name": "Doe", "origin_zip": null }, "phone": { "number": "8056594427", "country_code": "+91" }, "email": "guest@example.com" }, "billing": { "address": { "city": "San Fransico", "country": "US", "line1": "1467", "line2": "Harrison Street", "line3": "Harrison Street", "zip": "94122", "state": "California", "first_name": "joseph", "last_name": "Doe", "origin_zip": null }, "phone": { "number": "8056594427", "country_code": "+91" }, "email": "guest@example.com" }, "order_details": [ { "sku": null, "upc": null, "brand": null, "amount": 6540, "category": null, "quantity": 1, "tax_rate": null, "product_id": null, "description": null, "product_name": "Apple iphone 15", "product_type": null, "sub_category": null, "total_amount": null, "commodity_code": null, "unit_of_measure": null, "product_img_link": null, "product_tax_code": null, "total_tax_amount": null, "requires_shipping": null, "unit_discount_amount": null } ], "email": null, "name": null, "phone": null, "return_url": "https://google.com/", "authentication_type": "no_three_ds", "statement_descriptor_name": "joseph", "statement_descriptor_suffix": "JS", "next_action": null, "cancellation_reason": null, "error_code": null, "error_message": null, "unified_code": null, "unified_message": null, "error_details": null, "payment_experience": null, "payment_method_type": "credit", "connector_label": null, "business_country": null, "business_label": "default", "business_sub_label": null, "allowed_payment_method_types": null, "manual_retry_allowed": null, "connector_transaction_id": "pi_3TGEqDIVaesDjvMP2VCwQwGn", "frm_message": null, "metadata": { "udf1": "value1", "login_date": "2019-09-10T10:11:12Z", "new_customer": "true" }, "connector_metadata": { "apple_pay": null, "airwallex": null, "noon": { "order_category": "pay" }, "braintree": null, "adyen": null, "peachpayments": null, "santander": null }, "connector_response_metadata": null, "feature_metadata": { "redirect_response": null, "search_tags": null, "apple_pay_recurring_details": null, "pix_additional_details": null, "boleto_additional_details": null }, "reference_id": "pi_3TGEqDIVaesDjvMP2VCwQwGn", "payment_link": null, "profile_id": "pro_tGbbq73tVsUoGF1Bcwe3", "surcharge_details": null, "attempt_count": 1, "merchant_decision": null, "merchant_connector_id": "mca_8i4hPSXaEPdyIlLm7POn", "incremental_authorization_allowed": false, "authorization_count": null, "incremental_authorizations": null, "external_authentication_details": null, "external_3ds_authentication_attempted": false, "expires_on": "2026-03-29T08:52:04.511Z", "fingerprint": null, "browser_info": { "language": "nl-NL", "time_zone": 0, "ip_address": "128.0.0.1", "user_agent": "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/70.0.3538.110 Safari/537.36", "color_depth": 24, "java_enabled": true, "screen_width": 1536, "accept_header": "text/html,application/xhtml+xml,application/xml;q=0.9,image/webp,image/apng,*/*;q=0.8", "screen_height": 723, "java_script_enabled": true }, "payment_channel": null, "payment_method_id": null, "network_transaction_id": "115103708757668", "payment_method_status": null, "updated": "2026-03-29T08:37:06.237Z", "split_payments": null, "frm_metadata": null, "extended_authorization_applied": false, "extended_authorization_last_applied_at": null, "request_extended_authorization": null, "capture_before": null, "merchant_order_reference_id": "test_ord", "order_tax_amount": null, "connector_mandate_id": null, "card_discovery": "manual", "force_3ds_challenge": false, "force_3ds_challenge_trigger": false, "issuer_error_code": null, "issuer_error_message": null, "is_iframe_redirection_enabled": null, "whole_connector_response": null, "enable_partial_authorization": null, "enable_overcapture": null, "is_overcapture_enabled": false, "network_details": null, "is_stored_credential": null, "mit_category": null, "billing_descriptor": null, "tokenization": null, "partner_merchant_identifier_details": null, "payment_method_tokenization_details": null, "installment_options": null, "installment_data": null } }, "timestamp": "2026-03-29T08:37:06.247Z", "processor_merchant_id": "merchant_1774771168" }Can verify in events table:
Can verify clickhouse table that merchant_id and processor_merchant_id are populated correctly:

Platform Merchant Triggering payment on behalf of Connected Merchant:
{ "payment_id": "pay_r0wEdy9SXBVzkVbdiHfH", "merchant_id": "merchant_1774770747", "status": "succeeded", "amount": 6540, "net_amount": 6540, "shipping_cost": null, "amount_capturable": 0, "amount_received": 6540, "processor_merchant_id": "merchant_1774771168", "initiator": "platform", "sdk_authorization": "cHJvZmlsZV9pZD1wcm9fdEdiYnE3M3RWc1VvR0YxQmN3ZTMscHVibGlzaGFibGVfa2V5PXBrX2Rldl83MmUzYjZkNTExMGE0OGM2YTkwMDZjYzllODA1YTliYSxwbGF0Zm9ybV9wdWJsaXNoYWJsZV9rZXk9cGtfZGV2XzI0YzNlNzMyZTg5ZTQ0ZWNhMzk1NDAyM2E0ZGRhZjk2LGNsaWVudF9zZWNyZXQ9cGF5X3Iwd0VkeTlTWEJWemtWYmRpSGZIX3NlY3JldF84OTM5aWhOSGtkZHI1S2o4V0RBMyxjdXN0b21lcl9pZD1jb25uZWN0ZWQx", "connector": "stripe", "state_metadata": null, "client_secret": "pay_r0wEdy9SXBVzkVbdiHfH_secret_8939ihNHkddr5Kj8WDA3", "created": "2026-03-29T08:22:13.204Z", "modified_at": "2026-03-29T08:22:15.101Z", "currency": "USD", "customer_id": null, "customer": null, "description": "Its my first payment request", "refunds": null, "disputes": null, "mandate_id": null, "mandate_data": null, "setup_future_usage": "on_session", "off_session": null, "capture_on": null, "capture_method": "automatic", "payment_method": "card", "payment_method_data": { "card": { "last4": "4242", "card_type": null, "card_network": null, "card_issuer": null, "card_issuing_country": null, "card_isin": "424242", "card_extended_bin": null, "card_exp_month": "07", "card_exp_year": "27", "card_holder_name": "joseph Doe", "payment_checks": { "cvc_check": "pass", "address_line1_check": "pass", "address_postal_code_check": "pass" }, "authentication_data": null, "auth_code": null }, "billing": { "address": { "city": "San Fransico", "country": "US", "line1": "1467", "line2": "Harrison Street", "line3": "Harrison Street", "zip": "94122", "state": "California", "first_name": "joseph", "last_name": "Doe", "origin_zip": null }, "phone": { "number": "8056594427", "country_code": "+91" }, "email": "guest3@example.com" } }, "payment_token": null, "shipping": { "address": { "city": "San Fransico", "country": "US", "line1": "1467", "line2": "Harrison Street", "line3": "Harrison Street", "zip": "94122", "state": "California", "first_name": "joseph", "last_name": "Doe", "origin_zip": null }, "phone": { "number": "8056594427", "country_code": "+91" }, "email": "guest@example.com" }, "billing": { "address": { "city": "San Fransico", "country": "US", "line1": "1467", "line2": "Harrison Street", "line3": "Harrison Street", "zip": "94122", "state": "California", "first_name": "joseph", "last_name": "Doe", "origin_zip": null }, "phone": { "number": "8056594427", "country_code": "+91" }, "email": "guest@example.com" }, "order_details": [ { "sku": null, "upc": null, "brand": null, "amount": 6540, "category": null, "quantity": 1, "tax_rate": null, "product_id": null, "description": null, "product_name": "Apple iphone 15", "product_type": null, "sub_category": null, "total_amount": null, "commodity_code": null, "unit_of_measure": null, "product_img_link": null, "product_tax_code": null, "total_tax_amount": null, "requires_shipping": null, "unit_discount_amount": null } ], "email": null, "name": null, "phone": null, "return_url": "https://google.com/", "authentication_type": "no_three_ds", "statement_descriptor_name": "joseph", "statement_descriptor_suffix": "JS", "next_action": null, "cancellation_reason": null, "error_code": null, "error_message": null, "unified_code": null, "unified_message": null, "error_details": null, "payment_experience": null, "payment_method_type": "credit", "connector_label": null, "business_country": null, "business_label": "default", "business_sub_label": null, "allowed_payment_method_types": null, "manual_retry_allowed": null, "connector_transaction_id": "pi_3TGEbpIVaesDjvMP21TmiaLr", "frm_message": null, "metadata": { "udf1": "value1", "login_date": "2019-09-10T10:11:12Z", "new_customer": "true" }, "connector_metadata": { "apple_pay": null, "airwallex": null, "noon": { "order_category": "pay" }, "braintree": null, "adyen": null, "peachpayments": null, "santander": null }, "connector_response_metadata": null, "feature_metadata": { "redirect_response": null, "search_tags": null, "apple_pay_recurring_details": null, "pix_additional_details": null, "boleto_additional_details": null }, "reference_id": "pi_3TGEbpIVaesDjvMP21TmiaLr", "payment_link": null, "profile_id": "pro_tGbbq73tVsUoGF1Bcwe3", "surcharge_details": null, "attempt_count": 1, "merchant_decision": null, "merchant_connector_id": "mca_8i4hPSXaEPdyIlLm7POn", "incremental_authorization_allowed": false, "authorization_count": null, "incremental_authorizations": null, "external_authentication_details": null, "external_3ds_authentication_attempted": false, "expires_on": "2026-03-29T08:37:13.204Z", "fingerprint": null, "browser_info": { "language": "nl-NL", "time_zone": 0, "ip_address": "128.0.0.1", "user_agent": "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/70.0.3538.110 Safari/537.36", "color_depth": 24, "java_enabled": true, "screen_width": 1536, "accept_header": "text/html,application/xhtml+xml,application/xml;q=0.9,image/webp,image/apng,*/*;q=0.8", "screen_height": 723, "java_script_enabled": true }, "payment_channel": null, "payment_method_id": null, "network_transaction_id": "115103708757668", "payment_method_status": null, "updated": "2026-03-29T08:22:15.101Z", "split_payments": null, "frm_metadata": null, "extended_authorization_applied": false, "extended_authorization_last_applied_at": null, "request_extended_authorization": null, "capture_before": null, "merchant_order_reference_id": "test_ord", "order_tax_amount": null, "connector_mandate_id": null, "card_discovery": "manual", "force_3ds_challenge": false, "force_3ds_challenge_trigger": false, "issuer_error_code": null, "issuer_error_message": null, "is_iframe_redirection_enabled": null, "whole_connector_response": null, "enable_partial_authorization": null, "enable_overcapture": null, "is_overcapture_enabled": false, "network_details": null, "is_stored_credential": null, "mit_category": null, "billing_descriptor": null, "tokenization": null, "partner_merchant_identifier_details": null, "payment_method_tokenization_details": null, "installment_options": null, "installment_data": null }Received outgoing webhook at the webhook endpoint configured for platform merchant:

{ "merchant_id": "merchant_1774770747", "event_id": "evt_019d38afbf577281b161184b048a7a22", "event_type": "payment_succeeded", "content": { "type": "payment_details", "object": { "payment_id": "pay_r0wEdy9SXBVzkVbdiHfH", "merchant_id": "merchant_1774770747", "status": "succeeded", "amount": 6540, "net_amount": 6540, "shipping_cost": null, "amount_capturable": 0, "amount_received": 6540, "processor_merchant_id": "merchant_1774771168", "initiator": "platform", "sdk_authorization": "cHJvZmlsZV9pZD1wcm9fdEdiYnE3M3RWc1VvR0YxQmN3ZTMscHVibGlzaGFibGVfa2V5PXBrX2Rldl83MmUzYjZkNTExMGE0OGM2YTkwMDZjYzllODA1YTliYSxwbGF0Zm9ybV9wdWJsaXNoYWJsZV9rZXk9cGtfZGV2XzI0YzNlNzMyZTg5ZTQ0ZWNhMzk1NDAyM2E0ZGRhZjk2LGNsaWVudF9zZWNyZXQ9cGF5X3Iwd0VkeTlTWEJWemtWYmRpSGZIX3NlY3JldF84OTM5aWhOSGtkZHI1S2o4V0RBMyxjdXN0b21lcl9pZD1jb25uZWN0ZWQx", "connector": "stripe", "state_metadata": null, "client_secret": "pay_r0wEdy9SXBVzkVbdiHfH_secret_8939ihNHkddr5Kj8WDA3", "created": "2026-03-29T08:22:13.204Z", "modified_at": "2026-03-29T08:22:15.101Z", "currency": "USD", "customer_id": null, "customer": null, "description": "Its my first payment request", "refunds": null, "disputes": null, "mandate_id": null, "mandate_data": null, "setup_future_usage": "on_session", "off_session": null, "capture_on": null, "capture_method": "automatic", "payment_method": "card", "payment_method_data": { "card": { "last4": "4242", "card_type": null, "card_network": null, "card_issuer": null, "card_issuing_country": null, "card_isin": "424242", "card_extended_bin": null, "card_exp_month": "07", "card_exp_year": "27", "card_holder_name": "joseph Doe", "payment_checks": { "cvc_check": "pass", "address_line1_check": "pass", "address_postal_code_check": "pass" }, "authentication_data": null, "auth_code": null }, "billing": { "address": { "city": "San Fransico", "country": "US", "line1": "1467", "line2": "Harrison Street", "line3": "Harrison Street", "zip": "94122", "state": "California", "first_name": "joseph", "last_name": "Doe", "origin_zip": null }, "phone": { "number": "8056594427", "country_code": "+91" }, "email": "guest3@example.com" } }, "payment_token": null, "shipping": { "address": { "city": "San Fransico", "country": "US", "line1": "1467", "line2": "Harrison Street", "line3": "Harrison Street", "zip": "94122", "state": "California", "first_name": "joseph", "last_name": "Doe", "origin_zip": null }, "phone": { "number": "8056594427", "country_code": "+91" }, "email": "guest@example.com" }, "billing": { "address": { "city": "San Fransico", "country": "US", "line1": "1467", "line2": "Harrison Street", "line3": "Harrison Street", "zip": "94122", "state": "California", "first_name": "joseph", "last_name": "Doe", "origin_zip": null }, "phone": { "number": "8056594427", "country_code": "+91" }, "email": "guest@example.com" }, "order_details": [ { "sku": null, "upc": null, "brand": null, "amount": 6540, "category": null, "quantity": 1, "tax_rate": null, "product_id": null, "description": null, "product_name": "Apple iphone 15", "product_type": null, "sub_category": null, "total_amount": null, "commodity_code": null, "unit_of_measure": null, "product_img_link": null, "product_tax_code": null, "total_tax_amount": null, "requires_shipping": null, "unit_discount_amount": null } ], "email": null, "name": null, "phone": null, "return_url": "https://google.com/", "authentication_type": "no_three_ds", "statement_descriptor_name": "joseph", "statement_descriptor_suffix": "JS", "next_action": null, "cancellation_reason": null, "error_code": null, "error_message": null, "unified_code": null, "unified_message": null, "error_details": null, "payment_experience": null, "payment_method_type": "credit", "connector_label": null, "business_country": null, "business_label": "default", "business_sub_label": null, "allowed_payment_method_types": null, "manual_retry_allowed": null, "connector_transaction_id": "pi_3TGEbpIVaesDjvMP21TmiaLr", "frm_message": null, "metadata": { "udf1": "value1", "login_date": "2019-09-10T10:11:12Z", "new_customer": "true" }, "connector_metadata": { "apple_pay": null, "airwallex": null, "noon": { "order_category": "pay" }, "braintree": null, "adyen": null, "peachpayments": null, "santander": null }, "connector_response_metadata": null, "feature_metadata": { "redirect_response": null, "search_tags": null, "apple_pay_recurring_details": null, "pix_additional_details": null, "boleto_additional_details": null }, "reference_id": "pi_3TGEbpIVaesDjvMP21TmiaLr", "payment_link": null, "profile_id": "pro_tGbbq73tVsUoGF1Bcwe3", "surcharge_details": null, "attempt_count": 1, "merchant_decision": null, "merchant_connector_id": "mca_8i4hPSXaEPdyIlLm7POn", "incremental_authorization_allowed": false, "authorization_count": null, "incremental_authorizations": null, "external_authentication_details": null, "external_3ds_authentication_attempted": false, "expires_on": "2026-03-29T08:37:13.204Z", "fingerprint": null, "browser_info": { "language": "nl-NL", "time_zone": 0, "ip_address": "128.0.0.1", "user_agent": "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/70.0.3538.110 Safari/537.36", "color_depth": 24, "java_enabled": true, "screen_width": 1536, "accept_header": "text/html,application/xhtml+xml,application/xml;q=0.9,image/webp,image/apng,*/*;q=0.8", "screen_height": 723, "java_script_enabled": true }, "payment_channel": null, "payment_method_id": null, "network_transaction_id": "115103708757668", "payment_method_status": null, "updated": "2026-03-29T08:22:15.101Z", "split_payments": null, "frm_metadata": null, "extended_authorization_applied": false, "extended_authorization_last_applied_at": null, "request_extended_authorization": null, "capture_before": null, "merchant_order_reference_id": "test_ord", "order_tax_amount": null, "connector_mandate_id": null, "card_discovery": "manual", "force_3ds_challenge": false, "force_3ds_challenge_trigger": false, "issuer_error_code": null, "issuer_error_message": null, "is_iframe_redirection_enabled": null, "whole_connector_response": null, "enable_partial_authorization": null, "enable_overcapture": null, "is_overcapture_enabled": false, "network_details": null, "is_stored_credential": null, "mit_category": null, "billing_descriptor": null, "tokenization": null, "partner_merchant_identifier_details": null, "payment_method_tokenization_details": null, "installment_options": null, "installment_data": null } }, "timestamp": "2026-03-29T08:22:15.128Z", "processor_merchant_id": "merchant_1774771168" }Can verify in events table:
Can verify clickhouse table that merchant_id and processor_merchant_id are populated correctly:

Incoming Webhook Flow Testing:
Configured webhook endpoint on stripe dashboard.
Connected merchant triggering payment with confirm =
false, capture_method =automatic{ "payment_id": "pay_0GUuSYtX528E8zWfx5th", "merchant_id": "merchant_1774770747", "status": "requires_confirmation", "amount": 6540, "net_amount": 6540, "shipping_cost": null, "amount_capturable": 0, "amount_received": null, "processor_merchant_id": "merchant_1774771168", "initiator": "connected", "sdk_authorization": "cHJvZmlsZV9pZD1wcm9fdEdiYnE3M3RWc1VvR0YxQmN3ZTMscHVibGlzaGFibGVfa2V5PXBrX2Rldl83MmUzYjZkNTExMGE0OGM2YTkwMDZjYzllODA1YTliYSxjbGllbnRfc2VjcmV0PXBheV8wR1V1U1l0WDUyOEU4eldmeDV0aF9zZWNyZXRfMVIwYU45OFJrTnZWeW1WVm5OdFgsY3VzdG9tZXJfaWQ9Y29ubmVjdGVkMQ==", "connector": null, "state_metadata": null, "client_secret": "pay_0GUuSYtX528E8zWfx5th_secret_1R0aN98RkNvVymVVnNtX", "created": "2026-03-29T09:45:55.546Z", "modified_at": "2026-03-29T09:45:55.579Z", "currency": "USD", "customer_id": null, "customer": null, "description": "Its my first payment request", "refunds": null, "disputes": null, "mandate_id": null, "mandate_data": null, "setup_future_usage": "on_session", "off_session": null, "capture_on": null, "capture_method": "manual", "payment_method": "card", "payment_method_data": { "card": { "last4": "4242", "card_type": null, "card_network": null, "card_issuer": null, "card_issuing_country": null, "card_isin": "424242", "card_extended_bin": null, "card_exp_month": "07", "card_exp_year": "27", "card_holder_name": "joseph Doe", "payment_checks": null, "authentication_data": null, "auth_code": null }, "billing": { "address": { "city": "San Fransico", "country": "US", "line1": "1467", "line2": "Harrison Street", "line3": "Harrison Street", "zip": "94122", "state": "California", "first_name": "joseph", "last_name": "Doe", "origin_zip": null }, "phone": { "number": "8056594427", "country_code": "+91" }, "email": "guest3@example.com" } }, "payment_token": "token_lgGK5Zs8u8ccc0tZOiPM", "shipping": { "address": { "city": "San Fransico", "country": "US", "line1": "1467", "line2": "Harrison Street", "line3": "Harrison Street", "zip": "94122", "state": "California", "first_name": "joseph", "last_name": "Doe", "origin_zip": null }, "phone": { "number": "8056594427", "country_code": "+91" }, "email": "guest@example.com" }, "billing": { "address": { "city": "San Fransico", "country": "US", "line1": "1467", "line2": "Harrison Street", "line3": "Harrison Street", "zip": "94122", "state": "California", "first_name": "joseph", "last_name": "Doe", "origin_zip": null }, "phone": { "number": "8056594427", "country_code": "+91" }, "email": "guest@example.com" }, "order_details": [ { "sku": null, "upc": null, "brand": null, "amount": 6540, "category": null, "quantity": 1, "tax_rate": null, "product_id": null, "description": null, "product_name": "Apple iphone 15", "product_type": null, "sub_category": null, "total_amount": null, "commodity_code": null, "unit_of_measure": null, "product_img_link": null, "product_tax_code": null, "total_tax_amount": null, "requires_shipping": null, "unit_discount_amount": null } ], "email": null, "name": null, "phone": null, "return_url": "https://google.com/", "authentication_type": "no_three_ds", "statement_descriptor_name": "joseph", "statement_descriptor_suffix": "JS", "next_action": null, "cancellation_reason": null, "error_code": null, "error_message": null, "unified_code": null, "unified_message": null, "error_details": null, "payment_experience": null, "payment_method_type": "credit", "connector_label": null, "business_country": null, "business_label": "default", "business_sub_label": null, "allowed_payment_method_types": null, "manual_retry_allowed": null, "connector_transaction_id": null, "frm_message": null, "metadata": { "udf1": "value1", "login_date": "2019-09-10T10:11:12Z", "new_customer": "true" }, "connector_metadata": { "apple_pay": null, "airwallex": null, "noon": { "order_category": "pay" }, "braintree": null, "adyen": null, "peachpayments": null, "santander": null }, "connector_response_metadata": null, "feature_metadata": null, "reference_id": null, "payment_link": null, "profile_id": "pro_tGbbq73tVsUoGF1Bcwe3", "surcharge_details": null, "attempt_count": 1, "merchant_decision": null, "merchant_connector_id": null, "incremental_authorization_allowed": null, "authorization_count": null, "incremental_authorizations": null, "external_authentication_details": null, "external_3ds_authentication_attempted": false, "expires_on": "2026-03-29T10:00:55.546Z", "fingerprint": null, "browser_info": { "language": "nl-NL", "time_zone": 0, "ip_address": "128.0.0.1", "user_agent": "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/70.0.3538.110 Safari/537.36", "color_depth": 24, "java_enabled": true, "screen_width": 1536, "accept_header": "text/html,application/xhtml+xml,application/xml;q=0.9,image/webp,image/apng,*/*;q=0.8", "screen_height": 723, "java_script_enabled": true }, "payment_channel": null, "payment_method_id": null, "network_transaction_id": null, "payment_method_status": null, "updated": "2026-03-29T09:45:55.579Z", "split_payments": null, "frm_metadata": null, "extended_authorization_applied": null, "extended_authorization_last_applied_at": null, "request_extended_authorization": null, "capture_before": null, "merchant_order_reference_id": "test_ord", "order_tax_amount": null, "connector_mandate_id": null, "card_discovery": null, "force_3ds_challenge": false, "force_3ds_challenge_trigger": false, "issuer_error_code": null, "issuer_error_message": null, "is_iframe_redirection_enabled": null, "whole_connector_response": null, "enable_partial_authorization": null, "enable_overcapture": null, "is_overcapture_enabled": null, "network_details": null, "is_stored_credential": null, "mit_category": null, "billing_descriptor": null, "tokenization": null, "partner_merchant_identifier_details": null, "payment_method_tokenization_details": null, "installment_options": null, "installment_data": null }Confirm Payment:
{ "payment_id": "pay_0GUuSYtX528E8zWfx5th", "merchant_id": "merchant_1774770747", "status": "requires_capture", "amount": 6540, "net_amount": 6540, "shipping_cost": null, "amount_capturable": 6540, "amount_received": null, "processor_merchant_id": "merchant_1774771168", "initiator": "connected", "sdk_authorization": "cHJvZmlsZV9pZD1wcm9fdEdiYnE3M3RWc1VvR0YxQmN3ZTMscHVibGlzaGFibGVfa2V5PXBrX2Rldl83MmUzYjZkNTExMGE0OGM2YTkwMDZjYzllODA1YTliYSxjbGllbnRfc2VjcmV0PXBheV8wR1V1U1l0WDUyOEU4eldmeDV0aF9zZWNyZXRfMVIwYU45OFJrTnZWeW1WVm5OdFgsY3VzdG9tZXJfaWQ9Y29ubmVjdGVkMQ==", "connector": "stripe", "state_metadata": null, "client_secret": "pay_0GUuSYtX528E8zWfx5th_secret_1R0aN98RkNvVymVVnNtX", "created": "2026-03-29T09:45:55.546Z", "modified_at": "2026-03-29T09:46:05.478Z", "currency": "USD", "customer_id": "connected1", "customer": { "id": "connected1", "name": "John Doe", "email": "customer@gmail.com", "phone": "9999999999", "phone_country_code": "+1", "customer_document_details": null }, "description": "Its my first payment request", "refunds": null, "disputes": null, "mandate_id": null, "mandate_data": null, "setup_future_usage": "on_session", "off_session": null, "capture_on": null, "capture_method": "manual", "payment_method": "card", "payment_method_data": { "card": { "last4": "4242", "card_type": null, "card_network": null, "card_issuer": null, "card_issuing_country": null, "card_isin": "424242", "card_extended_bin": null, "card_exp_month": "07", "card_exp_year": "27", "card_holder_name": "joseph Doe", "payment_checks": { "cvc_check": "pass", "address_line1_check": "pass", "address_postal_code_check": "pass" }, "authentication_data": null, "auth_code": null }, "billing": { "address": { "city": "San Fransico", "country": "US", "line1": "1467", "line2": "Harrison Street", "line3": "Harrison Street", "zip": "94122", "state": "California", "first_name": "joseph", "last_name": "Doe", "origin_zip": null }, "phone": { "number": "8056594427", "country_code": "+91" }, "email": "guest@example.com" } }, "payment_token": "token_lgGK5Zs8u8ccc0tZOiPM", "shipping": { "address": { "city": "San Fransico", "country": "US", "line1": "1467", "line2": "Harrison Street", "line3": "Harrison Street", "zip": "94122", "state": "California", "first_name": "joseph", "last_name": "Doe", "origin_zip": null }, "phone": { "number": "8056594427", "country_code": "+91" }, "email": "guest@example.com" }, "billing": { "address": { "city": "San Fransico", "country": "US", "line1": "1467", "line2": "Harrison Street", "line3": "Harrison Street", "zip": "94122", "state": "California", "first_name": "joseph", "last_name": "Doe", "origin_zip": null }, "phone": { "number": "8056594427", "country_code": "+91" }, "email": "guest@example.com" }, "order_details": [ { "sku": null, "upc": null, "brand": null, "amount": 6540, "category": null, "quantity": 1, "tax_rate": null, "product_id": null, "description": null, "product_name": "Apple iphone 15", "product_type": null, "sub_category": null, "total_amount": null, "commodity_code": null, "unit_of_measure": null, "product_img_link": null, "product_tax_code": null, "total_tax_amount": null, "requires_shipping": null, "unit_discount_amount": null } ], "email": "customer@gmail.com", "name": "John Doe", "phone": "9999999999", "return_url": "https://google.com/", "authentication_type": "no_three_ds", "statement_descriptor_name": "joseph", "statement_descriptor_suffix": "JS", "next_action": null, "cancellation_reason": null, "error_code": null, "error_message": null, "unified_code": null, "unified_message": null, "error_details": null, "payment_experience": null, "payment_method_type": "credit", "connector_label": null, "business_country": null, "business_label": "default", "business_sub_label": null, "allowed_payment_method_types": null, "manual_retry_allowed": null, "connector_transaction_id": "pi_3TGFuyIVaesDjvMP2u3MVJMo", "frm_message": null, "metadata": { "udf1": "value1", "login_date": "2019-09-10T10:11:12Z", "new_customer": "true" }, "connector_metadata": { "apple_pay": null, "airwallex": null, "noon": { "order_category": "pay" }, "braintree": null, "adyen": null, "peachpayments": null, "santander": null }, "connector_response_metadata": null, "feature_metadata": { "redirect_response": null, "search_tags": null, "apple_pay_recurring_details": null, "pix_additional_details": null, "boleto_additional_details": null }, "reference_id": "pi_3TGFuyIVaesDjvMP2u3MVJMo", "payment_link": null, "profile_id": "pro_tGbbq73tVsUoGF1Bcwe3", "surcharge_details": null, "attempt_count": 1, "merchant_decision": null, "merchant_connector_id": "mca_8i4hPSXaEPdyIlLm7POn", "incremental_authorization_allowed": false, "authorization_count": null, "incremental_authorizations": null, "external_authentication_details": null, "external_3ds_authentication_attempted": false, "expires_on": "2026-03-29T10:00:55.546Z", "fingerprint": null, "browser_info": { "os_type": null, "referer": null, "language": "nl-NL", "time_zone": 0, "ip_address": "128.0.0.1", "os_version": null, "user_agent": "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/70.0.3538.110 Safari/537.36", "color_depth": 24, "device_model": null, "java_enabled": true, "screen_width": 1536, "accept_header": "text/html,application/xhtml+xml,application/xml;q=0.9,image/webp,image/apng,*/*;q=0.8", "screen_height": 723, "accept_language": "en", "java_script_enabled": true }, "payment_channel": null, "payment_method_id": null, "network_transaction_id": "115103708757668", "payment_method_status": null, "updated": "2026-03-29T09:46:05.478Z", "split_payments": null, "frm_metadata": null, "extended_authorization_applied": false, "extended_authorization_last_applied_at": null, "request_extended_authorization": null, "capture_before": null, "merchant_order_reference_id": "test_ord", "order_tax_amount": null, "connector_mandate_id": null, "card_discovery": "manual", "force_3ds_challenge": false, "force_3ds_challenge_trigger": false, "issuer_error_code": null, "issuer_error_message": null, "is_iframe_redirection_enabled": null, "whole_connector_response": null, "enable_partial_authorization": null, "enable_overcapture": null, "is_overcapture_enabled": false, "network_details": null, "is_stored_credential": null, "mit_category": null, "billing_descriptor": null, "tokenization": null, "partner_merchant_identifier_details": null, "payment_method_tokenization_details": null, "installment_options": null, "installment_data": null }Now payment is in non-terminal state.
Go to stripe dashboard, and manually captured the payment. Stripe sent an incoming webhook which triggered the outgoing webhook

Can view it in the webhook dashboard as well:

Similarly, create a payment using platform merchant on behalf of connected merchant, then confirm the payment, go to the stripe dashboard, and capture the payment.
Should be able to get both the webhooks (payment flow + incoming webhook triggered outgoing webhook) at the platform merchant configured webhook endpoint.
Verified the same.
Checklist
cargo +nightly fmt --allcargo clippy