Skip to content

feat(connector): [stripe] add split payment support to capture, void and Setupmandate flows v1#10165

Merged
likhinbopanna merged 7 commits intomainfrom
add-split-payments-to-capture
Nov 7, 2025
Merged

feat(connector): [stripe] add split payment support to capture, void and Setupmandate flows v1#10165
likhinbopanna merged 7 commits intomainfrom
add-split-payments-to-capture

Conversation

@AkshayaFoiger
Copy link
Contributor

@AkshayaFoiger AkshayaFoiger commented Nov 7, 2025

Type of Change

  • Bugfix
  • New feature
  • Enhancement
  • Refactoring
  • Dependency updates
  • Documentation
  • CI/CD

Description

Split payment was earlier supported by stripe only through the authorization and refund flows. Now this feature is been expanded to support stripe's Capture, Void and Setupmandate flow
Feature Doc:
https://docs.hyperswitch.io/explore-hyperswitch/payment-orchestration/split-payments

How did you test it?

  1. The cypress test run along the PR confirms the successful sanity test of stripe
  2. This feature (split payments) currently doesn’t have an existing Cypress test suite, so Cypress tests haven’t been added as part of this change.

Tests Performed

Sanity - Create a CIT and MIT with Automatic capture

CIT - CREAT + CONFRIM

curl --location 'http://localhost:8080/payments' \
--header 'Content-Type: application/json' \
--header 'Accept: application/json' \
--header 'api-key: dev_H5X96N4ntgwzfctDnP9mDLjCrq9ayx2aQv5bORNOzoVWfsd17uSqyDJdTxatbMj3' \
--data-raw '{
    "amount": 100,
    "currency": "USD",
    "confirm": true,
    "capture_method": "automatic",
    "email": "hello@123.com",
      "split_payments": {
    "stripe_split_payment": {
      "charge_type": "direct",
      "application_fees": 0,
      "transfer_account_id": "acct_1RWCjbRT4izcUWmO"
    }
  },
    "authentication_type": "no_three_ds",
    "customer": {
        "id": "abcd"
    },
    "payment_method": "card",
    "payment_method_type": "credit",
    "payment_method_data": {
       "card": {
            "card_number": "5555555555554444",
            "card_exp_month": "10",
            "card_exp_year": "29",
            "card_holder_name": "Joseph Does",
            "card_cvc": "900"
        }
    },
    "customer_acceptance": {
        "acceptance_type": "online",
        "accepted_at": "2025-03-27T13:56:49.848Z",
        "online": {
            "ip_address": null,
            "user_agent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/18.3 Safari/605.1.15"
        }
    },
    "setup_future_usage": "off_session",
    "billing": {
        "address": {
            "zip": "46203",
            "country": "US",
            "state": "TX",

            "line1": "14",
            "line2": "Main",
            "line3": "Street",
            "city": "Pecan Springs"
        }
    }
}'

Response

{
    "payment_id": "pay_JFOcufY9Vu9WqX3VE3xp",
    "merchant_id": "postman_merchant_GHAction_598fc19b-2ed4-4cbe-acaa-f7c47933db05",
    "status": "succeeded",
    "amount": 100,
    "net_amount": 100,
    "shipping_cost": null,
    "amount_capturable": 0,
    "amount_received": 100,
    "connector": "stripe",
    "client_secret": "pay_JFOcufY9Vu9WqX3VE3xp_secret_AjX4Kq6QyE3F0J1IyhsE",
    "created": "2025-11-07T07:05:49.012Z",
    "currency": "USD",
    "customer_id": "abcd",
    "customer": {
        "id": "abcd",
        "name": null,
        "email": "hello@123.com",
        "phone": null,
        "phone_country_code": null
    },
    "description": null,
    "refunds": null,
    "disputes": null,
    "mandate_id": null,
    "mandate_data": null,
    "setup_future_usage": "off_session",
    "off_session": null,
    "capture_on": null,
    "capture_method": "automatic",
    "payment_method": "card",
    "payment_method_data": {
        "card": {
            "last4": "4444",
            "card_type": null,
            "card_network": null,
            "card_issuer": null,
            "card_issuing_country": null,
            "card_isin": "555555",
            "card_extended_bin": null,
            "card_exp_month": "10",
            "card_exp_year": "29",
            "card_holder_name": "Joseph Does",
            "payment_checks": {
                "cvc_check": "pass",
                "address_line1_check": "pass",
                "address_postal_code_check": null
            },
            "authentication_data": null
        },
        "billing": null
    },
    "payment_token": null,
    "shipping": null,
    "billing": {
        "address": {
            "city": "Pecan Springs",
            "country": "US",
            "line1": "14",
            "line2": "Main",
            "line3": "Street",
            "zip": "46203",
            "state": "TX",
            "first_name": null,
            "last_name": null,
            "origin_zip": null
        },
        "phone": null,
        "email": null
    },
    "order_details": null,
    "email": "hello@123.com",
    "name": null,
    "phone": null,
    "return_url": null,
    "authentication_type": "no_three_ds",
    "statement_descriptor_name": null,
    "statement_descriptor_suffix": null,
    "next_action": null,
    "cancellation_reason": null,
    "error_code": null,
    "error_message": null,
    "unified_code": null,
    "unified_message": 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,
    "ephemeral_key": {
        "customer_id": "abcd",
        "created_at": 1762499148,
        "expires": 1762502748,
        "secret": "epk_11b9e6ef6e7149069b09b46e579de29c"
    },
    "manual_retry_allowed": null,
    "connector_transaction_id": "pi_3SQjk2RT4izcUWmO0SIQECcR",
    "frm_message": null,
    "metadata": null,
    "connector_metadata": null,
    "feature_metadata": {
        "redirect_response": null,
        "search_tags": null,
        "apple_pay_recurring_details": null,
        "gateway_system": "direct"
    },
    "reference_id": "pi_3SQjk2RT4izcUWmO0SIQECcR",
    "payment_link": null,
    "profile_id": "pro_geI878cezvJA1BvG0NM1",
    "surcharge_details": null,
    "attempt_count": 1,
    "merchant_decision": null,
    "merchant_connector_id": "mca_pftIKwiAx6eJ0lR8GBqx",
    "incremental_authorization_allowed": false,
    "authorization_count": null,
    "incremental_authorizations": null,
    "external_authentication_details": null,
    "external_3ds_authentication_attempted": false,
    "expires_on": "2025-11-07T07:20:49.012Z",
    "fingerprint": null,
    "browser_info": null,
    "payment_channel": null,
    "payment_method_id": "pm_SKPSOF8TlTPjrb1yPcFf",
    "network_transaction_id": "MCCKASEI21107",
    "payment_method_status": "active",
    "updated": "2025-11-07T07:05:51.162Z",
    "split_payments": {
        "stripe_split_payment": {
            "charge_id": "ch_3SQjk2RT4izcUWmO0PDVutbD",
            "charge_type": "direct",
            "application_fees": 0,
            "transfer_account_id": "acct_1RWCjbRT4izcUWmO"
        }
    },
    "frm_metadata": null,
    "extended_authorization_applied": false,
    "extended_authorization_last_applied_at": null,
    "request_extended_authorization": null,
    "capture_before": null,
    "merchant_order_reference_id": null,
    "order_tax_amount": null,
    "connector_mandate_id": "pm_1SQjk1RT4izcUWmOxsV91kbD",
    "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
}

MIT

{
    "payment_id": "pay_rJxPaZPt1vCqX6NUuhN0",
    "merchant_id": "postman_merchant_GHAction_598fc19b-2ed4-4cbe-acaa-f7c47933db05",
    "status": "succeeded",
    "amount": 10000,
    "net_amount": 10000,
    "shipping_cost": null,
    "amount_capturable": 0,
    "amount_received": 10000,
    "connector": "stripe",
    "client_secret": "pay_rJxPaZPt1vCqX6NUuhN0_secret_2pSbjErO8v9XzCbzS4c0",
    "created": "2025-11-07T07:07:11.322Z",
    "currency": "USD",
    "customer_id": "abcd",
    "customer": {
        "id": "abcd",
        "name": null,
        "email": "hello@123.com",
        "phone": null,
        "phone_country_code": null
    },
    "description": null,
    "refunds": null,
    "disputes": null,
    "mandate_id": null,
    "mandate_data": null,
    "setup_future_usage": null,
    "off_session": true,
    "capture_on": null,
    "capture_method": "automatic",
    "payment_method": "card",
    "payment_method_data": {
        "card": {
            "last4": "4444",
            "card_type": null,
            "card_network": null,
            "card_issuer": null,
            "card_issuing_country": null,
            "card_isin": "555555",
            "card_extended_bin": null,
            "card_exp_month": "10",
            "card_exp_year": "29",
            "card_holder_name": "Joseph Does",
            "payment_checks": {
                "cvc_check": "pass",
                "address_line1_check": "pass",
                "address_postal_code_check": null
            },
            "authentication_data": null
        },
        "billing": null
    },
    "payment_token": null,
    "shipping": null,
    "billing": null,
    "order_details": null,
    "email": "hello@123.com",
    "name": null,
    "phone": null,
    "return_url": null,
    "authentication_type": "no_three_ds",
    "statement_descriptor_name": null,
    "statement_descriptor_suffix": null,
    "next_action": null,
    "cancellation_reason": null,
    "error_code": null,
    "error_message": null,
    "unified_code": null,
    "unified_message": 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,
    "ephemeral_key": {
        "customer_id": "abcd",
        "created_at": 1762499229,
        "expires": 1762502829,
        "secret": "epk_4afed7c04c1b4259b1925e7dfc2abb99"
    },
    "manual_retry_allowed": null,
    "connector_transaction_id": "pi_3SQjlMRT4izcUWmO1p4tCNOv",
    "frm_message": null,
    "metadata": null,
    "connector_metadata": null,
    "feature_metadata": {
        "redirect_response": null,
        "search_tags": null,
        "apple_pay_recurring_details": null,
        "gateway_system": "direct"
    },
    "reference_id": "pi_3SQjlMRT4izcUWmO1p4tCNOv",
    "payment_link": null,
    "profile_id": "pro_geI878cezvJA1BvG0NM1",
    "surcharge_details": null,
    "attempt_count": 1,
    "merchant_decision": null,
    "merchant_connector_id": "mca_pftIKwiAx6eJ0lR8GBqx",
    "incremental_authorization_allowed": false,
    "authorization_count": null,
    "incremental_authorizations": null,
    "external_authentication_details": null,
    "external_3ds_authentication_attempted": false,
    "expires_on": "2025-11-07T07:22:11.322Z",
    "fingerprint": null,
    "browser_info": {
        "language": "nl-NL",
        "time_zone": 0,
        "ip_address": "13.232.74.226",
        "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": "pm_SKPSOF8TlTPjrb1yPcFf",
    "network_transaction_id": "MCCKASEI21107",
    "payment_method_status": "active",
    "updated": "2025-11-07T07:07:13.731Z",
    "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": null,
    "order_tax_amount": null,
    "connector_mandate_id": "pm_1SQjk1RT4izcUWmOxsV91kbD",
    "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": true,
    "mit_category": null
}
Create a Manual Split Payment and Capture it

Create a manual split payment

curl --location 'http://localhost:8080/payments' \
--header 'Content-Type: application/json' \
--header 'Accept: application/json' \
--header 'api-key: dev_H5X96N4ntgwzfctDnP9mDLjCrq9ayx2aQv5bORNOzoVWfsd17uSqyDJdTxatbMj3' \
--data-raw '{
    "amount": 100,
    "currency": "USD",
    "confirm": true,
    "capture_method": "manual",
    "email": "hello@123.com",
      "split_payments": {
    "stripe_split_payment": {
      "charge_type": "direct",
      "application_fees": 0,
      "transfer_account_id": "acct_1RWCjbRT4izcUWmO"
    }
  },
    
    "authentication_type": "no_three_ds",

    "customer": {
        "id": "abcd"
    },
    "payment_method": "card",
    "payment_method_type": "credit",
    "payment_method_data": {
       "card": {
            "card_number": "5555555555554444",
            "card_exp_month": "10",
            "card_exp_year": "29",
            "card_holder_name": "Joseph Does",
            "card_cvc": "900"
        }
    },
    
    "customer_acceptance": {
        "acceptance_type": "online",
        "accepted_at": "2025-03-27T13:56:49.848Z",
        "online": {
            "ip_address": null,
            "user_agent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/18.3 Safari/605.1.15"
        }
    },
    "setup_future_usage": "off_session",
    "billing": {
        "address": {
            "zip": "46203",
            "country": "US",
            "state": "TX",
            
            
            "line1": "14",
            "line2": "Main",
            "line3": "Street",
            "city": "Pecan Springs"
        }
    }
}'

Response

{
    "payment_id": "pay_p0qDVcnLfLJjpZSThZtk",
    "merchant_id": "postman_merchant_GHAction_598fc19b-2ed4-4cbe-acaa-f7c47933db05",
    "status": "requires_capture",
    "amount": 100,
    "net_amount": 100,
    "shipping_cost": null,
    "amount_capturable": 100,
    "amount_received": null,
    "connector": "stripe",
    "client_secret": "pay_p0qDVcnLfLJjpZSThZtk_secret_XBWfDKnfemGqBOHVASK1",
    "created": "2025-11-07T07:08:18.103Z",
    "currency": "USD",
    "customer_id": "abcd",
    "customer": {
        "id": "abcd",
        "name": null,
        "email": "hello@123.com",
        "phone": null,
        "phone_country_code": null
    },
    "description": null,
    "refunds": null,
    "disputes": null,
    "mandate_id": null,
    "mandate_data": null,
    "setup_future_usage": "off_session",
    "off_session": null,
    "capture_on": null,
    "capture_method": "manual",
    "payment_method": "card",
    "payment_method_data": {
        "card": {
            "last4": "4444",
            "card_type": null,
            "card_network": null,
            "card_issuer": null,
            "card_issuing_country": null,
            "card_isin": "555555",
            "card_extended_bin": null,
            "card_exp_month": "10",
            "card_exp_year": "29",
            "card_holder_name": "Joseph Does",
            "payment_checks": {
                "cvc_check": "pass",
                "address_line1_check": "pass",
                "address_postal_code_check": null
            },
            "authentication_data": null
        },
        "billing": null
    },
    "payment_token": null,
    "shipping": null,
    "billing": {
        "address": {
            "city": "Pecan Springs",
            "country": "US",
            "line1": "14",
            "line2": "Main",
            "line3": "Street",
            "zip": "46203",
            "state": "TX",
            "first_name": null,
            "last_name": null,
            "origin_zip": null
        },
        "phone": null,
        "email": null
    },
    "order_details": null,
    "email": "hello@123.com",
    "name": null,
    "phone": null,
    "return_url": null,
    "authentication_type": "no_three_ds",
    "statement_descriptor_name": null,
    "statement_descriptor_suffix": null,
    "next_action": null,
    "cancellation_reason": null,
    "error_code": null,
    "error_message": null,
    "unified_code": null,
    "unified_message": 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,
    "ephemeral_key": {
        "customer_id": "abcd",
        "created_at": 1762499298,
        "expires": 1762502898,
        "secret": "epk_c83ce94116b047b08413df06b663a196"
    },
    "manual_retry_allowed": null,
    "connector_transaction_id": "pi_3SQjmQRT4izcUWmO0QwBDjiw",
    "frm_message": null,
    "metadata": null,
    "connector_metadata": null,
    "feature_metadata": {
        "redirect_response": null,
        "search_tags": null,
        "apple_pay_recurring_details": null,
        "gateway_system": "direct"
    },
    "reference_id": "pi_3SQjmQRT4izcUWmO0QwBDjiw",
    "payment_link": null,
    "profile_id": "pro_geI878cezvJA1BvG0NM1",
    "surcharge_details": null,
    "attempt_count": 1,
    "merchant_decision": null,
    "merchant_connector_id": "mca_pftIKwiAx6eJ0lR8GBqx",
    "incremental_authorization_allowed": false,
    "authorization_count": null,
    "incremental_authorizations": null,
    "external_authentication_details": null,
    "external_3ds_authentication_attempted": false,
    "expires_on": "2025-11-07T07:23:18.103Z",
    "fingerprint": null,
    "browser_info": null,
    "payment_channel": null,
    "payment_method_id": "pm_V9DgGE57sLsPkj7nVDLM",
    "network_transaction_id": "MCCKASEI21107",
    "payment_method_status": "active",
    "updated": "2025-11-07T07:08:19.745Z",
    "split_payments": {
        "stripe_split_payment": {
            "charge_id": "ch_3SQjmQRT4izcUWmO0niMHOPj",
            "charge_type": "direct",
            "application_fees": 0,
            "transfer_account_id": "acct_1RWCjbRT4izcUWmO"
        }
    },
    "frm_metadata": null,
    "extended_authorization_applied": false,
    "extended_authorization_last_applied_at": null,
    "request_extended_authorization": null,
    "capture_before": null,
    "merchant_order_reference_id": null,
    "order_tax_amount": null,
    "connector_mandate_id": "pm_1SQjmQRT4izcUWmOwJzd7tc6",
    "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
}

Capture the payment

curl --location 'http://localhost:8080/payments/pay_p0qDVcnLfLJjpZSThZtk/capture' \
--header 'Content-Type: application/json' \
--header 'Accept: application/json' \
--header 'api-key: dev_H5X96N4ntgwzfctDnP9mDLjCrq9ayx2aQv5bORNOzoVWfsd17uSqyDJdTxatbMj3' \
--data '{

}'

Response

{
    "payment_id": "pay_p0qDVcnLfLJjpZSThZtk",
    "merchant_id": "postman_merchant_GHAction_598fc19b-2ed4-4cbe-acaa-f7c47933db05",
    "status": "succeeded",
    "amount": 100,
    "net_amount": 100,
    "shipping_cost": null,
    "amount_capturable": 0,
    "amount_received": 100,
    "connector": "stripe",
    "client_secret": "pay_p0qDVcnLfLJjpZSThZtk_secret_XBWfDKnfemGqBOHVASK1",
    "created": "2025-11-07T07:08:18.103Z",
    "currency": "USD",
    "customer_id": "abcd",
    "customer": {
        "id": "abcd",
        "name": null,
        "email": "hello@123.com",
        "phone": null,
        "phone_country_code": null
    },
    "description": null,
    "refunds": null,
    "disputes": null,
    "mandate_id": null,
    "mandate_data": null,
    "setup_future_usage": "off_session",
    "off_session": null,
    "capture_on": null,
    "capture_method": "manual",
    "payment_method": "card",
    "payment_method_data": {
        "card": {
            "last4": "4444",
            "card_type": null,
            "card_network": null,
            "card_issuer": null,
            "card_issuing_country": null,
            "card_isin": "555555",
            "card_extended_bin": null,
            "card_exp_month": "10",
            "card_exp_year": "29",
            "card_holder_name": "Joseph Does",
            "payment_checks": {
                "cvc_check": "pass",
                "address_line1_check": "pass",
                "address_postal_code_check": null
            },
            "authentication_data": null
        },
        "billing": null
    },
    "payment_token": null,
    "shipping": null,
    "billing": {
        "address": {
            "city": "Pecan Springs",
            "country": "US",
            "line1": "14",
            "line2": "Main",
            "line3": "Street",
            "zip": "46203",
            "state": "TX",
            "first_name": null,
            "last_name": null,
            "origin_zip": null
        },
        "phone": null,
        "email": null
    },
    "order_details": null,
    "email": "hello@123.com",
    "name": null,
    "phone": null,
    "return_url": null,
    "authentication_type": "no_three_ds",
    "statement_descriptor_name": null,
    "statement_descriptor_suffix": null,
    "next_action": null,
    "cancellation_reason": null,
    "error_code": null,
    "error_message": null,
    "unified_code": null,
    "unified_message": 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,
    "ephemeral_key": null,
    "manual_retry_allowed": null,
    "connector_transaction_id": "pi_3SQjmQRT4izcUWmO0QwBDjiw",
    "frm_message": null,
    "metadata": null,
    "connector_metadata": null,
    "feature_metadata": {
        "redirect_response": null,
        "search_tags": null,
        "apple_pay_recurring_details": null,
        "gateway_system": "direct"
    },
    "reference_id": "pi_3SQjmQRT4izcUWmO0QwBDjiw",
    "payment_link": null,
    "profile_id": "pro_geI878cezvJA1BvG0NM1",
    "surcharge_details": null,
    "attempt_count": 1,
    "merchant_decision": null,
    "merchant_connector_id": "mca_pftIKwiAx6eJ0lR8GBqx",
    "incremental_authorization_allowed": false,
    "authorization_count": null,
    "incremental_authorizations": null,
    "external_authentication_details": null,
    "external_3ds_authentication_attempted": false,
    "expires_on": "2025-11-07T07:23:18.103Z",
    "fingerprint": null,
    "browser_info": null,
    "payment_channel": null,
    "payment_method_id": "pm_V9DgGE57sLsPkj7nVDLM",
    "network_transaction_id": "MCCKASEI21107",
    "payment_method_status": null,
    "updated": "2025-11-07T07:09:58.410Z",
    "split_payments": {
        "stripe_split_payment": {
            "charge_id": "ch_3SQjmQRT4izcUWmO0niMHOPj",
            "charge_type": "direct",
            "application_fees": 0,
            "transfer_account_id": "acct_1RWCjbRT4izcUWmO"
        }
    },
    "frm_metadata": null,
    "extended_authorization_applied": false,
    "extended_authorization_last_applied_at": null,
    "request_extended_authorization": null,
    "capture_before": null,
    "merchant_order_reference_id": null,
    "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
}

Do an MIT

curl --location 'http://localhost:8080/payments' \
--header 'Content-Type: application/json' \
--header 'Accept: application/json' \
--header 'api-key: dev_H5X96N4ntgwzfctDnP9mDLjCrq9ayx2aQv5bORNOzoVWfsd17uSqyDJdTxatbMj3' \
--data '{
    "amount": 10000,
    "currency": "USD",
    "off_session": true,
    "confirm": true,
    "capture_method": "automatic",
    "recurring_details": {
        "type": "payment_method_id",
        "data": "pm_V9DgGE57sLsPkj7nVDLM"
    },
    "customer_id": "abcd",
    "browser_info": {
        "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",
        "accept_header": "text/html,application/xhtml+xml,application/xml;q=0.9,image/webp,image/apng,*/*;q=0.8",
        "language": "nl-NL",
        "color_depth": 24,
        "screen_height": 723,
        "screen_width": 1536,
        "time_zone": 0,
        "java_enabled": true,
        "java_script_enabled": true,
        "ip_address": "13.232.74.226"
    }
}'

Response

{
    "payment_id": "pay_5i7YzvuNasz6JRckCdxC",
    "merchant_id": "postman_merchant_GHAction_598fc19b-2ed4-4cbe-acaa-f7c47933db05",
    "status": "succeeded",
    "amount": 10000,
    "net_amount": 10000,
    "shipping_cost": null,
    "amount_capturable": 0,
    "amount_received": 10000,
    "connector": "stripe",
    "client_secret": "pay_5i7YzvuNasz6JRckCdxC_secret_4mQnoEMA1JcI5NnFAhMe",
    "created": "2025-11-07T07:11:34.405Z",
    "currency": "USD",
    "customer_id": "abcd",
    "customer": {
        "id": "abcd",
        "name": null,
        "email": "hello@123.com",
        "phone": null,
        "phone_country_code": null
    },
    "description": null,
    "refunds": null,
    "disputes": null,
    "mandate_id": null,
    "mandate_data": null,
    "setup_future_usage": null,
    "off_session": true,
    "capture_on": null,
    "capture_method": "automatic",
    "payment_method": "card",
    "payment_method_data": {
        "card": {
            "last4": "4444",
            "card_type": null,
            "card_network": null,
            "card_issuer": null,
            "card_issuing_country": null,
            "card_isin": "555555",
            "card_extended_bin": null,
            "card_exp_month": "10",
            "card_exp_year": "29",
            "card_holder_name": "Joseph Does",
            "payment_checks": {
                "cvc_check": "pass",
                "address_line1_check": "pass",
                "address_postal_code_check": null
            },
            "authentication_data": null
        },
        "billing": null
    },
    "payment_token": null,
    "shipping": null,
    "billing": null,
    "order_details": null,
    "email": "hello@123.com",
    "name": null,
    "phone": null,
    "return_url": null,
    "authentication_type": "no_three_ds",
    "statement_descriptor_name": null,
    "statement_descriptor_suffix": null,
    "next_action": null,
    "cancellation_reason": null,
    "error_code": null,
    "error_message": null,
    "unified_code": null,
    "unified_message": 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,
    "ephemeral_key": {
        "customer_id": "abcd",
        "created_at": 1762499494,
        "expires": 1762503094,
        "secret": "epk_bd8527ff7eac4c9d9db96fde4117d600"
    },
    "manual_retry_allowed": null,
    "connector_transaction_id": "pi_3SQjpaRT4izcUWmO1BH0FJKx",
    "frm_message": null,
    "metadata": null,
    "connector_metadata": null,
    "feature_metadata": {
        "redirect_response": null,
        "search_tags": null,
        "apple_pay_recurring_details": null,
        "gateway_system": "direct"
    },
    "reference_id": "pi_3SQjpaRT4izcUWmO1BH0FJKx",
    "payment_link": null,
    "profile_id": "pro_geI878cezvJA1BvG0NM1",
    "surcharge_details": null,
    "attempt_count": 1,
    "merchant_decision": null,
    "merchant_connector_id": "mca_pftIKwiAx6eJ0lR8GBqx",
    "incremental_authorization_allowed": false,
    "authorization_count": null,
    "incremental_authorizations": null,
    "external_authentication_details": null,
    "external_3ds_authentication_attempted": false,
    "expires_on": "2025-11-07T07:26:34.405Z",
    "fingerprint": null,
    "browser_info": {
        "language": "nl-NL",
        "time_zone": 0,
        "ip_address": "13.232.74.226",
        "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": "pm_V9DgGE57sLsPkj7nVDLM",
    "network_transaction_id": "MCCKASEI21107",
    "payment_method_status": "active",
    "updated": "2025-11-07T07:11:35.658Z",
    "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": null,
    "order_tax_amount": null,
    "connector_mandate_id": "pm_1SQjmQRT4izcUWmOwJzd7tc6",
    "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": true,
    "mit_category": null
}
Create a split manual payment and void it
curl --location 'http://localhost:8080/payments' \
--header 'Content-Type: application/json' \
--header 'Accept: application/json' \
--header 'api-key: dev_H5X96N4ntgwzfctDnP9mDLjCrq9ayx2aQv5bORNOzoVWfsd17uSqyDJdTxatbMj3' \
--data-raw '{
    "amount": 100,
    "currency": "USD",
    "confirm": true,
    "capture_method": "manual",
    "email": "hello@123.com",
      "split_payments": {
    "stripe_split_payment": {
      "charge_type": "direct",
      "application_fees": 0,
      "transfer_account_id": "acct_1RWCjbRT4izcUWmO"
    }
  },
    
    "authentication_type": "no_three_ds",
    
    "customer": {
        "id": "abcd"
    },
    "payment_method": "card",
    "payment_method_type": "credit",
    
    "payment_method_data": {
       "card": {
            "card_number": "5555555555554444",
            "card_exp_month": "10",
            "card_exp_year": "29",
            "card_holder_name": "Joseph Does",
            "card_cvc": "900"
        }
    },

    "billing": {
        "address": {
            "zip": "46203",
            "country": "US",
            "state": "TX",
            
            
            "line1": "14",
            "line2": "Main",
            "line3": "Street",
            "city": "Pecan Springs"
        }
    }
}'

Response

{
    "payment_id": "pay_9IrhnEVgeV0zNK1Ql5Oj",
    "merchant_id": "postman_merchant_GHAction_598fc19b-2ed4-4cbe-acaa-f7c47933db05",
    "status": "requires_capture",
    "amount": 100,
    "net_amount": 100,
    "shipping_cost": null,
    "amount_capturable": 100,
    "amount_received": null,
    "connector": "stripe",
    "client_secret": "pay_9IrhnEVgeV0zNK1Ql5Oj_secret_AejAExL8EhwTKoLfjntx",
    "created": "2025-11-07T07:13:11.828Z",
    "currency": "USD",
    "customer_id": "abcd",
    "customer": {
        "id": "abcd",
        "name": null,
        "email": "hello@123.com",
        "phone": null,
        "phone_country_code": null
    },
    "description": null,
    "refunds": null,
    "disputes": null,
    "mandate_id": null,
    "mandate_data": null,
    "setup_future_usage": null,
    "off_session": null,
    "capture_on": null,
    "capture_method": "manual",
    "payment_method": "card",
    "payment_method_data": {
        "card": {
            "last4": "4444",
            "card_type": null,
            "card_network": null,
            "card_issuer": null,
            "card_issuing_country": null,
            "card_isin": "555555",
            "card_extended_bin": null,
            "card_exp_month": "10",
            "card_exp_year": "29",
            "card_holder_name": "Joseph Does",
            "payment_checks": {
                "cvc_check": "pass",
                "address_line1_check": "pass",
                "address_postal_code_check": null
            },
            "authentication_data": null
        },
        "billing": null
    },
    "payment_token": null,
    "shipping": null,
    "billing": {
        "address": {
            "city": "Pecan Springs",
            "country": "US",
            "line1": "14",
            "line2": "Main",
            "line3": "Street",
            "zip": "46203",
            "state": "TX",
            "first_name": null,
            "last_name": null,
            "origin_zip": null
        },
        "phone": null,
        "email": null
    },
    "order_details": null,
    "email": "hello@123.com",
    "name": null,
    "phone": null,
    "return_url": null,
    "authentication_type": "no_three_ds",
    "statement_descriptor_name": null,
    "statement_descriptor_suffix": null,
    "next_action": null,
    "cancellation_reason": null,
    "error_code": null,
    "error_message": null,
    "unified_code": null,
    "unified_message": 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,
    "ephemeral_key": {
        "customer_id": "abcd",
        "created_at": 1762499591,
        "expires": 1762503191,
        "secret": "epk_6dc468ff9deb4b828a0a120593234c81"
    },
    "manual_retry_allowed": null,
    "connector_transaction_id": "pi_3SQjrART4izcUWmO0FkNXRpp",
    "frm_message": null,
    "metadata": null,
    "connector_metadata": null,
    "feature_metadata": {
        "redirect_response": null,
        "search_tags": null,
        "apple_pay_recurring_details": null,
        "gateway_system": "direct"
    },
    "reference_id": "pi_3SQjrART4izcUWmO0FkNXRpp",
    "payment_link": null,
    "profile_id": "pro_geI878cezvJA1BvG0NM1",
    "surcharge_details": null,
    "attempt_count": 1,
    "merchant_decision": null,
    "merchant_connector_id": "mca_pftIKwiAx6eJ0lR8GBqx",
    "incremental_authorization_allowed": false,
    "authorization_count": null,
    "incremental_authorizations": null,
    "external_authentication_details": null,
    "external_3ds_authentication_attempted": false,
    "expires_on": "2025-11-07T07:28:11.828Z",
    "fingerprint": null,
    "browser_info": null,
    "payment_channel": null,
    "payment_method_id": null,
    "network_transaction_id": "MCCKASEI21107",
    "payment_method_status": null,
    "updated": "2025-11-07T07:13:13.318Z",
    "split_payments": {
        "stripe_split_payment": {
            "charge_id": "ch_3SQjrART4izcUWmO0Bnlzte4",
            "charge_type": "direct",
            "application_fees": 0,
            "transfer_account_id": "acct_1RWCjbRT4izcUWmO"
        }
    },
    "frm_metadata": null,
    "extended_authorization_applied": false,
    "extended_authorization_last_applied_at": null,
    "request_extended_authorization": null,
    "capture_before": null,
    "merchant_order_reference_id": null,
    "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
}

Void the payment

curl --location 'http://localhost:8080/payments/pay_9IrhnEVgeV0zNK1Ql5Oj/cancel' \
--header 'Content-Type: application/json' \
--header 'Accept: application/json' \
--header 'api-key: dev_H5X96N4ntgwzfctDnP9mDLjCrq9ayx2aQv5bORNOzoVWfsd17uSqyDJdTxatbMj3' \
--data '{
    "cancellation_reason": "requested_by_customer"
}'

Response

{
    "payment_id": "pay_9IrhnEVgeV0zNK1Ql5Oj",
    "merchant_id": "postman_merchant_GHAction_598fc19b-2ed4-4cbe-acaa-f7c47933db05",
    "status": "cancelled",
    "amount": 100,
    "net_amount": 100,
    "shipping_cost": null,
    "amount_capturable": 0,
    "amount_received": null,
    "connector": "stripe",
    "client_secret": "pay_9IrhnEVgeV0zNK1Ql5Oj_secret_AejAExL8EhwTKoLfjntx",
    "created": "2025-11-07T07:13:11.828Z",
    "currency": "USD",
    "customer_id": "abcd",
    "customer": {
        "id": "abcd",
        "name": null,
        "email": "hello@123.com",
        "phone": null,
        "phone_country_code": null
    },
    "description": null,
    "refunds": null,
    "disputes": null,
    "mandate_id": null,
    "mandate_data": null,
    "setup_future_usage": null,
    "off_session": null,
    "capture_on": null,
    "capture_method": "manual",
    "payment_method": "card",
    "payment_method_data": {
        "card": {
            "last4": "4444",
            "card_type": null,
            "card_network": null,
            "card_issuer": null,
            "card_issuing_country": null,
            "card_isin": "555555",
            "card_extended_bin": null,
            "card_exp_month": "10",
            "card_exp_year": "29",
            "card_holder_name": "Joseph Does",
            "payment_checks": {
                "cvc_check": "pass",
                "address_line1_check": "pass",
                "address_postal_code_check": null
            },
            "authentication_data": null
        },
        "billing": null
    },
    "payment_token": null,
    "shipping": null,
    "billing": {
        "address": {
            "city": "Pecan Springs",
            "country": "US",
            "line1": "14",
            "line2": "Main",
            "line3": "Street",
            "zip": "46203",
            "state": "TX",
            "first_name": null,
            "last_name": null,
            "origin_zip": null
        },
        "phone": null,
        "email": null
    },
    "order_details": null,
    "email": "hello@123.com",
    "name": null,
    "phone": null,
    "return_url": null,
    "authentication_type": "no_three_ds",
    "statement_descriptor_name": null,
    "statement_descriptor_suffix": null,
    "next_action": null,
    "cancellation_reason": "requested_by_customer",
    "error_code": null,
    "error_message": null,
    "unified_code": null,
    "unified_message": 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,
    "ephemeral_key": null,
    "manual_retry_allowed": null,
    "connector_transaction_id": "pi_3SQjrART4izcUWmO0FkNXRpp",
    "frm_message": null,
    "metadata": null,
    "connector_metadata": null,
    "feature_metadata": {
        "redirect_response": null,
        "search_tags": null,
        "apple_pay_recurring_details": null,
        "gateway_system": "direct"
    },
    "reference_id": "pi_3SQjrART4izcUWmO0FkNXRpp",
    "payment_link": null,
    "profile_id": "pro_geI878cezvJA1BvG0NM1",
    "surcharge_details": null,
    "attempt_count": 1,
    "merchant_decision": null,
    "merchant_connector_id": "mca_pftIKwiAx6eJ0lR8GBqx",
    "incremental_authorization_allowed": false,
    "authorization_count": null,
    "incremental_authorizations": null,
    "external_authentication_details": null,
    "external_3ds_authentication_attempted": false,
    "expires_on": "2025-11-07T07:28:11.828Z",
    "fingerprint": null,
    "browser_info": null,
    "payment_channel": null,
    "payment_method_id": null,
    "network_transaction_id": "MCCKASEI21107",
    "payment_method_status": null,
    "updated": "2025-11-07T07:14:23.811Z",
    "split_payments": {
        "stripe_split_payment": {
            "charge_id": "ch_3SQjrART4izcUWmO0Bnlzte4",
            "charge_type": "direct",
            "application_fees": 0,
            "transfer_account_id": "acct_1RWCjbRT4izcUWmO"
        }
    },
    "frm_metadata": null,
    "extended_authorization_applied": false,
    "extended_authorization_last_applied_at": null,
    "request_extended_authorization": null,
    "capture_before": null,
    "merchant_order_reference_id": null,
    "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
}
Create a Setup Mandate Payment with Automatic Capture

Setup mandate flow

curl --location 'http://localhost:8080/payments' \
--header 'Content-Type: application/json' \
--header 'Accept: application/json' \
--header 'api-key: dev_H5X96N4ntgwzfctDnP9mDLjCrq9ayx2aQv5bORNOzoVWfsd17uSqyDJdTxatbMj3' \
--data-raw '{
    "amount": 0,
    "currency": "USD",
    "confirm": true,
    "capture_method": "automatic",
    "email": "hello@123.com",
      "split_payments": {
    "stripe_split_payment": {
      "charge_type": "direct",
      "application_fees": 0,
      "transfer_account_id": "acct_1RWCjbRT4izcUWmO"
    }
  },
    "payment_type": "setup_mandate",
    "authentication_type": "no_three_ds",
    "customer": {
        "id": "abcd"
    },
    "payment_method": "card",
    "payment_method_type": "credit",
    "payment_method_data": {
       "card": {
            "card_number": "5555555555554444",
            "card_exp_month": "10",
            "card_exp_year": "29",
            "card_holder_name": "Joseph Does",
            "card_cvc": "900"
        }
    },
    
    "customer_acceptance": {
        "acceptance_type": "online",
        "accepted_at": "2025-03-27T13:56:49.848Z",
        "online": {
            "ip_address": null,
            "user_agent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/18.3 Safari/605.1.15"
        }
    },
    "setup_future_usage": "off_session",
    "billing": {
        "address": {
            "zip": "46203",
            "country": "US",
            "state": "TX",
            
            
            "line1": "14",
            "line2": "Main",
            "line3": "Street",
            "city": "Pecan Springs"
        }
    }
}'

Response

{
    "payment_id": "pay_HN4Y1HTClsckyG0d73G6",
    "merchant_id": "postman_merchant_GHAction_598fc19b-2ed4-4cbe-acaa-f7c47933db05",
    "status": "succeeded",
    "amount": 0,
    "net_amount": 0,
    "shipping_cost": null,
    "amount_capturable": 0,
    "amount_received": null,
    "connector": "stripe",
    "client_secret": "pay_HN4Y1HTClsckyG0d73G6_secret_gG9GNRs3I6xqspM3fFM5",
    "created": "2025-11-07T07:25:45.466Z",
    "currency": "USD",
    "customer_id": "abcd",
    "customer": {
        "id": "abcd",
        "name": null,
        "email": "hello@123.com",
        "phone": null,
        "phone_country_code": null
    },
    "description": null,
    "refunds": null,
    "disputes": null,
    "mandate_id": null,
    "mandate_data": null,
    "setup_future_usage": "off_session",
    "off_session": null,
    "capture_on": null,
    "capture_method": "automatic",
    "payment_method": "card",
    "payment_method_data": {
        "card": {
            "last4": "4444",
            "card_type": null,
            "card_network": null,
            "card_issuer": null,
            "card_issuing_country": null,
            "card_isin": "555555",
            "card_extended_bin": null,
            "card_exp_month": "10",
            "card_exp_year": "29",
            "card_holder_name": "Joseph Does",
            "payment_checks": {
                "cvc_check": "pass",
                "address_line1_check": null,
                "address_postal_code_check": null
            },
            "authentication_data": null
        },
        "billing": null
    },
    "payment_token": null,
    "shipping": null,
    "billing": {
        "address": {
            "city": "Pecan Springs",
            "country": "US",
            "line1": "14",
            "line2": "Main",
            "line3": "Street",
            "zip": "46203",
            "state": "TX",
            "first_name": null,
            "last_name": null,
            "origin_zip": null
        },
        "phone": null,
        "email": null
    },
    "order_details": null,
    "email": "hello@123.com",
    "name": null,
    "phone": null,
    "return_url": null,
    "authentication_type": "no_three_ds",
    "statement_descriptor_name": null,
    "statement_descriptor_suffix": null,
    "next_action": null,
    "cancellation_reason": null,
    "error_code": null,
    "error_message": null,
    "unified_code": null,
    "unified_message": 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,
    "ephemeral_key": {
        "customer_id": "abcd",
        "created_at": 1762500345,
        "expires": 1762503945,
        "secret": "epk_31494700957642f8aaedaca8cfac9784"
    },
    "manual_retry_allowed": null,
    "connector_transaction_id": "seti_1SQk3KRT4izcUWmOiNizk5bt",
    "frm_message": null,
    "metadata": null,
    "connector_metadata": null,
    "feature_metadata": {
        "redirect_response": null,
        "search_tags": null,
        "apple_pay_recurring_details": null,
        "gateway_system": "direct"
    },
    "reference_id": "seti_1SQk3KRT4izcUWmOiNizk5bt",
    "payment_link": null,
    "profile_id": "pro_geI878cezvJA1BvG0NM1",
    "surcharge_details": null,
    "attempt_count": 1,
    "merchant_decision": null,
    "merchant_connector_id": "mca_pftIKwiAx6eJ0lR8GBqx",
    "incremental_authorization_allowed": false,
    "authorization_count": null,
    "incremental_authorizations": null,
    "external_authentication_details": null,
    "external_3ds_authentication_attempted": false,
    "expires_on": "2025-11-07T07:40:45.466Z",
    "fingerprint": null,
    "browser_info": null,
    "payment_channel": null,
    "payment_method_id": "pm_mGZBRNA0gnBZ62JVwF1Y",
    "network_transaction_id": null,
    "payment_method_status": "active",
    "updated": "2025-11-07T07:25:47.356Z",
    "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": null,
    "order_tax_amount": null,
    "connector_mandate_id": "pm_1SQk3KRT4izcUWmO6jzfWZEH",
    "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": null,
    "network_details": null,
    "is_stored_credential": null,
    "mit_category": null
}

Create a MIT

curl --location 'http://localhost:8080/payments' \
--header 'Content-Type: application/json' \
--header 'Accept: application/json' \
--header 'api-key: dev_H5X96N4ntgwzfctDnP9mDLjCrq9ayx2aQv5bORNOzoVWfsd17uSqyDJdTxatbMj3' \
--data '{
    "amount": 10000,
    "currency": "USD",
    "off_session": true,
    "confirm": true,
    "capture_method": "automatic",
    "recurring_details": {
        "type": "payment_method_id",
        "data": "pm_mGZBRNA0gnBZ62JVwF1Y"
    },
    "customer_id": "abcd" ,
    "browser_info": {
        "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",
        "accept_header": "text/html,application/xhtml+xml,application/xml;q=0.9,image/webp,image/apng,*/*;q=0.8",
        "language": "nl-NL",
        "color_depth": 24,
        "screen_height": 723,
        "screen_width": 1536,
        "time_zone": 0,
        "java_enabled": true,
        "java_script_enabled": true,
        "ip_address": "13.232.74.226"
    }
}'

Response

{
    "payment_id": "pay_U4RnBEB8NerZGDeHg4IF",
    "merchant_id": "postman_merchant_GHAction_598fc19b-2ed4-4cbe-acaa-f7c47933db05",
    "status": "succeeded",
    "amount": 10000,
    "net_amount": 10000,
    "shipping_cost": null,
    "amount_capturable": 0,
    "amount_received": 10000,
    "connector": "stripe",
    "client_secret": "pay_U4RnBEB8NerZGDeHg4IF_secret_xmFu6BHAVkptzoRUOA3q",
    "created": "2025-11-07T07:26:47.293Z",
    "currency": "USD",
    "customer_id": "abcd",
    "customer": {
        "id": "abcd",
        "name": null,
        "email": "hello@123.com",
        "phone": null,
        "phone_country_code": null
    },
    "description": null,
    "refunds": null,
    "disputes": null,
    "mandate_id": null,
    "mandate_data": null,
    "setup_future_usage": null,
    "off_session": true,
    "capture_on": null,
    "capture_method": "automatic",
    "payment_method": "card",
    "payment_method_data": {
        "card": {
            "last4": "4444",
            "card_type": null,
            "card_network": null,
            "card_issuer": null,
            "card_issuing_country": null,
            "card_isin": "555555",
            "card_extended_bin": null,
            "card_exp_month": "10",
            "card_exp_year": "29",
            "card_holder_name": "Joseph Does",
            "payment_checks": {
                "cvc_check": "pass",
                "address_line1_check": null,
                "address_postal_code_check": null
            },
            "authentication_data": null
        },
        "billing": null
    },
    "payment_token": null,
    "shipping": null,
    "billing": null,
    "order_details": null,
    "email": "hello@123.com",
    "name": null,
    "phone": null,
    "return_url": null,
    "authentication_type": "no_three_ds",
    "statement_descriptor_name": null,
    "statement_descriptor_suffix": null,
    "next_action": null,
    "cancellation_reason": null,
    "error_code": null,
    "error_message": null,
    "unified_code": null,
    "unified_message": 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,
    "ephemeral_key": {
        "customer_id": "abcd",
        "created_at": 1762500407,
        "expires": 1762504007,
        "secret": "epk_c14478b57a0b42a681d9001377cd58b9"
    },
    "manual_retry_allowed": null,
    "connector_transaction_id": "pi_3SQk4JRT4izcUWmO0TiTqXD0",
    "frm_message": null,
    "metadata": null,
    "connector_metadata": null,
    "feature_metadata": {
        "redirect_response": null,
        "search_tags": null,
        "apple_pay_recurring_details": null,
        "gateway_system": "direct"
    },
    "reference_id": "pi_3SQk4JRT4izcUWmO0TiTqXD0",
    "payment_link": null,
    "profile_id": "pro_geI878cezvJA1BvG0NM1",
    "surcharge_details": null,
    "attempt_count": 1,
    "merchant_decision": null,
    "merchant_connector_id": "mca_pftIKwiAx6eJ0lR8GBqx",
    "incremental_authorization_allowed": false,
    "authorization_count": null,
    "incremental_authorizations": null,
    "external_authentication_details": null,
    "external_3ds_authentication_attempted": false,
    "expires_on": "2025-11-07T07:41:47.293Z",
    "fingerprint": null,
    "browser_info": {
        "language": "nl-NL",
        "time_zone": 0,
        "ip_address": "13.232.74.226",
        "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": "pm_mGZBRNA0gnBZ62JVwF1Y",
    "network_transaction_id": "MCCKASEI21107",
    "payment_method_status": "active",
    "updated": "2025-11-07T07:26:48.327Z",
    "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": null,
    "order_tax_amount": null,
    "connector_mandate_id": "pm_1SQk3KRT4izcUWmO6jzfWZEH",
    "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": true,
    "mit_category": null
}
Sanity - Create, Capture and Refund a Manual Split Payment

Create a Manual Payment

curl --location 'http://localhost:8080/payments' \
--header 'Content-Type: application/json' \
--header 'Accept: application/json' \
--header 'api-key: dev_H5X96N4ntgwzfctDnP9mDLjCrq9ayx2aQv5bORNOzoVWfsd17uSqyDJdTxatbMj3' \
--data-raw '{
    "amount":1000,
    "currency": "USD",
    "confirm": true,
    "capture_method": "manual",
    "email": "hello@123.com",
      "split_payments": {
    "stripe_split_payment": {
      "charge_type": "direct",
      "application_fees": 1,
      "transfer_account_id": "acct_1RWCjbRT4izcUWmO"
    }
  },

    "authentication_type": "no_three_ds",
    "customer": {
        "id": "abcd"
    },
    "payment_method": "card",
    "payment_method_type": "credit",

    "payment_method_data": {
       "card": {
            "card_number": "5555555555554444",
            "card_exp_month": "10",
            "card_exp_year": "29",
            "card_holder_name": "Joseph Does",
            "card_cvc": "900"
        }
    },
    
    "customer_acceptance": {
        "acceptance_type": "online",
        "accepted_at": "2025-03-27T13:56:49.848Z",
        "online": {
            "ip_address": null,
            "user_agent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/18.3 Safari/605.1.15"
        }
    },
    "setup_future_usage": "off_session",

    "billing": {
        "address": {
            "zip": "46203",
            "country": "US",
            "state": "TX",
            
            
            "line1": "14",
            "line2": "Main",
            "line3": "Street",
            "city": "Pecan Springs"
        }
    }
}'

Response

{
    "payment_id": "pay_fPZUTAJp3xrDqX2Itaof",
    "merchant_id": "postman_merchant_GHAction_598fc19b-2ed4-4cbe-acaa-f7c47933db05",
    "status": "requires_capture",
    "amount": 1000,
    "net_amount": 1000,
    "shipping_cost": null,
    "amount_capturable": 1000,
    "amount_received": null,
    "connector": "stripe",
    "client_secret": "pay_fPZUTAJp3xrDqX2Itaof_secret_7VXkbtgn6sSl16LQX7c9",
    "created": "2025-11-07T07:46:33.164Z",
    "currency": "USD",
    "customer_id": "abcd",
    "customer": {
        "id": "abcd",
        "name": null,
        "email": "hello@123.com",
        "phone": null,
        "phone_country_code": null
    },
    "description": null,
    "refunds": null,
    "disputes": null,
    "mandate_id": null,
    "mandate_data": null,
    "setup_future_usage": "off_session",
    "off_session": null,
    "capture_on": null,
    "capture_method": "manual",
    "payment_method": "card",
    "payment_method_data": {
        "card": {
            "last4": "4444",
            "card_type": null,
            "card_network": null,
            "card_issuer": null,
            "card_issuing_country": null,
            "card_isin": "555555",
            "card_extended_bin": null,
            "card_exp_month": "10",
            "card_exp_year": "29",
            "card_holder_name": "Joseph Does",
            "payment_checks": {
                "cvc_check": "pass",
                "address_line1_check": "pass",
                "address_postal_code_check": null
            },
            "authentication_data": null
        },
        "billing": null
    },
    "payment_token": null,
    "shipping": null,
    "billing": {
        "address": {
            "city": "Pecan Springs",
            "country": "US",
            "line1": "14",
            "line2": "Main",
            "line3": "Street",
            "zip": "46203",
            "state": "TX",
            "first_name": null,
            "last_name": null,
            "origin_zip": null
        },
        "phone": null,
        "email": null
    },
    "order_details": null,
    "email": "hello@123.com",
    "name": null,
    "phone": null,
    "return_url": null,
    "authentication_type": "no_three_ds",
    "statement_descriptor_name": null,
    "statement_descriptor_suffix": null,
    "next_action": null,
    "cancellation_reason": null,
    "error_code": null,
    "error_message": null,
    "unified_code": null,
    "unified_message": 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,
    "ephemeral_key": {
        "customer_id": "abcd",
        "created_at": 1762501593,
        "expires": 1762505193,
        "secret": "epk_ab59dec0333e4adebabcfda54d8294dd"
    },
    "manual_retry_allowed": null,
    "connector_transaction_id": "pi_3SQkNSRT4izcUWmO1RBFXCPf",
    "frm_message": null,
    "metadata": null,
    "connector_metadata": null,
    "feature_metadata": {
        "redirect_response": null,
        "search_tags": null,
        "apple_pay_recurring_details": null,
        "gateway_system": "direct"
    },
    "reference_id": "pi_3SQkNSRT4izcUWmO1RBFXCPf",
    "payment_link": null,
    "profile_id": "pro_geI878cezvJA1BvG0NM1",
    "surcharge_details": null,
    "attempt_count": 1,
    "merchant_decision": null,
    "merchant_connector_id": "mca_pftIKwiAx6eJ0lR8GBqx",
    "incremental_authorization_allowed": false,
    "authorization_count": null,
    "incremental_authorizations": null,
    "external_authentication_details": null,
    "external_3ds_authentication_attempted": false,
    "expires_on": "2025-11-07T08:01:33.164Z",
    "fingerprint": null,
    "browser_info": null,
    "payment_channel": null,
    "payment_method_id": "pm_66yk7zXLsIiqcZFQ4zE7",
    "network_transaction_id": "MCCKASEI21107",
    "payment_method_status": "active",
    "updated": "2025-11-07T07:46:35.101Z",
    "split_payments": {
        "stripe_split_payment": {
            "charge_id": "ch_3SQkNSRT4izcUWmO1W3k7STi",
            "charge_type": "direct",
            "application_fees": 1,
            "transfer_account_id": "acct_1RWCjbRT4izcUWmO"
        }
    },
    "frm_metadata": null,
    "extended_authorization_applied": false,
    "extended_authorization_last_applied_at": null,
    "request_extended_authorization": null,
    "capture_before": null,
    "merchant_order_reference_id": null,
    "order_tax_amount": null,
    "connector_mandate_id": "pm_1SQkNRRT4izcUWmOwO5MQM9V",
    "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
}

Capture

curl --location 'http://localhost:8080/payments/pay_fPZUTAJp3xrDqX2Itaof/capture' \
--header 'Content-Type: application/json' \
--header 'Accept: application/json' \
--header 'api-key: dev_H5X96N4ntgwzfctDnP9mDLjCrq9ayx2aQv5bORNOzoVWfsd17uSqyDJdTxatbMj3' \
--data '{
    
    
    
}'

Response

{
    "payment_id": "pay_fPZUTAJp3xrDqX2Itaof",
    "merchant_id": "postman_merchant_GHAction_598fc19b-2ed4-4cbe-acaa-f7c47933db05",
    "status": "succeeded",
    "amount": 1000,
    "net_amount": 1000,
    "shipping_cost": null,
    "amount_capturable": 0,
    "amount_received": 1000,
    "connector": "stripe",
    "client_secret": "pay_fPZUTAJp3xrDqX2Itaof_secret_7VXkbtgn6sSl16LQX7c9",
    "created": "2025-11-07T07:46:33.164Z",
    "currency": "USD",
    "customer_id": "abcd",
    "customer": {
        "id": "abcd",
        "name": null,
        "email": "hello@123.com",
        "phone": null,
        "phone_country_code": null
    },
    "description": null,
    "refunds": null,
    "disputes": null,
    "mandate_id": null,
    "mandate_data": null,
    "setup_future_usage": "off_session",
    "off_session": null,
    "capture_on": null,
    "capture_method": "manual",
    "payment_method": "card",
    "payment_method_data": {
        "card": {
            "last4": "4444",
            "card_type": null,
            "card_network": null,
            "card_issuer": null,
            "card_issuing_country": null,
            "card_isin": "555555",
            "card_extended_bin": null,
            "card_exp_month": "10",
            "card_exp_year": "29",
            "card_holder_name": "Joseph Does",
            "payment_checks": {
                "cvc_check": "pass",
                "address_line1_check": "pass",
                "address_postal_code_check": null
            },
            "authentication_data": null
        },
        "billing": null
    },
    "payment_token": null,
    "shipping": null,
    "billing": {
        "address": {
            "city": "Pecan Springs",
            "country": "US",
            "line1": "14",
            "line2": "Main",
            "line3": "Street",
            "zip": "46203",
            "state": "TX",
            "first_name": null,
            "last_name": null,
            "origin_zip": null
        },
        "phone": null,
        "email": null
    },
    "order_details": null,
    "email": "hello@123.com",
    "name": null,
    "phone": null,
    "return_url": null,
    "authentication_type": "no_three_ds",
    "statement_descriptor_name": null,
    "statement_descriptor_suffix": null,
    "next_action": null,
    "cancellation_reason": null,
    "error_code": null,
    "error_message": null,
    "unified_code": null,
    "unified_message": 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,
    "ephemeral_key": null,
    "manual_retry_allowed": null,
    "connector_transaction_id": "pi_3SQkNSRT4izcUWmO1RBFXCPf",
    "frm_message": null,
    "metadata": null,
    "connector_metadata": null,
    "feature_metadata": {
        "redirect_response": null,
        "search_tags": null,
        "apple_pay_recurring_details": null,
        "gateway_system": "direct"
    },
    "reference_id": "pi_3SQkNSRT4izcUWmO1RBFXCPf",
    "payment_link": null,
    "profile_id": "pro_geI878cezvJA1BvG0NM1",
    "surcharge_details": null,
    "attempt_count": 1,
    "merchant_decision": null,
    "merchant_connector_id": "mca_pftIKwiAx6eJ0lR8GBqx",
    "incremental_authorization_allowed": false,
    "authorization_count": null,
    "incremental_authorizations": null,
    "external_authentication_details": null,
    "external_3ds_authentication_attempted": false,
    "expires_on": "2025-11-07T08:01:33.164Z",
    "fingerprint": null,
    "browser_info": null,
    "payment_channel": null,
    "payment_method_id": "pm_66yk7zXLsIiqcZFQ4zE7",
    "network_transaction_id": "MCCKASEI21107",
    "payment_method_status": null,
    "updated": "2025-11-07T07:48:45.590Z",
    "split_payments": {
        "stripe_split_payment": {
            "charge_id": "ch_3SQkNSRT4izcUWmO1W3k7STi",
            "charge_type": "direct",
            "application_fees": 1,
            "transfer_account_id": "acct_1RWCjbRT4izcUWmO"
        }
    },
    "frm_metadata": null,
    "extended_authorization_applied": false,
    "extended_authorization_last_applied_at": null,
    "request_extended_authorization": null,
    "capture_before": null,
    "merchant_order_reference_id": null,
    "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
}

Refund the payment

curl --location 'http://localhost:8080/refunds' \
--header 'Content-Type: application/json' \
--header 'Accept: application/json' \
--header 'api-key: dev_H5X96N4ntgwzfctDnP9mDLjCrq9ayx2aQv5bORNOzoVWfsd17uSqyDJdTxatbMj3' \
--data '{
    "payment_id": "pay_fPZUTAJp3xrDqX2Itaof",
    
    "reason": "Customer returned product",
    "refund_type": "instant",
    "metadata": {
        "udf1": "value1",
        "new_customer": "true",
        "login_date": "2019-09-10T10:11:12Z"
    },
    "split_refunds": {
    		"stripe_split_refund": {
        		"revert_platform_fee": true
        		
    		}
	}
}'

Response

{
    "refund_id": "ref_JVaobGdGYkuNHysOdeuy",
    "payment_id": "pay_fPZUTAJp3xrDqX2Itaof",
    "amount": 1000,
    "currency": "USD",
    "status": "succeeded",
    "reason": "Customer returned product",
    "metadata": {
        "udf1": "value1",
        "new_customer": "true",
        "login_date": "2019-09-10T10:11:12Z"
    },
    "error_message": null,
    "error_code": null,
    "unified_code": null,
    "unified_message": null,
    "created_at": "2025-11-07T07:49:27.539Z",
    "updated_at": "2025-11-07T07:49:29.244Z",
    "connector": "stripe",
    "profile_id": "pro_geI878cezvJA1BvG0NM1",
    "merchant_connector_id": "mca_pftIKwiAx6eJ0lR8GBqx",
    "split_refunds": {
        "stripe_split_refund": {
            "revert_platform_fee": true,
            "revert_transfer": null
        }
    },
    "issuer_error_code": null,
    "issuer_error_message": null
}

Checklist

  • I formatted the code cargo +nightly fmt --all
  • I addressed lints thrown by cargo clippy
  • I reviewed the submitted code
  • I added unit tests for my changes where possible

@AkshayaFoiger AkshayaFoiger requested review from a team as code owners November 7, 2025 07:10
@semanticdiff-com
Copy link

semanticdiff-com bot commented Nov 7, 2025

@AkshayaFoiger AkshayaFoiger self-assigned this Nov 7, 2025
@AkshayaFoiger AkshayaFoiger added A-connector-compatibility Area: Connector compatibility A-connector-integration Area: Connector integration labels Nov 7, 2025
@codecov
Copy link

codecov bot commented Nov 7, 2025

Codecov Report

❌ Patch coverage is 0% with 42 lines in your changes missing coverage. Please review.
⚠️ Please upload report for BASE (main@379cfd5). Learn more about missing BASE report.

Files with missing lines Patch % Lines
...es/hyperswitch_connectors/src/connectors/stripe.rs 0.00% 27 Missing ⚠️
...h_connectors/src/connectors/stripe/transformers.rs 0.00% 10 Missing ⚠️
crates/hyperswitch_connectors/src/utils.rs 0.00% 3 Missing ⚠️
...erswitch_domain_models/src/router_request_types.rs 0.00% 1 Missing ⚠️
crates/router/src/core/payments/transformers.rs 0.00% 1 Missing ⚠️
Additional details and impacted files
@@           Coverage Diff           @@
##             main   #10165   +/-   ##
=======================================
  Coverage        ?    3.89%           
=======================================
  Files           ?     1224           
  Lines           ?   303429           
  Branches        ?        0           
=======================================
  Hits            ?    11804           
  Misses          ?   291625           
  Partials        ?        0           

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@AkshayaFoiger AkshayaFoiger changed the title feat(connector): [stripe] add split payment to capture, void and Setupmandate flows feat(connector): [stripe] add split payment support to capture, void and Setupmandate flows Nov 7, 2025
awasthi21
awasthi21 previously approved these changes Nov 7, 2025
bsayak03
bsayak03 previously approved these changes Nov 7, 2025
@bsayak03
Copy link
Contributor

bsayak03 commented Nov 7, 2025

@AkshayaFoiger checks failing for v2

@AkshayaFoiger AkshayaFoiger changed the title feat(connector): [stripe] add split payment support to capture, void and Setupmandate flows feat(connector): [stripe] add split payment support to capture, void and Setupmandate flows v1 Nov 7, 2025
awasthi21
awasthi21 previously approved these changes Nov 7, 2025
@likhinbopanna likhinbopanna added this pull request to the merge queue Nov 7, 2025
Merged via the queue into main with commit e237839 Nov 7, 2025
23 of 25 checks passed
@likhinbopanna likhinbopanna deleted the add-split-payments-to-capture branch November 7, 2025 13:51
aadityaguptaa pushed a commit that referenced this pull request Nov 10, 2025
…and Setupmandate flows v1 (#10165)

Co-authored-by: hyperswitch-bot[bot] <148525504+hyperswitch-bot[bot]@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

A-connector-compatibility Area: Connector compatibility A-connector-integration Area: Connector integration

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants