Skip to content

feat(connector): [payload] add recurring payments #8597

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 29 commits into from
Jul 31, 2025

Conversation

pixincreate
Copy link
Member

@pixincreate pixincreate commented Jul 10, 2025

Type of Change

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

Description

This PR targets Payload connector and has multiple fixes and a new feature introduced:

  • Add support for mandates (PMID and MandateID)
  • Add filters
    • Enable connector customer
    • Enable mandates
    • Add currency filter
  • Change AuthType from HeaderKey to CurrencyAuthKey
    • Add CurrencyAuthKey to connector auth
    • Wasm changes (connector configs)
  • Add connectorCustomer call
  • Change currency from StringMajorUnit to StringMinorUnit

Additional Changes

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

Motivation and Context

Closes #8610

How did you test it?

  • Modifications to test_utils does not affect the postman ci
  • Have enabled mandates for Payload in Cypress, it takes a lot of time to run (30 seconds timeout for each call) as the connector marks the transaction as duplicate. So adding it manually

PMID

CIT
curl --location 'http://localhost:8080/payments' \
--header 'Content-Type: application/json' \
--header 'Accept: application/json' \
--header 'api-key: dev_m7DXx6rBjmKrdRDYX9enGDJJdFWAR88Rqd9URbqrN3qHYPH4PdNkG4CS4RCRmtof' \
--data-raw '{
    "currency": "USD",
    "amount": 301,
    "confirm": true,
    "amount_to_capture": 301,
    "customer_id": "payload_connector_test",
    "capture_method": "automatic",
    "capture_on": "2022-09-10T10:11:12Z",
    "authentication_type": "no_three_ds",
    "return_url": "https://www.google.com",
    "email": "[email protected]",
    "name": "Joseph Doe",
    "phone": "999999999",
    "phone_country_code": "+65",
    "description": "Its my first payment request",
    "statement_descriptor_name": "Juspay",
    "statement_descriptor_suffix": "Router",
    "payment_method": "card",
    "setup_future_usage": "off_session",
    "payment_method_type": "debit",
    "payment_method_data": {
        "card": {
            "card_number": "4242424242424242",
            "card_exp_month": "03",
            "card_exp_year": "2030",
            "card_holder_name": "joseph Doe",
            "card_cvc": "737"
        }
    },
    "billing": {
        "address": {
            "line1": "1467",
            "line2": "CA",
            "line3": "Harrison Street",
            "city": "San Fransico",
            "state": "CA",
            "zip": "94122",
            "country": "US",
            "first_name": "joseph",
            "last_name": "Doe"
        },
        "phone": {
            "number": "8056594427",
            "country_code": "+91"
        }
    },
    "shipping": {
        "address": {
            "line1": "1467",
            "line2": "Harrison Street",
            "line3": "Harrison Street",
            "city": "San Fransico",
            "state": "CA",
            "zip": "94122",
            "country": "US",
            "first_name": "john",
            "last_name": "Doe"
        }
    },
    "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": "109.71.40.0"
    },
    "metadata": {
        "order_category": "applepay"
    },
    "order_details": [
        {
            "product_name": "Apple iphone 15",
            "quantity": 1,
            "amount": 300,
            "account_name": "transaction_processing"
        }
    ],
    "customer_acceptance": {
        "acceptance_type": "offline",
        "accepted_at": "1963-05-03T04:07:52.723Z",
        "online": {
            "ip_address": "in sit",
            "user_agent": "amet irure esse"
        }
    }
}'
{
    "payment_id": "pay_cFFeOg8VQh3r1UKHjxQY",
    "merchant_id": "postman_merchant_GHAction_1752169809",
    "status": "succeeded",
    "amount": 301,
    "net_amount": 301,
    "shipping_cost": null,
    "amount_capturable": 0,
    "amount_received": 301,
    "connector": "payload",
    "client_secret": "pay_cFFeOg8VQh3r1UKHjxQY_secret_9vFrK98gjbfWd17w3NGK",
    "created": "2025-07-11T10:03:59.758Z",
    "currency": "USD",
    "customer_id": "payload_connector_test",
    "customer": {
        "id": "payload_connector_test",
        "name": "Joseph Doe",
        "email": "[email protected]",
        "phone": "999999999",
        "phone_country_code": "+65"
    },
    "description": "Its my first payment request",
    "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": "CREDIT",
            "card_network": "Visa",
            "card_issuer": "STRIPE PAYMENTS UK LIMITED",
            "card_issuing_country": "UNITEDKINGDOM",
            "card_isin": "424242",
            "card_extended_bin": null,
            "card_exp_month": "03",
            "card_exp_year": "2030",
            "card_holder_name": "joseph Doe",
            "payment_checks": null,
            "authentication_data": null
        },
        "billing": null
    },
    "payment_token": null,
    "shipping": {
        "address": {
            "city": "San Fransico",
            "country": "US",
            "line1": "1467",
            "line2": "Harrison Street",
            "line3": "Harrison Street",
            "zip": "94122",
            "state": "CA",
            "first_name": "john",
            "last_name": "Doe"
        },
        "phone": null,
        "email": null
    },
    "billing": {
        "address": {
            "city": "San Fransico",
            "country": "US",
            "line1": "1467",
            "line2": "CA",
            "line3": "Harrison Street",
            "zip": "94122",
            "state": "CA",
            "first_name": "joseph",
            "last_name": "Doe"
        },
        "phone": {
            "number": "8056594427",
            "country_code": "+91"
        },
        "email": null
    },
    "order_details": [
        {
            "brand": null,
            "amount": 300,
            "category": null,
            "quantity": 1,
            "tax_rate": null,
            "product_id": null,
            "product_name": "Apple iphone 15",
            "product_type": null,
            "sub_category": null,
            "product_img_link": null,
            "product_tax_code": null,
            "total_tax_amount": null,
            "requires_shipping": null
        }
    ],
    "email": "[email protected]",
    "name": "Joseph Doe",
    "phone": "999999999",
    "return_url": "https://www.google.com/",
    "authentication_type": "no_three_ds",
    "statement_descriptor_name": "Juspay",
    "statement_descriptor_suffix": "Router",
    "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": "payload_connector_test",
        "created_at": 1752228239,
        "expires": 1752231839,
        "secret": "epk_6e270b5bb80e49128fb686e54660baab"
    },
    "manual_retry_allowed": false,
    "connector_transaction_id": "txn_3eq8JiwRx0zcJClLHNNTG",
    "frm_message": null,
    "metadata": {
        "order_category": "applepay"
    },
    "connector_metadata": null,
    "feature_metadata": null,
    "reference_id": "PL-NUR-ARK-VST",
    "payment_link": null,
    "profile_id": "pro_U3a7wsuWqn7xeMgksp4V",
    "surcharge_details": null,
    "attempt_count": 1,
    "merchant_decision": null,
    "merchant_connector_id": "mca_7CKiTQWaqGxdIPppsU0c",
    "incremental_authorization_allowed": null,
    "authorization_count": null,
    "incremental_authorizations": null,
    "external_authentication_details": null,
    "external_3ds_authentication_attempted": false,
    "expires_on": "2025-07-11T10:18:59.758Z",
    "fingerprint": null,
    "browser_info": {
        "language": "nl-NL",
        "time_zone": 0,
        "ip_address": "109.71.40.0",
        "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_method_id": "pm_K6kfIFL4v3OssBHiGbwP",
    "payment_method_status": "active",
    "updated": "2025-07-11T10:04:01.887Z",
    "split_payments": null,
    "frm_metadata": null,
    "extended_authorization_applied": null,
    "capture_before": null,
    "merchant_order_reference_id": null,
    "order_tax_amount": null,
    "connector_mandate_id": "pm_3eq8JiuwUNh4hmG5LM9z8",
    "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
}
DB
select * from payment_methods where payment_method_id='pm_K6kfIFL4v3OssBHiGbwP';
image
Logs image
MIT
curl --location 'http://localhost:8080/payments' \
--header 'Content-Type: application/json' \
--header 'Accept: application/json' \
--header 'api-key: dev_m7DXx6rBjmKrdRDYX9enGDJJdFWAR88Rqd9URbqrN3qHYPH4PdNkG4CS4RCRmtof' \
--data-raw '{
    "amount": 499,
    "currency": "USD",
    "confirm": true,
    "capture_method": "automatic",
    "customer_id": "payload_connector_test",
    "email": "[email protected]",
    "off_session": true,
    "recurring_details": {
        "type": "payment_method_id",
        "data": "pm_K6kfIFL4v3OssBHiGbwP"
    },
    
    "authentication_type": "no_three_ds"
}'
{
    "payment_id": "pay_Kh14Ha1Qf2No7vy5uInT",
    "merchant_id": "postman_merchant_GHAction_1752169809",
    "status": "succeeded",
    "amount": 499,
    "net_amount": 499,
    "shipping_cost": null,
    "amount_capturable": 0,
    "amount_received": 499,
    "connector": "payload",
    "client_secret": "pay_Kh14Ha1Qf2No7vy5uInT_secret_dZrGrLgAydWM6cohE4n3",
    "created": "2025-07-11T10:08:06.844Z",
    "currency": "USD",
    "customer_id": "payload_connector_test",
    "customer": {
        "id": "payload_connector_test",
        "name": "Joseph Doe",
        "email": "[email protected]",
        "phone": "999999999",
        "phone_country_code": "+65"
    },
    "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": "CREDIT",
            "card_network": "Visa",
            "card_issuer": "STRIPE PAYMENTS UK LIMITED",
            "card_issuing_country": "UNITEDKINGDOM",
            "card_isin": "424242",
            "card_extended_bin": null,
            "card_exp_month": "03",
            "card_exp_year": "2030",
            "card_holder_name": "joseph Doe",
            "payment_checks": null,
            "authentication_data": null
        },
        "billing": null
    },
    "payment_token": null,
    "shipping": null,
    "billing": null,
    "order_details": null,
    "email": "[email protected]",
    "name": "Joseph Doe",
    "phone": "999999999",
    "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": "payload_connector_test",
        "created_at": 1752228486,
        "expires": 1752232086,
        "secret": "epk_a2dac1ad9e95460188359d12e909214e"
    },
    "manual_retry_allowed": false,
    "connector_transaction_id": "txn_3eq8Kg5mIVLawJ4aV37th",
    "frm_message": null,
    "metadata": null,
    "connector_metadata": null,
    "feature_metadata": null,
    "reference_id": "PL-B4F-T13-TKQ",
    "payment_link": null,
    "profile_id": "pro_U3a7wsuWqn7xeMgksp4V",
    "surcharge_details": null,
    "attempt_count": 1,
    "merchant_decision": null,
    "merchant_connector_id": "mca_7CKiTQWaqGxdIPppsU0c",
    "incremental_authorization_allowed": null,
    "authorization_count": null,
    "incremental_authorizations": null,
    "external_authentication_details": null,
    "external_3ds_authentication_attempted": false,
    "expires_on": "2025-07-11T10:23:06.844Z",
    "fingerprint": null,
    "browser_info": null,
    "payment_method_id": "pm_K6kfIFL4v3OssBHiGbwP",
    "payment_method_status": "active",
    "updated": "2025-07-11T10:08:08.244Z",
    "split_payments": null,
    "frm_metadata": null,
    "extended_authorization_applied": null,
    "capture_before": null,
    "merchant_order_reference_id": null,
    "order_tax_amount": null,
    "connector_mandate_id": "pm_3eq8JiuwUNh4hmG5LM9z8",
    "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
}
Logs image

Mandate ID

CIT
curl --location 'http://localhost:8080/payments' \
--header 'Content-Type: application/json' \
--header 'Accept: application/json' \
--header 'api-key: dev_m7DXx6rBjmKrdRDYX9enGDJJdFWAR88Rqd9URbqrN3qHYPH4PdNkG4CS4RCRmtof' \
--data-raw '{
    "currency": "USD",
    "amount": 301,
    "confirm": true,
    "amount_to_capture": 301,
    "customer_id": "payload_connector_test",
    "capture_method": "automatic",
    "capture_on": "2022-09-10T10:11:12Z",
    "authentication_type": "no_three_ds",
    "return_url": "https://www.google.com",
    "email": "[email protected]",
    "name": "Joseph Doe",
    "phone": "999999999",
    "phone_country_code": "+65",
    "description": "Its my first payment request",
    "statement_descriptor_name": "Juspay",
    "statement_descriptor_suffix": "Router",
    "payment_method": "card",
    "setup_future_usage": "off_session",
    "payment_method_type": "debit",
    "payment_method_data": {
        "card": {
            "card_number": "4242424242424242",
            "card_exp_month": "03",
            "card_exp_year": "2030",
            "card_holder_name": "joseph Doe",
            "card_cvc": "737"
        }
    },
    "billing": {
        "address": {
            "line1": "1467",
            "line2": "CA",
            "line3": "Harrison Street",
            "city": "San Fransico",
            "state": "CA",
            "zip": "94122",
            "country": "US",
            "first_name": "joseph",
            "last_name": "Doe"
        },
        "phone": {
            "number": "8056594427",
            "country_code": "+91"
        }
    },
    "shipping": {
        "address": {
            "line1": "1467",
            "line2": "Harrison Street",
            "line3": "Harrison Street",
            "city": "San Fransico",
            "state": "CA",
            "zip": "94122",
            "country": "US",
            "first_name": "john",
            "last_name": "Doe"
        }
    },
    "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": "109.71.40.0"
    },
    "metadata": {
        "order_category": "applepay"
    },
    "order_details": [
        {
            "product_name": "Apple iphone 15",
            "quantity": 1,
            "amount": 300,
            "account_name": "transaction_processing"
        }
    ],
     "mandate_data": {
        "customer_acceptance": {
            "acceptance_type": "offline",
            "accepted_at": "1963-05-03T04:07:52.723Z",
            "online": {
                "ip_address": "125.0.0.1",
                "user_agent": "amet irure esse"
            }
        },
        "mandate_type": {
            "multi_use": {
                "amount": 1000,
                "currency": "USD",
                "start_date": "2023-04-21T00:00:00Z",
                "end_date": "2023-05-21T00:00:00Z",
                "metadata": {
                    "frequency": "13"
                }
            }
        }
    }
}'
{
    "payment_id": "pay_xfMJVkL91e65KhqShOL9",
    "merchant_id": "postman_merchant_GHAction_1752169809",
    "status": "succeeded",
    "amount": 301,
    "net_amount": 301,
    "shipping_cost": null,
    "amount_capturable": 0,
    "amount_received": 301,
    "connector": "payload",
    "client_secret": "pay_xfMJVkL91e65KhqShOL9_secret_FVOhXugml3wRNFaoumg1",
    "created": "2025-07-11T10:15:51.598Z",
    "currency": "USD",
    "customer_id": "payload_connector_test",
    "customer": {
        "id": "payload_connector_test",
        "name": "Joseph Doe",
        "email": "[email protected]",
        "phone": "999999999",
        "phone_country_code": "+65"
    },
    "description": "Its my first payment request",
    "refunds": null,
    "disputes": null,
    "mandate_id": "man_DOv6UBVXbbPkjZXHBLUE",
    "mandate_data": {
        "update_mandate_id": null,
        "customer_acceptance": {
            "acceptance_type": "offline",
            "accepted_at": "1963-05-03T04:07:52.723Z",
            "online": {
                "ip_address": "125.0.0.1",
                "user_agent": "amet irure esse"
            }
        },
        "mandate_type": {
            "multi_use": {
                "amount": 1000,
                "currency": "USD",
                "start_date": "2023-04-21T00:00:00.000Z",
                "end_date": "2023-05-21T00:00:00.000Z",
                "metadata": {
                    "frequency": "13"
                }
            }
        }
    },
    "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": "CREDIT",
            "card_network": "Visa",
            "card_issuer": "STRIPE PAYMENTS UK LIMITED",
            "card_issuing_country": "UNITEDKINGDOM",
            "card_isin": "424242",
            "card_extended_bin": null,
            "card_exp_month": "03",
            "card_exp_year": "2030",
            "card_holder_name": "joseph Doe",
            "payment_checks": null,
            "authentication_data": null
        },
        "billing": null
    },
    "payment_token": null,
    "shipping": {
        "address": {
            "city": "San Fransico",
            "country": "US",
            "line1": "1467",
            "line2": "Harrison Street",
            "line3": "Harrison Street",
            "zip": "94122",
            "state": "CA",
            "first_name": "john",
            "last_name": "Doe"
        },
        "phone": null,
        "email": null
    },
    "billing": {
        "address": {
            "city": "San Fransico",
            "country": "US",
            "line1": "1467",
            "line2": "CA",
            "line3": "Harrison Street",
            "zip": "94122",
            "state": "CA",
            "first_name": "joseph",
            "last_name": "Doe"
        },
        "phone": {
            "number": "8056594427",
            "country_code": "+91"
        },
        "email": null
    },
    "order_details": [
        {
            "brand": null,
            "amount": 300,
            "category": null,
            "quantity": 1,
            "tax_rate": null,
            "product_id": null,
            "product_name": "Apple iphone 15",
            "product_type": null,
            "sub_category": null,
            "product_img_link": null,
            "product_tax_code": null,
            "total_tax_amount": null,
            "requires_shipping": null
        }
    ],
    "email": "[email protected]",
    "name": "Joseph Doe",
    "phone": "999999999",
    "return_url": "https://www.google.com/",
    "authentication_type": "no_three_ds",
    "statement_descriptor_name": "Juspay",
    "statement_descriptor_suffix": "Router",
    "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": "payload_connector_test",
        "created_at": 1752228951,
        "expires": 1752232551,
        "secret": "epk_c5e3a34b2f784c68bea277551db69f8f"
    },
    "manual_retry_allowed": false,
    "connector_transaction_id": "txn_3eq8MTfYv50WNQWctbmie",
    "frm_message": null,
    "metadata": {
        "order_category": "applepay"
    },
    "connector_metadata": null,
    "feature_metadata": null,
    "reference_id": "PL-R93-80L-0LH",
    "payment_link": null,
    "profile_id": "pro_U3a7wsuWqn7xeMgksp4V",
    "surcharge_details": null,
    "attempt_count": 1,
    "merchant_decision": null,
    "merchant_connector_id": "mca_7CKiTQWaqGxdIPppsU0c",
    "incremental_authorization_allowed": null,
    "authorization_count": null,
    "incremental_authorizations": null,
    "external_authentication_details": null,
    "external_3ds_authentication_attempted": false,
    "expires_on": "2025-07-11T10:30:51.598Z",
    "fingerprint": null,
    "browser_info": {
        "language": "nl-NL",
        "time_zone": 0,
        "ip_address": "109.71.40.0",
        "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_method_id": "pm_59J4zT8ruI102Kufe0ba",
    "payment_method_status": null,
    "updated": "2025-07-11T10:15:53.533Z",
    "split_payments": null,
    "frm_metadata": null,
    "extended_authorization_applied": 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
}
DB
select * from mandate where mandate_id='man_DOv6UBVXbbPkjZXHBLUE';
image
Logs image
MIT
curl --location 'http://localhost:8080/payments' \
--header 'Content-Type: application/json' \
--header 'Accept: application/json' \
--header 'api-key: dev_m7DXx6rBjmKrdRDYX9enGDJJdFWAR88Rqd9URbqrN3qHYPH4PdNkG4CS4RCRmtof' \
--data-raw '{
    "amount": 499,
    "currency": "USD",
    "confirm": true,
    "capture_method": "automatic",
    "customer_id": "payload_connector_test",
    "email": "[email protected]",
    "off_session": true,
    "recurring_details": {
        "type": "mandate_id",
        "data": "man_DOv6UBVXbbPkjZXHBLUE"
    },
    "authentication_type": "no_three_ds"
}'
{
    "payment_id": "pay_9PGgJH8pDDvgqehXW5em",
    "merchant_id": "postman_merchant_GHAction_1752169809",
    "status": "succeeded",
    "amount": 499,
    "net_amount": 499,
    "shipping_cost": null,
    "amount_capturable": 0,
    "amount_received": 499,
    "connector": "payload",
    "client_secret": "pay_9PGgJH8pDDvgqehXW5em_secret_vH55DU5GTyE2gZCUCC5s",
    "created": "2025-07-11T10:18:56.534Z",
    "currency": "USD",
    "customer_id": "payload_connector_test",
    "customer": {
        "id": "payload_connector_test",
        "name": "Joseph Doe",
        "email": "[email protected]",
        "phone": "999999999",
        "phone_country_code": "+65"
    },
    "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": "CREDIT",
            "card_network": "Visa",
            "card_issuer": "STRIPE PAYMENTS UK LIMITED",
            "card_issuing_country": "UNITEDKINGDOM",
            "card_isin": "424242",
            "card_extended_bin": null,
            "card_exp_month": "03",
            "card_exp_year": "2030",
            "card_holder_name": "joseph Doe",
            "payment_checks": null,
            "authentication_data": null
        },
        "billing": null
    },
    "payment_token": "48d415eb-209f-4172-9c29-19bfc632e07d",
    "shipping": null,
    "billing": null,
    "order_details": null,
    "email": "[email protected]",
    "name": "Joseph Doe",
    "phone": "999999999",
    "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": "payload_connector_test",
        "created_at": 1752229136,
        "expires": 1752232736,
        "secret": "epk_9a4366bde51147aa934745fa0e027bf1"
    },
    "manual_retry_allowed": false,
    "connector_transaction_id": "txn_3eq8NC1EJ8WDm9T9DDq4w",
    "frm_message": null,
    "metadata": null,
    "connector_metadata": null,
    "feature_metadata": null,
    "reference_id": "PL-VJO-13E-620",
    "payment_link": null,
    "profile_id": "pro_U3a7wsuWqn7xeMgksp4V",
    "surcharge_details": null,
    "attempt_count": 1,
    "merchant_decision": null,
    "merchant_connector_id": "mca_7CKiTQWaqGxdIPppsU0c",
    "incremental_authorization_allowed": null,
    "authorization_count": null,
    "incremental_authorizations": null,
    "external_authentication_details": null,
    "external_3ds_authentication_attempted": false,
    "expires_on": "2025-07-11T10:33:56.534Z",
    "fingerprint": null,
    "browser_info": null,
    "payment_method_id": "pm_59J4zT8ruI102Kufe0ba",
    "payment_method_status": "active",
    "updated": "2025-07-11T10:18:58.254Z",
    "split_payments": null,
    "frm_metadata": null,
    "extended_authorization_applied": null,
    "capture_before": null,
    "merchant_order_reference_id": null,
    "order_tax_amount": null,
    "connector_mandate_id": "pm_3eq8MTeHLzBEtLVBD2g0b",
    "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
}
Logs image

Cypress Test

Cypress image

Checklist

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

…ayload-webhooks

* 'main' of github.com:juspay/hyperswitch:
  refactor(connector): Move connector mappings and endpoints to dedicated modules (#8562)
  ci(cypress): fix `hipay` test cases (#8563)
  chore(version): 2025.07.09.0
  fix(payment_method): update entity id used for Vault to global customer id (#8380)
  refactor(routing): add conditional check for invoking DE routing flows (#8559)
  feat(connector): [AUTHIPAY] Integrate cards non 3ds payments (#8266)
  ci(cypress): add payu connector (#8567)
  feat(connector): [silverflow] template code (#8553)
  chore(version): 2025.07.08.0
  feat(cypress): [worldpayvantiv] add cypress test (#8234)
  feat(connectors): [worldpayvantiv] add connector mandate support  (#8546)
  feat(connector): [Celero] add Connector Template Code (#8489)
  feat(payment-methods): create payment_token in vault confirm / do payment-confirm with temp token from session (#8525)
  ci(cypress): Add Tsys,Square cypress test (#8543)
  chore(version): 2025.07.07.0
Copy link

semanticdiff-com bot commented Jul 10, 2025

Review changes with  SemanticDiff

Changed Files
File Status
  crates/hyperswitch_connectors/src/default_implementations.rs  75% smaller
  crates/test_utils/src/connector_auth.rs  68% smaller
  crates/hyperswitch_connectors/src/connectors/payload/responses.rs  52% smaller
  crates/hyperswitch_connectors/src/connectors/payload/transformers.rs  23% smaller
  cypress-tests/cypress/e2e/configs/Payment/Commons.js  15% smaller
  crates/hyperswitch_connectors/src/connectors/payload.rs  13% smaller
  crates/hyperswitch_connectors/src/connectors/payload/requests.rs  10% smaller
  cypress-tests/cypress/e2e/configs/Payment/Payload.js  1% smaller
  Cargo.lock Unsupported file format
  config/config.example.toml Unsupported file format
  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
  config/docker_compose.toml Unsupported file format
  crates/connector_configs/toml/development.toml Unsupported file format
  crates/connector_configs/toml/production.toml Unsupported file format
  crates/connector_configs/toml/sandbox.toml Unsupported file format
  crates/hyperswitch_connectors/src/utils.rs  0% smaller
  crates/hyperswitch_domain_models/src/router_request_types.rs  0% smaller
  crates/router/tests/connectors/utils.rs  0% smaller
  crates/test_utils/Cargo.toml Unsupported file format
  loadtest/config/development.toml Unsupported file format

@pixincreate pixincreate self-assigned this Jul 10, 2025
@pixincreate pixincreate added A-connector-integration Area: Connector integration C-feature Category: Feature request or enhancement labels Jul 10, 2025
@pixincreate pixincreate added this to the July 2025 Release milestone Jul 10, 2025
@pixincreate pixincreate force-pushed the connector/payload-recurring branch 2 times, most recently from 4e37606 to 9540f48 Compare July 11, 2025 10:25
@pixincreate pixincreate linked an issue Jul 11, 2025 that may be closed by this pull request
@pixincreate pixincreate marked this pull request as ready for review July 11, 2025 10:59
@pixincreate pixincreate requested review from a team as code owners July 11, 2025 10:59
Base automatically changed from connector/payload-webhooks to main July 11, 2025 12:58
@pixincreate pixincreate force-pushed the connector/payload-recurring branch from f4423d6 to db9133e Compare July 11, 2025 15:49
…ayload-webhooks

* 'main' of github.com:juspay/hyperswitch:
  feat(payments): propagate additional payment method data for apple pay during MIT (#7170)
  feat(core): Hyperswitch <|> UCS integration v2 (#8439)
  feat(connector): [payload] add webhook support (#8558)
  ci(cypress): Added Dlocal Connector Test (#8362)
  feat(connector): [AIRWALLEX] - Added Paypal, Trustly, Klarna , Atome, Blik Payment Methods (#8475)
  refactor(cypress): update skip logic and test flow for cypress incremental auth tests (#8594)
  chore(version): 2025.07.11.0
  chore: address Rust 1.88.0 clippy lints (#8607)
  chore(version): 2025.07.10.0
likhinbopanna
likhinbopanna previously approved these changes Jul 26, 2025
@likhinbopanna likhinbopanna added this pull request to the merge queue Jul 31, 2025
Merged via the queue into main with commit 64e6dc8 Jul 31, 2025
24 of 31 checks passed
@likhinbopanna likhinbopanna deleted the connector/payload-recurring branch July 31, 2025 07:04
pixincreate added a commit that referenced this pull request Jul 31, 2025
…dd-xof-cybersource

* 'main' of github.com:juspay/hyperswitch:
  feat(authentication): added authentication sync api (#8596)
  feat(connector): [facilitapay] fix refunds, add webhook and void support (#8778)
  feat(connector): [payload] add recurring payments (#8597)
  chore(version): 2025.07.31.0
  feat(connector): [Flexiti]Add support for flexiti connector  (#8743)
  chore(router): events enhancement for kafka (#8780)
  ci(cypress): Making a mandate payment with large customer user agents (#8790)
pixincreate added a commit that referenced this pull request Aug 1, 2025
…rver

* 'main' of github.com:juspay/hyperswitch: (25 commits)
  chore: `xof` currency to cybersource cards (#8799)
  chore(version): 2025.08.01.0
  feat(core): Implement UCS based  upi for  paytm and phonepe (#8732)
  feat(connector): [katapult]add template code for katapult (#8783)
  feat(router): introduce `feature`  and `feature_data` to gsm (#7771)
  feat(connector): [cybersource] add changes for field CybersourceConsumerAuthInformation (#8768)
  feat(authentication): added authentication sync api (#8596)
  feat(connector): [facilitapay] fix refunds, add webhook and void support (#8778)
  feat(connector): [payload] add recurring payments (#8597)
  chore(version): 2025.07.31.0
  feat(connector): [Flexiti]Add support for flexiti connector  (#8743)
  chore(router): events enhancement for kafka (#8780)
  ci(cypress): Making a mandate payment with large customer user agents (#8790)
  fix(openapi): update create_platform endpoint in api-reference docs (#8782)
  chore(version): 2025.07.30.0
  fix(connector): [GLOBALPAY] Added Tokenization Flow for CITs (#8568)
  feat(routing): Add api-refs for new decision engine endpoints (#8709)
  fix: replace xtrim with xdel to support  older redis version (#8515)
  fix(connector): [Worldpay] handle multiple ddc submission for CompleteAuthorize (#8741)
  feat(connector): [Adyen] receive incoming webhooks for pix expiry (#8720)
  ...
@ashx98 ashx98 changed the title feat(connector): [payload] add recurring payments feat(connector): [payload] add recurring payments SEV2 Aug 4, 2025
@ashx98 ashx98 changed the title feat(connector): [payload] add recurring payments SEV2 feat(connector): [payload] add recurring payments Aug 4, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-connector-integration Area: Connector integration C-feature Category: Feature request or enhancement
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[FEAT] Add mandates for Payload
4 participants