Skip to content

feat(router): [stripe connect] prevent creation of payment method for afterpay clearpay#11051

Merged
likhinbopanna merged 6 commits into
mainfrom
afterpay-clearpay-fix
Jan 30, 2026
Merged

feat(router): [stripe connect] prevent creation of payment method for afterpay clearpay#11051
likhinbopanna merged 6 commits into
mainfrom
afterpay-clearpay-fix

Conversation

@AkshayaFoiger

@AkshayaFoiger AkshayaFoiger commented Jan 27, 2026

Copy link
Copy Markdown
Contributor

Type of Change

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

Description

Since Afterpay / Clearpay does not support recurring payments, we prevent sending the setup_future_usage flag to stripe when a recurring payment is requested for Afterpay / Clearpay . Additionally, this payment method has been added to the save_payment_method_on_session.unsupported_payment_methods configuration to ensure that a payment method is not created in Hyperswitch.

Additional Changes

  • This PR modifies the API contract
  • This PR modifies the database schema
  • This PR modifies application configuration/environment variables

How did you test it?

AfterPay/Clearpay Test - Success Scenario without setup_future_usage
  1. Create a afterpay/clearpay payment with stripe connect account
curl --location 'http://localhost:8080/payments' \
--header 'Content-Type: application/json' \
--header 'Accept: application/json' \
--header 'api-key: dev_l0CaGbIk9TLrbc6phcAILz0clVOX2gxoS2BFV6g3eLnjYu71tbf8iQU3cjM5ZsPE' \
--data-raw '{
    "amount": 6540,
    "currency": "USD",
    "confirm": true,
    "capture_method": "automatic",
    "capture_on": "2022-09-10T10:11:12Z",
    "amount_to_capture": 6540,
    "phone_country_code": "+1",
    "description": "Its my first payment request",
    "authentication_type": "no_three_ds",
    "return_url": "https://duck.com",
    "payment_method": "pay_later",
    "payment_method_type": "afterpay_clearpay",
    "payment_method_data": {
        "pay_later": {
            "afterpay_clearpay_redirect": {
                "issuer_name": "afterpay_clearpay",
                "billing_email": "example@juspay.in",
                "billing_name": "Juspay"
            }
        }
    },
    "shipping": {
        "address": {
            "line1": "1467",
            "line2": "Harrison Street",
            "line3": "Harrison Street",
            "city": "San Fransico",
            "state": "California",
            "zip": "94122",
            "country": "US",
            "first_name": "John",
            "last_name": "Doe"
        },
        "phone": {
            "number": "8056594427",
            "country_code": "+91"
        }
    },
    "split_payments": {
        "stripe_split_payment": {
            "charge_type": "direct",
            "application_fees": 10,
            "transfer_account_id": "acct_1RWCjbRT4izcUWmO"
        }
    }
}'

Response

{
    "payment_id": "pay_kjIzQnkdAHuT7REQjij4",
    "merchant_id": "postman_merchant_GHAction_2c1022bc-45a7-4fb2-a3dc-5e5bf7f08f2d",
    "status": "requires_customer_action",
    "amount": 6540,
    "net_amount": 6540,
    "shipping_cost": null,
    "amount_capturable": 6540,
    "amount_received": null,
    "processor_merchant_id": "postman_merchant_GHAction_2c1022bc-45a7-4fb2-a3dc-5e5bf7f08f2d",
    "initiator": null,
    "connector": "stripe",
    "client_secret": "pay_kjIzQnkdAHuT7REQjij4_secret_Vq32KxubwpmOFcSAY4S6",
    "created": "2026-01-27T08:52:52.366Z",
    "modified_at": "2026-01-27T08:52:54.793Z",
    "currency": "USD",
    "customer_id": null,
    "customer": {
        "id": null,
        "name": null,
        "email": null,
        "phone": null,
        "phone_country_code": "+1"
    },
    "description": "Its my first payment request",
    "refunds": null,
    "disputes": null,
    "mandate_id": null,
    "mandate_data": null,
    "setup_future_usage": null,
    "off_session": null,
    "capture_on": null,
    "capture_method": "automatic",
    "payment_method": "pay_later",
    "payment_method_data": {
        "pay_later": {
            "klarna_sdk": null
        },
        "billing": null
    },
    "payment_token": null,
    "shipping": {
        "address": {
            "city": "San Fransico",
            "country": "US",
            "line1": "1467",
            "line2": "Harrison Street",
            "line3": "Harrison Street",
            "zip": "94122",
            "state": "California",
            "first_name": "John",
            "last_name": "Doe",
            "origin_zip": null
        },
        "phone": {
            "number": "8056594427",
            "country_code": "+91"
        },
        "email": null
    },
    "billing": null,
    "order_details": null,
    "email": null,
    "name": null,
    "phone": null,
    "return_url": "https://duck.com/",
    "authentication_type": "no_three_ds",
    "statement_descriptor_name": null,
    "statement_descriptor_suffix": null,
    "next_action": {
        "type": "redirect_to_url",
        "redirect_to_url": "http://localhost:8080/payments/redirect/pay_kjIzQnkdAHuT7REQjij4/postman_merchant_GHAction_2c1022bc-45a7-4fb2-a3dc-5e5bf7f08f2d/pay_kjIzQnkdAHuT7REQjij4_1"
    },
    "cancellation_reason": null,
    "error_code": null,
    "error_message": null,
    "unified_code": null,
    "unified_message": null,
    "error_details": null,
    "payment_experience": null,
    "payment_method_type": "afterpay_clearpay",
    "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_3Su814RT4izcUWmO0A07IOL1",
    "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_3Su814RT4izcUWmO0A07IOL1",
    "payment_link": null,
    "profile_id": "pro_SLPcBFqFhKkMOLOE2JN5",
    "surcharge_details": null,
    "attempt_count": 1,
    "merchant_decision": null,
    "merchant_connector_id": "mca_39gWwrcciqVyrQ3ZqZW5",
    "incremental_authorization_allowed": false,
    "authorization_count": null,
    "incremental_authorizations": null,
    "external_authentication_details": null,
    "external_3ds_authentication_attempted": false,
    "expires_on": "2026-01-27T09:07:52.366Z",
    "fingerprint": null,
    "browser_info": null,
    "payment_channel": null,
    "payment_method_id": null,
    "network_transaction_id": null,
    "payment_method_status": null,
    "updated": "2026-01-27T08:52:54.793Z",
    "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": 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
}

Psync

{
    "payment_id": "pay_kjIzQnkdAHuT7REQjij4",
    "merchant_id": "postman_merchant_GHAction_2c1022bc-45a7-4fb2-a3dc-5e5bf7f08f2d",
    "status": "succeeded",
    "amount": 6540,
    "net_amount": 6540,
    "shipping_cost": null,
    "amount_capturable": 0,
    "amount_received": 6540,
    "processor_merchant_id": "postman_merchant_GHAction_2c1022bc-45a7-4fb2-a3dc-5e5bf7f08f2d",
    "initiator": null,
    "connector": "stripe",
    "client_secret": "pay_kjIzQnkdAHuT7REQjij4_secret_Vq32KxubwpmOFcSAY4S6",
    "created": "2026-01-27T08:52:52.366Z",
    "modified_at": "2026-01-27T08:53:38.554Z",
    "currency": "USD",
    "customer_id": null,
    "customer": {
        "id": null,
        "name": null,
        "email": null,
        "phone": null,
        "phone_country_code": "+1"
    },
    "description": "Its my first payment request",
    "refunds": null,
    "disputes": null,
    "mandate_id": null,
    "mandate_data": null,
    "setup_future_usage": null,
    "off_session": null,
    "capture_on": null,
    "capture_method": "automatic",
    "payment_method": "pay_later",
    "payment_method_data": {
        "pay_later": {
            "klarna_sdk": null
        },
        "billing": null
    },
    "payment_token": null,
    "shipping": {
        "address": {
            "city": "San Fransico",
            "country": "US",
            "line1": "1467",
            "line2": "Harrison Street",
            "line3": "Harrison Street",
            "zip": "94122",
            "state": "California",
            "first_name": "John",
            "last_name": "Doe",
            "origin_zip": null
        },
        "phone": {
            "number": "8056594427",
            "country_code": "+91"
        },
        "email": null
    },
    "billing": null,
    "order_details": null,
    "email": null,
    "name": null,
    "phone": null,
    "return_url": "https://duck.com/",
    "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,
    "error_details": null,
    "payment_experience": null,
    "payment_method_type": "afterpay_clearpay",
    "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_3Su814RT4izcUWmO0A07IOL1",
    "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_3Su814RT4izcUWmO0A07IOL1",
    "payment_link": null,
    "profile_id": "pro_SLPcBFqFhKkMOLOE2JN5",
    "surcharge_details": null,
    "attempt_count": 1,
    "merchant_decision": null,
    "merchant_connector_id": "mca_39gWwrcciqVyrQ3ZqZW5",
    "incremental_authorization_allowed": false,
    "authorization_count": null,
    "incremental_authorizations": null,
    "external_authentication_details": null,
    "external_3ds_authentication_attempted": false,
    "expires_on": "2026-01-27T09:07:52.366Z",
    "fingerprint": null,
    "browser_info": null,
    "payment_channel": null,
    "payment_method_id": null,
    "network_transaction_id": null,
    "payment_method_status": null,
    "updated": "2026-01-27T08:53:38.554Z",
    "split_payments": {
        "stripe_split_payment": {
            "charge_id": "py_3Su814RT4izcUWmO0HVS6wwf",
            "charge_type": "direct",
            "application_fees": 10,
            "transfer_account_id": "acct_1RWCjbRT4izcUWmO"
        }
    },
    "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": 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
}
AfterPay/Clearpay Test - Success Scenario with setup_future_usage
  1. Create a payment with setup_future_usage
curl --location 'http://localhost:8080/payments' \
--header 'Content-Type: application/json' \
--header 'Accept: application/json' \
--header 'api-key: dev_l0CaGbIk9TLrbc6phcAILz0clVOX2gxoS2BFV6g3eLnjYu71tbf8iQU3cjM5ZsPE' \
--data-raw '{
    "amount": 6540,
    "currency": "USD",
    "confirm": true,
    "capture_method": "automatic",
    "capture_on": "2022-09-10T10:11:12Z",
    "amount_to_capture": 6540,
    "phone_country_code": "+1",
    "description": "Its my first payment request",
    "authentication_type": "no_three_ds",
    "return_url": "https://duck.com",
    "payment_method": "pay_later",
    "payment_method_type": "afterpay_clearpay",
    "payment_method_data": {
        "pay_later": {
            "afterpay_clearpay_redirect": {
                "issuer_name": "afterpay_clearpay",
                "billing_email": "example@juspay.in",
                "billing_name": "Juspay"
            }
        }
    },
    "shipping": {
        "address": {
            "line1": "1467",
            "line2": "Harrison Street",
            "line3": "Harrison Street",
            "city": "San Fransico",
            "state": "California",
            "zip": "94122",
            "country": "US",
            "first_name": "John",
            "last_name": "Doe"
        },
        "phone": {
            "number": "8056594427",
            "country_code": "+91"
        }
    },
    "split_payments": {
        "stripe_split_payment": {
            "charge_type": "direct",
            "application_fees": 10,
            "transfer_account_id": "acct_1RWCjbRT4izcUWmO"
        }
    },
    "setup_future_usage": "off_session",
    "customer_acceptance": {
        "acceptance_type": "online",
        "accepted_at": "2025-12-30T04:43:34.149Z",
        "online": {
            "ip_address": "10.**.**.**",
            "user_agent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/143.0.0.0 Safari/537.36"
        }
    },
    "customer_id": "abcd"
}'

Response

{
    "payment_id": "pay_1opXkdbFUdjJQiGpipXp",
    "merchant_id": "postman_merchant_GHAction_2c1022bc-45a7-4fb2-a3dc-5e5bf7f08f2d",
    "status": "requires_customer_action",
    "amount": 6540,
    "net_amount": 6540,
    "shipping_cost": null,
    "amount_capturable": 6540,
    "amount_received": null,
    "processor_merchant_id": "postman_merchant_GHAction_2c1022bc-45a7-4fb2-a3dc-5e5bf7f08f2d",
    "initiator": null,
    "connector": "stripe",
    "client_secret": "pay_1opXkdbFUdjJQiGpipXp_secret_V4ulUxm6h83j2wp9qsNP",
    "created": "2026-01-27T09:05:16.888Z",
    "modified_at": "2026-01-27T09:05:18.867Z",
    "currency": "USD",
    "customer_id": "abcd",
    "customer": {
        "id": "abcd",
        "name": null,
        "email": null,
        "phone": null,
        "phone_country_code": "+1"
    },
    "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": "pay_later",
    "payment_method_data": {
        "pay_later": {
            "klarna_sdk": null
        },
        "billing": null
    },
    "payment_token": null,
    "shipping": {
        "address": {
            "city": "San Fransico",
            "country": "US",
            "line1": "1467",
            "line2": "Harrison Street",
            "line3": "Harrison Street",
            "zip": "94122",
            "state": "California",
            "first_name": "John",
            "last_name": "Doe",
            "origin_zip": null
        },
        "phone": {
            "number": "8056594427",
            "country_code": "+91"
        },
        "email": null
    },
    "billing": null,
    "order_details": null,
    "email": null,
    "name": null,
    "phone": null,
    "return_url": "https://duck.com/",
    "authentication_type": "no_three_ds",
    "statement_descriptor_name": null,
    "statement_descriptor_suffix": null,
    "next_action": {
        "type": "redirect_to_url",
        "redirect_to_url": "http://localhost:8080/payments/redirect/pay_1opXkdbFUdjJQiGpipXp/postman_merchant_GHAction_2c1022bc-45a7-4fb2-a3dc-5e5bf7f08f2d/pay_1opXkdbFUdjJQiGpipXp_1"
    },
    "cancellation_reason": null,
    "error_code": null,
    "error_message": null,
    "unified_code": null,
    "unified_message": null,
    "error_details": null,
    "payment_experience": null,
    "payment_method_type": "afterpay_clearpay",
    "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_3Su8D4RT4izcUWmO1OXBMcPc",
    "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_3Su8D4RT4izcUWmO1OXBMcPc",
    "payment_link": null,
    "profile_id": "pro_SLPcBFqFhKkMOLOE2JN5",
    "surcharge_details": null,
    "attempt_count": 1,
    "merchant_decision": null,
    "merchant_connector_id": "mca_39gWwrcciqVyrQ3ZqZW5",
    "incremental_authorization_allowed": false,
    "authorization_count": null,
    "incremental_authorizations": null,
    "external_authentication_details": null,
    "external_3ds_authentication_attempted": false,
    "expires_on": "2026-01-27T09:20:16.888Z",
    "fingerprint": null,
    "browser_info": null,
    "payment_channel": null,
    "payment_method_id": null,
    "network_transaction_id": null,
    "payment_method_status": null,
    "updated": "2026-01-27T09:05:18.867Z",
    "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": 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
}

Psync

{
    "payment_id": "pay_1opXkdbFUdjJQiGpipXp",
    "merchant_id": "postman_merchant_GHAction_2c1022bc-45a7-4fb2-a3dc-5e5bf7f08f2d",
    "status": "succeeded",
    "amount": 6540,
    "net_amount": 6540,
    "shipping_cost": null,
    "amount_capturable": 0,
    "amount_received": 6540,
    "processor_merchant_id": "postman_merchant_GHAction_2c1022bc-45a7-4fb2-a3dc-5e5bf7f08f2d",
    "initiator": null,
    "connector": "stripe",
    "client_secret": "pay_1opXkdbFUdjJQiGpipXp_secret_V4ulUxm6h83j2wp9qsNP",
    "created": "2026-01-27T09:05:16.888Z",
    "modified_at": "2026-01-27T09:05:58.033Z",
    "currency": "USD",
    "customer_id": "abcd",
    "customer": {
        "id": "abcd",
        "name": null,
        "email": null,
        "phone": null,
        "phone_country_code": "+1"
    },
    "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": "pay_later",
    "payment_method_data": {
        "pay_later": {
            "klarna_sdk": null
        },
        "billing": null
    },
    "payment_token": null,
    "shipping": {
        "address": {
            "city": "San Fransico",
            "country": "US",
            "line1": "1467",
            "line2": "Harrison Street",
            "line3": "Harrison Street",
            "zip": "94122",
            "state": "California",
            "first_name": "John",
            "last_name": "Doe",
            "origin_zip": null
        },
        "phone": {
            "number": "8056594427",
            "country_code": "+91"
        },
        "email": null
    },
    "billing": null,
    "order_details": null,
    "email": null,
    "name": null,
    "phone": null,
    "return_url": "https://duck.com/",
    "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,
    "error_details": null,
    "payment_experience": null,
    "payment_method_type": "afterpay_clearpay",
    "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_3Su8D4RT4izcUWmO1OXBMcPc",
    "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_3Su8D4RT4izcUWmO1OXBMcPc",
    "payment_link": null,
    "profile_id": "pro_SLPcBFqFhKkMOLOE2JN5",
    "surcharge_details": null,
    "attempt_count": 1,
    "merchant_decision": null,
    "merchant_connector_id": "mca_39gWwrcciqVyrQ3ZqZW5",
    "incremental_authorization_allowed": false,
    "authorization_count": null,
    "incremental_authorizations": null,
    "external_authentication_details": null,
    "external_3ds_authentication_attempted": false,
    "expires_on": "2026-01-27T09:20:16.888Z",
    "fingerprint": null,
    "browser_info": null,
    "payment_channel": null,
    "payment_method_id": null,
    "network_transaction_id": null,
    "payment_method_status": null,
    "updated": "2026-01-27T09:05:58.033Z",
    "split_payments": {
        "stripe_split_payment": {
            "charge_id": "py_3Su8D4RT4izcUWmO1WWKdyRZ",
            "charge_type": "direct",
            "application_fees": 10,
            "transfer_account_id": "acct_1RWCjbRT4izcUWmO"
        }
    },
    "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": 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
}
Create and cancel afterpay/clearpay payment with setup_future_usage
curl --location 'http://localhost:8080/payments' \
--header 'Content-Type: application/json' \
--header 'Accept: application/json' \
--header 'api-key: dev_l0CaGbIk9TLrbc6phcAILz0clVOX2gxoS2BFV6g3eLnjYu71tbf8iQU3cjM5ZsPE' \
--data-raw '{
    "amount": 6540,
    "currency": "USD",
    "confirm": true,
    "capture_method": "automatic",
    "capture_on": "2022-09-10T10:11:12Z",
    "amount_to_capture": 6540,
    "phone_country_code": "+1",
    "description": "Its my first payment request",
    "authentication_type": "no_three_ds",
    "return_url": "https://duck.com",
    "payment_method": "pay_later",
    "payment_method_type": "afterpay_clearpay",
    "payment_method_data": {
        "pay_later": {
            "afterpay_clearpay_redirect": {
                "issuer_name": "afterpay_clearpay",
                "billing_email": "example@juspay.in",
                "billing_name": "Juspay"
            }
        }
    },
    "shipping": {
        "address": {
            "line1": "1467",
            "line2": "Harrison Street",
            "line3": "Harrison Street",
            "city": "San Fransico",
            "state": "California",
            "zip": "94122",
            "country": "US",
            "first_name": "John",
            "last_name": "Doe"
        },
        "phone": {
            "number": "8056594427",
            "country_code": "+91"
        }
    },
    "split_payments": {
        "stripe_split_payment": {
            "charge_type": "direct",
            "application_fees": 10,
            "transfer_account_id": "acct_1RWCjbRT4izcUWmO"
        }
    },
    "setup_future_usage": "off_session",
    "customer_acceptance": {
        "acceptance_type": "online",
        "accepted_at": "2025-12-30T04:43:34.149Z",
        "online": {
            "ip_address": "10.**.**.**",
            "user_agent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/143.0.0.0 Safari/537.36"
        }
    },
    "customer_id": "abcd"
}'

Response

{
    "payment_id": "pay_U6qOo3O4Vj0kNsR9oABa",
    "merchant_id": "postman_merchant_GHAction_2c1022bc-45a7-4fb2-a3dc-5e5bf7f08f2d",
    "status": "requires_customer_action",
    "amount": 6540,
    "net_amount": 6540,
    "shipping_cost": null,
    "amount_capturable": 6540,
    "amount_received": null,
    "processor_merchant_id": "postman_merchant_GHAction_2c1022bc-45a7-4fb2-a3dc-5e5bf7f08f2d",
    "initiator": null,
    "connector": "stripe",
    "client_secret": "pay_U6qOo3O4Vj0kNsR9oABa_secret_wdbqRcCY9a4JdfTUOMoJ",
    "created": "2026-01-27T09:26:20.708Z",
    "modified_at": "2026-01-27T09:26:22.447Z",
    "currency": "USD",
    "customer_id": "abcd",
    "customer": {
        "id": "abcd",
        "name": null,
        "email": null,
        "phone": null,
        "phone_country_code": "+1"
    },
    "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": "pay_later",
    "payment_method_data": {
        "pay_later": {
            "klarna_sdk": null
        },
        "billing": null
    },
    "payment_token": null,
    "shipping": {
        "address": {
            "city": "San Fransico",
            "country": "US",
            "line1": "1467",
            "line2": "Harrison Street",
            "line3": "Harrison Street",
            "zip": "94122",
            "state": "California",
            "first_name": "John",
            "last_name": "Doe",
            "origin_zip": null
        },
        "phone": {
            "number": "8056594427",
            "country_code": "+91"
        },
        "email": null
    },
    "billing": null,
    "order_details": null,
    "email": null,
    "name": null,
    "phone": null,
    "return_url": "https://duck.com/",
    "authentication_type": "no_three_ds",
    "statement_descriptor_name": null,
    "statement_descriptor_suffix": null,
    "next_action": {
        "type": "redirect_to_url",
        "redirect_to_url": "http://localhost:8080/payments/redirect/pay_U6qOo3O4Vj0kNsR9oABa/postman_merchant_GHAction_2c1022bc-45a7-4fb2-a3dc-5e5bf7f08f2d/pay_U6qOo3O4Vj0kNsR9oABa_1"
    },
    "cancellation_reason": null,
    "error_code": null,
    "error_message": null,
    "unified_code": null,
    "unified_message": null,
    "error_details": null,
    "payment_experience": null,
    "payment_method_type": "afterpay_clearpay",
    "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_3Su8XRRT4izcUWmO1eAgVm6d",
    "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_3Su8XRRT4izcUWmO1eAgVm6d",
    "payment_link": null,
    "profile_id": "pro_SLPcBFqFhKkMOLOE2JN5",
    "surcharge_details": null,
    "attempt_count": 1,
    "merchant_decision": null,
    "merchant_connector_id": "mca_39gWwrcciqVyrQ3ZqZW5",
    "incremental_authorization_allowed": false,
    "authorization_count": null,
    "incremental_authorizations": null,
    "external_authentication_details": null,
    "external_3ds_authentication_attempted": false,
    "expires_on": "2026-01-27T09:41:20.708Z",
    "fingerprint": null,
    "browser_info": null,
    "payment_channel": null,
    "payment_method_id": null,
    "network_transaction_id": null,
    "payment_method_status": null,
    "updated": "2026-01-27T09:26:22.447Z",
    "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": 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
}

Psync

{
    "payment_id": "pay_U6qOo3O4Vj0kNsR9oABa",
    "merchant_id": "postman_merchant_GHAction_2c1022bc-45a7-4fb2-a3dc-5e5bf7f08f2d",
    "status": "failed",
    "amount": 6540,
    "net_amount": 6540,
    "shipping_cost": null,
    "amount_capturable": 0,
    "amount_received": null,
    "processor_merchant_id": "postman_merchant_GHAction_2c1022bc-45a7-4fb2-a3dc-5e5bf7f08f2d",
    "initiator": null,
    "connector": "stripe",
    "client_secret": "pay_U6qOo3O4Vj0kNsR9oABa_secret_wdbqRcCY9a4JdfTUOMoJ",
    "created": "2026-01-27T09:26:20.708Z",
    "modified_at": "2026-01-27T09:26:29.466Z",
    "currency": "USD",
    "customer_id": "abcd",
    "customer": {
        "id": "abcd",
        "name": null,
        "email": null,
        "phone": null,
        "phone_country_code": "+1"
    },
    "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": "pay_later",
    "payment_method_data": {
        "pay_later": {
            "klarna_sdk": null
        },
        "billing": null
    },
    "payment_token": null,
    "shipping": {
        "address": {
            "city": "San Fransico",
            "country": "US",
            "line1": "1467",
            "line2": "Harrison Street",
            "line3": "Harrison Street",
            "zip": "94122",
            "state": "California",
            "first_name": "John",
            "last_name": "Doe",
            "origin_zip": null
        },
        "phone": {
            "number": "8056594427",
            "country_code": "+91"
        },
        "email": null
    },
    "billing": null,
    "order_details": null,
    "email": null,
    "name": null,
    "phone": null,
    "return_url": "https://duck.com/",
    "authentication_type": "no_three_ds",
    "statement_descriptor_name": null,
    "statement_descriptor_suffix": null,
    "next_action": null,
    "cancellation_reason": null,
    "error_code": "payment_intent_payment_attempt_failed",
    "error_message": "message - The Customer has terminated the Afterpay/Clearpay authorization flow., decline_code - generic_decline",
    "unified_code": "UE_9000",
    "unified_message": "Something went wrong",
    "error_details": null,
    "payment_experience": null,
    "payment_method_type": "afterpay_clearpay",
    "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_3Su8XRRT4izcUWmO1eAgVm6d",
    "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_3Su8XRRT4izcUWmO1eAgVm6d",
    "payment_link": null,
    "profile_id": "pro_SLPcBFqFhKkMOLOE2JN5",
    "surcharge_details": null,
    "attempt_count": 1,
    "merchant_decision": null,
    "merchant_connector_id": "mca_39gWwrcciqVyrQ3ZqZW5",
    "incremental_authorization_allowed": false,
    "authorization_count": null,
    "incremental_authorizations": null,
    "external_authentication_details": null,
    "external_3ds_authentication_attempted": false,
    "expires_on": "2026-01-27T09:41:20.708Z",
    "fingerprint": null,
    "browser_info": null,
    "payment_channel": null,
    "payment_method_id": null,
    "network_transaction_id": null,
    "payment_method_status": null,
    "updated": "2026-01-27T09:26:29.466Z",
    "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": null,
    "card_discovery": null,
    "force_3ds_challenge": false,
    "force_3ds_challenge_trigger": false,
    "issuer_error_code": null,
    "issuer_error_message": "generic_decline",
    "is_iframe_redirection_enabled": null,
    "whole_connector_response": null,
    "enable_partial_authorization": null,
    "enable_overcapture": null,
    "is_overcapture_enabled": null,
    "network_details": {
        "network_advice_code": null
    },
    "is_stored_credential": null,
    "mit_category": null,
    "billing_descriptor": null,
    "tokenization": null,
    "partner_merchant_identifier_details": null,
    "payment_method_tokenization_details": null
}

Sanity Testing

  1. Create a CIT and MIT recurring card payment with stripe connect
curl --location 'http://localhost:8080/payments' \
--header 'Content-Type: application/json' \
--header 'Accept: application/json' \
--header 'api-key: dev_l0CaGbIk9TLrbc6phcAILz0clVOX2gxoS2BFV6g3eLnjYu71tbf8iQU3cjM5ZsPE' \
--data-raw '{
    "amount": 100,
    "currency": "USD",
    "confirm": true,
    "capture_method": "automatic",
    "description": "vantiv payment",
    
    "customer_id": "George_173",
    
    
    "email": "hello@123.com",
    
    "return_url": "https://google.com",
    "setup_future_usage": "off_session",
    "customer_acceptance": {
        "acceptance_type": "online",
        "accepted_at": "2025-12-30T04:43:34.149Z",
        "online": {
            "ip_address": "10.**.**.**",
            "user_agent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/143.0.0.0 Safari/537.36"
        }
    },
      "billing": {
        "address": {
            "line1": "1467",
            "line2": "Harrison Street",
            "line3": "Harrison Street",
            "city": "San Fransico",
            "state": "California",
            "zip": "94122",
            "country": "US",
            "first_name": "PiX",
            "last_name": "ss"
        }
    },
    "payment_method": "card",
    "payment_method_type": "credit",
    "payment_method_data": {
        "card": {
            "card_number": "4242424242424242",
            "card_exp_month": "01",
            "card_exp_year": "2026",
            "card_holder_name": "joseph Doe",
            "card_cvc": "123"
        }
    },
    "browser_info": {
        "accept_header": "text/html,application/xhtml+xml,application/xml;q=0.9,image/webp,*/*;q=0.8",
        "ip_address": "192.168.1.1",
        "java_enabled": false,
        "java_script_enabled": true,
        "language": "en-US",
        "color_depth": 24,
        "screen_height": 1080,
        "screen_width": 1920,
        "time_zone": 330,
        "user_agent": "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/114.0.0.0 Safari/537.36"
    },
    "split_payments": {
        "stripe_split_payment": {
            "charge_type": "direct",
            "application_fees": 10,
            "transfer_account_id": "acct_1RWCjbRT4izcUWmO"
        }
    }
}'

Response

{
    "payment_id": "pay_XAATwBpzYdCf6vg3aCtq",
    "merchant_id": "postman_merchant_GHAction_2c1022bc-45a7-4fb2-a3dc-5e5bf7f08f2d",
    "status": "succeeded",
    "amount": 100,
    "net_amount": 100,
    "shipping_cost": null,
    "amount_capturable": 0,
    "amount_received": 100,
    "processor_merchant_id": "postman_merchant_GHAction_2c1022bc-45a7-4fb2-a3dc-5e5bf7f08f2d",
    "initiator": null,
    "connector": "stripe",
    "client_secret": "pay_XAATwBpzYdCf6vg3aCtq_secret_m35O5McOdunfj0XPbCrG",
    "created": "2026-01-27T09:07:53.225Z",
    "modified_at": "2026-01-27T09:07:55.565Z",
    "currency": "USD",
    "customer_id": "George_173",
    "customer": {
        "id": "George_173",
        "name": null,
        "email": "hello@123.com",
        "phone": null,
        "phone_country_code": null
    },
    "description": "vantiv payment",
    "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": "4242",
            "card_type": null,
            "card_network": null,
            "card_issuer": null,
            "card_issuing_country": null,
            "card_isin": "424242",
            "card_extended_bin": null,
            "card_exp_month": "01",
            "card_exp_year": "2026",
            "card_holder_name": "joseph Doe",
            "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": "San Fransico",
            "country": "US",
            "line1": "1467",
            "line2": "Harrison Street",
            "line3": "Harrison Street",
            "zip": "94122",
            "state": "California",
            "first_name": "PiX",
            "last_name": "ss",
            "origin_zip": null
        },
        "phone": null,
        "email": null
    },
    "order_details": null,
    "email": "hello@123.com",
    "name": null,
    "phone": null,
    "return_url": "https://google.com/",
    "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,
    "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_3Su8FaRT4izcUWmO1MkyZSld",
    "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_3Su8FaRT4izcUWmO1MkyZSld",
    "payment_link": null,
    "profile_id": "pro_SLPcBFqFhKkMOLOE2JN5",
    "surcharge_details": null,
    "attempt_count": 1,
    "merchant_decision": null,
    "merchant_connector_id": "mca_39gWwrcciqVyrQ3ZqZW5",
    "incremental_authorization_allowed": false,
    "authorization_count": null,
    "incremental_authorizations": null,
    "external_authentication_details": null,
    "external_3ds_authentication_attempted": false,
    "expires_on": "2026-01-27T09:22:53.225Z",
    "fingerprint": null,
    "browser_info": {
        "language": "en-US",
        "time_zone": 330,
        "ip_address": "192.168.1.1",
        "user_agent": "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/114.0.0.0 Safari/537.36",
        "color_depth": 24,
        "java_enabled": false,
        "screen_width": 1920,
        "accept_header": "text/html,application/xhtml+xml,application/xml;q=0.9,image/webp,*/*;q=0.8",
        "screen_height": 1080,
        "java_script_enabled": true
    },
    "payment_channel": null,
    "payment_method_id": "pm_siRbYelnsUaAQighhTUQ",
    "network_transaction_id": "738211199791028",
    "payment_method_status": "active",
    "updated": "2026-01-27T09:07:55.565Z",
    "split_payments": {
        "stripe_split_payment": {
            "charge_id": "ch_3Su8FaRT4izcUWmO14dxYO21",
            "charge_type": "direct",
            "application_fees": 10,
            "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_1Su8FZRT4izcUWmOounoe9ta",
    "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": {
        "payment_method_id": "pm_siRbYelnsUaAQighhTUQ",
        "payment_method_status": "active",
        "psp_tokenization": false,
        "network_tokenization": false,
        "network_transaction_id": "738211199791028",
        "is_eligible_for_mit_payment": true
    }
}

MIT payment

curl --location 'http://localhost:8080/payments' \
--header 'Content-Type: application/json' \
--header 'Accept: application/json' \
--header 'api-key: dev_l0CaGbIk9TLrbc6phcAILz0clVOX2gxoS2BFV6g3eLnjYu71tbf8iQU3cjM5ZsPE' \
--data '{
    "amount": 10000,
    "currency": "USD",
    "off_session": true,
    "confirm": true,
    "capture_method": "automatic",
    "recurring_details": {
        "type": "payment_method_id",
        "data": "pm_siRbYelnsUaAQighhTUQ"
    },
        "customer_acceptance": {
        "acceptance_type": "online",
        "accepted_at": "2025-12-30T04:43:34.149Z",
        "online": {
            "ip_address": "10.**.**.**",
            "user_agent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/143.0.0.0 Safari/537.36"
        }
    },
        
    "split_payments": {
        "stripe_split_payment": {
            "charge_type": "direct",
            "application_fees": 100,
            "transfer_account_id": "acct_1RWCjbRT4izcUWmO"
        }
    },
    
    "customer_id": "George_173"
    ,
    "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_6XVQGlKv2L4mP9NY2LKJ",
    "merchant_id": "postman_merchant_GHAction_2c1022bc-45a7-4fb2-a3dc-5e5bf7f08f2d",
    "status": "succeeded",
    "amount": 10000,
    "net_amount": 10000,
    "shipping_cost": null,
    "amount_capturable": 0,
    "amount_received": 10000,
    "processor_merchant_id": "postman_merchant_GHAction_2c1022bc-45a7-4fb2-a3dc-5e5bf7f08f2d",
    "initiator": null,
    "connector": "stripe",
    "client_secret": "pay_6XVQGlKv2L4mP9NY2LKJ_secret_x5YfVeJlrZVo25oQQh1R",
    "created": "2026-01-27T09:09:02.937Z",
    "modified_at": "2026-01-27T09:09:04.106Z",
    "currency": "USD",
    "customer_id": "George_173",
    "customer": {
        "id": "George_173",
        "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": "4242",
            "card_type": null,
            "card_network": null,
            "card_issuer": null,
            "card_issuing_country": null,
            "card_isin": "424242",
            "card_extended_bin": null,
            "card_exp_month": "01",
            "card_exp_year": "2026",
            "card_holder_name": "joseph Doe",
            "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,
    "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_3Su8GhRT4izcUWmO1CM7J4Hj",
    "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_3Su8GhRT4izcUWmO1CM7J4Hj",
    "payment_link": null,
    "profile_id": "pro_SLPcBFqFhKkMOLOE2JN5",
    "surcharge_details": null,
    "attempt_count": 1,
    "merchant_decision": null,
    "merchant_connector_id": "mca_39gWwrcciqVyrQ3ZqZW5",
    "incremental_authorization_allowed": false,
    "authorization_count": null,
    "incremental_authorizations": null,
    "external_authentication_details": null,
    "external_3ds_authentication_attempted": false,
    "expires_on": "2026-01-27T09:24:02.937Z",
    "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_siRbYelnsUaAQighhTUQ",
    "network_transaction_id": "738211199791028",
    "payment_method_status": "active",
    "updated": "2026-01-27T09:09:04.106Z",
    "split_payments": {
        "stripe_split_payment": {
            "charge_id": "ch_3Su8GhRT4izcUWmO1NKQ79gK",
            "charge_type": "direct",
            "application_fees": 100,
            "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_1Su8FZRT4izcUWmOounoe9ta",
    "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,
    "billing_descriptor": null,
    "tokenization": null,
    "partner_merchant_identifier_details": null,
    "payment_method_tokenization_details": {
        "payment_method_id": "pm_siRbYelnsUaAQighhTUQ",
        "payment_method_status": "active",
        "psp_tokenization": true,
        "network_tokenization": false,
        "network_transaction_id": "738211199791028",
        "is_eligible_for_mit_payment": true
    }
}

Create a normal card payment with stripe connect

curl --location 'http://localhost:8080/payments' \
--header 'Content-Type: application/json' \
--header 'Accept: application/json' \
--header 'api-key: dev_l0CaGbIk9TLrbc6phcAILz0clVOX2gxoS2BFV6g3eLnjYu71tbf8iQU3cjM5ZsPE' \
--data-raw '{
    "amount": 100,
    "currency": "USD",
    "confirm": true,
    "capture_method": "automatic",
    "description": "vantiv payment",
    
    "customer_id": "George_173",
    
    
    "email": "hello@123.com",
    
    "return_url": "https://google.com",
    
    
    
    
    
    
    
    
    
      "billing": {
        "address": {
            "line1": "1467",
            "line2": "Harrison Street",
            "line3": "Harrison Street",
            "city": "San Fransico",
            "state": "California",
            "zip": "94122",
            "country": "US",
            "first_name": "PiX",
            "last_name": "ss"
        }
    },
    "payment_method": "card",
    "payment_method_type": "credit",
    "payment_method_data": {
        "card": {
            "card_number": "4242424242424242",
            "card_exp_month": "01",
            "card_exp_year": "2026",
            "card_holder_name": "joseph Doe",
            "card_cvc": "123"
        }
    },
    "browser_info": {
        "accept_header": "text/html,application/xhtml+xml,application/xml;q=0.9,image/webp,*/*;q=0.8",
        "ip_address": "192.168.1.1",
        "java_enabled": false,
        "java_script_enabled": true,
        "language": "en-US",
        "color_depth": 24,
        "screen_height": 1080,
        "screen_width": 1920,
        "time_zone": 330,
        "user_agent": "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/114.0.0.0 Safari/537.36"
    },
    "split_payments": {
        "stripe_split_payment": {
            "charge_type": "direct",
            "application_fees": 10,
            "transfer_account_id": "acct_1RWCjbRT4izcUWmO"
        }
    }
}'

Response

{
    "payment_id": "pay_ZqzGqT11hbE6CUryN9bC",
    "merchant_id": "postman_merchant_GHAction_2c1022bc-45a7-4fb2-a3dc-5e5bf7f08f2d",
    "status": "succeeded",
    "amount": 100,
    "net_amount": 100,
    "shipping_cost": null,
    "amount_capturable": 0,
    "amount_received": 100,
    "processor_merchant_id": "postman_merchant_GHAction_2c1022bc-45a7-4fb2-a3dc-5e5bf7f08f2d",
    "initiator": null,
    "connector": "stripe",
    "client_secret": "pay_ZqzGqT11hbE6CUryN9bC_secret_vqWQTPUEdHKjLeHrWHnL",
    "created": "2026-01-27T09:10:04.369Z",
    "modified_at": "2026-01-27T09:10:06.214Z",
    "currency": "USD",
    "customer_id": "George_173",
    "customer": {
        "id": "George_173",
        "name": null,
        "email": "hello@123.com",
        "phone": null,
        "phone_country_code": null
    },
    "description": "vantiv payment",
    "refunds": null,
    "disputes": null,
    "mandate_id": null,
    "mandate_data": null,
    "setup_future_usage": null,
    "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": "01",
            "card_exp_year": "2026",
            "card_holder_name": "joseph Doe",
            "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": "San Fransico",
            "country": "US",
            "line1": "1467",
            "line2": "Harrison Street",
            "line3": "Harrison Street",
            "zip": "94122",
            "state": "California",
            "first_name": "PiX",
            "last_name": "ss",
            "origin_zip": null
        },
        "phone": null,
        "email": null
    },
    "order_details": null,
    "email": "hello@123.com",
    "name": null,
    "phone": null,
    "return_url": "https://google.com/",
    "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,
    "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_3Su8HhRT4izcUWmO1IDEOdx2",
    "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_3Su8HhRT4izcUWmO1IDEOdx2",
    "payment_link": null,
    "profile_id": "pro_SLPcBFqFhKkMOLOE2JN5",
    "surcharge_details": null,
    "attempt_count": 1,
    "merchant_decision": null,
    "merchant_connector_id": "mca_39gWwrcciqVyrQ3ZqZW5",
    "incremental_authorization_allowed": false,
    "authorization_count": null,
    "incremental_authorizations": null,
    "external_authentication_details": null,
    "external_3ds_authentication_attempted": false,
    "expires_on": "2026-01-27T09:25:04.369Z",
    "fingerprint": null,
    "browser_info": {
        "language": "en-US",
        "time_zone": 330,
        "ip_address": "192.168.1.1",
        "user_agent": "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/114.0.0.0 Safari/537.36",
        "color_depth": 24,
        "java_enabled": false,
        "screen_width": 1920,
        "accept_header": "text/html,application/xhtml+xml,application/xml;q=0.9,image/webp,*/*;q=0.8",
        "screen_height": 1080,
        "java_script_enabled": true
    },
    "payment_channel": null,
    "payment_method_id": null,
    "network_transaction_id": "738211199791028",
    "payment_method_status": null,
    "updated": "2026-01-27T09:10:06.214Z",
    "split_payments": {
        "stripe_split_payment": {
            "charge_id": "ch_3Su8HhRT4izcUWmO1npaOo5H",
            "charge_type": "direct",
            "application_fees": 10,
            "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,
    "billing_descriptor": null,
    "tokenization": null,
    "partner_merchant_identifier_details": null,
    "payment_method_tokenization_details": 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 self-assigned this Jan 27, 2026
@AkshayaFoiger AkshayaFoiger requested review from a team as code owners January 27, 2026 09:10
@semanticdiff-com

semanticdiff-com Bot commented Jan 27, 2026

Copy link
Copy Markdown

Review changes with  SemanticDiff

Changed Files
File Status
  crates/hyperswitch_connectors/src/connectors/stripe/transformers.rs  16% smaller
  .github/workflows/CI-pr.yml  0% smaller
  config/deployments/integration_test.toml Unsupported file format
  config/deployments/production.toml Unsupported file format
  config/deployments/sandbox.toml Unsupported file format
  config/development.toml Unsupported file format

@AkshayaFoiger AkshayaFoiger added the A-connector-integration Area: Connector integration label Jan 27, 2026
@AkshayaFoiger AkshayaFoiger changed the title feat(router): [stripe connect] prevent creation of payment method for afterpay clearpay feat(router): [stripe_connect] prevent creation of payment method for afterpay clearpay Jan 27, 2026
@AkshayaFoiger AkshayaFoiger changed the title feat(router): [stripe_connect] prevent creation of payment method for afterpay clearpay feat(router): [stripe connect] prevent creation of payment method for afterpay clearpay Jan 27, 2026
hrithikesh026
hrithikesh026 previously approved these changes Jan 27, 2026
@AkshayaFoiger AkshayaFoiger added A-framework Area: Framework S-test-ready Status: This PR is ready for cypress-tests A-connector-compatibility Area: Connector compatibility labels Jan 29, 2026
@AkshayaFoiger AkshayaFoiger requested a review from a team as a code owner January 29, 2026 09:18
swangi-kumari
swangi-kumari previously approved these changes Jan 29, 2026
swangi-kumari
swangi-kumari previously approved these changes Jan 29, 2026
@likhinbopanna likhinbopanna added this pull request to the merge queue Jan 29, 2026
@github-merge-queue github-merge-queue Bot removed this pull request from the merge queue due to failed status checks Jan 29, 2026
@likhinbopanna likhinbopanna added this pull request to the merge queue Jan 30, 2026
Merged via the queue into main with commit 82ec658 Jan 30, 2026
26 of 27 checks passed
@likhinbopanna likhinbopanna deleted the afterpay-clearpay-fix branch January 30, 2026 08:21
@codecov

codecov Bot commented Jan 30, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
⚠️ Please upload report for BASE (main@f494300). Learn more about missing BASE report.

Additional details and impacted files
@@           Coverage Diff           @@
##             main   #11051   +/-   ##
=======================================
  Coverage        ?        0           
=======================================
  Files           ?        0           
  Lines           ?        0           
  Branches        ?        0           
=======================================
  Hits            ?        0           
  Misses          ?        0           
  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.

pixincreate added a commit that referenced this pull request Jan 30, 2026
* 'main' of github.com:juspay/hyperswitch:
  feat(payment-methods): add modular payment method update api (#11044)
  fix(ucs): Handling Unspecified Payment status from UCS  (#11057)
  chore(payments_v2): external vault payment v2 flow fix (#10927)
  feat(router): [stripe connect] prevent creation of payment method for afterpay clearpay (#11051)
  feat(router): server configuration addition (#11029)
  chore(version): 2026.01.30.0
  feat(payment-methods): add modular payment method create api (#11031)
  feat(platform): support save payment method for platform payments (#11056)
  ci(cypress): pause the optional connector runs, add delay to parallel jobs, run tests on both github and hyperswitch-runners, add retry config for cypress (#11036)
  chore: fix for setupmandate and complete authorize for granular flows (#11070)
@hyperswitch-bot hyperswitch-bot Bot removed the S-test-ready Status: This PR is ready for cypress-tests label Feb 1, 2026
srujanchikke pushed a commit that referenced this pull request Feb 2, 2026
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 A-framework Area: Framework

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants