Skip to content

feat(connector): [BRAINTREE] Paypal, Googlepay, Applepay wallets added #8728

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

Open
wants to merge 3 commits into
base: main
Choose a base branch
from

Conversation

swetasharma03
Copy link
Contributor

@swetasharma03 swetasharma03 commented Jul 23, 2025

Type of Change

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

Description

Paypal, Googlepay, Applepay wallets added in BRAINTREE.

Additional Changes

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

Motivation and Context

How did you test it?

1. MCA
curl --location 'http://localhost:8080/account/merchant_1754943264/connectors' \
--header 'Content-Type: application/json' \
--header 'Accept: application/json' \
--header 'x_merchant_domain: https://popular-grasshopper-95.telebit.io' \
--header 'api-key: dev_LyW7U8k5lBfnRiPjF75igyRatN0xh1g7cYbUW4pJiuZnmlaVOzeY0mw4bREoiQxh' \
--data '{
    "connector_type": "payment_processor",
    "connector_name": "braintree",
    "connector_account_details": {
        "auth_type": "SignatureKey",
        "api_key": "API_KEY",
        "api_secret": "API_SECRET",
        "key1": "KEY1"
    },
    "test_mode": true,
    "disabled": false,
    "payment_methods_enabled": [
        {
            "payment_method": "card",
            "payment_method_types": [
                {
                    "payment_method_type": "credit",
                    "card_networks": [
                        "Visa",
                        "Mastercard"
                    ],
                    "minimum_amount": 1,
                    "maximum_amount": 68607706,
                    "recurring_enabled": true,
                    "installment_payment_enabled": true,
                    "accepted_countries": {
                        "type": "disable_only",
                        "list": [
                            "HK"
                        ]
                    },
                    "accepted_currencies": {
                        "type": "enable_only",
                        "list": [
                            "USD",
                            "GBP",
                            "INR"
                        ]
                    }
                },
                {
                    "payment_method_type": "debit",
                    "card_networks": [
                        "Visa",
                        "Mastercard"
                    ],
                    "minimum_amount": 1,
                    "maximum_amount": 68607706,
                    "recurring_enabled": true,
                    "installment_payment_enabled": true,
                    "accepted_countries": {
                        "type": "disable_only",
                        "list": [
                            "HK"
                        ]
                    },
                    "accepted_currencies": {
                        "type": "enable_only",
                        "list": [
                            "USD",
                            "GBP",
                            "INR"
                        ]
                    }
                }
            ]
        },
        {
            "payment_method": "wallet",
            "payment_method_types": [
                {
                    "payment_method_type": "paypal",
                    "payment_experience": "invoke_sdk_client",
                    "card_networks": null,
                    "accepted_currencies": null,
                    "accepted_countries": null,
                    "minimum_amount": 1,
                    "maximum_amount": 68607706,
                    "recurring_enabled": true,
                    "installment_payment_enabled": true
                },
                {
                    "payment_method_type": "google_pay",
                    "payment_experience": "invoke_sdk_client",
                    "card_networks": null,
                    "accepted_currencies": null,
                    "accepted_countries": null,
                    "minimum_amount": 1,
                    "maximum_amount": 68607706,
                    "recurring_enabled": true,
                    "installment_payment_enabled": true
                },
                {
                    "payment_method_type": "apple_pay",
                    "payment_experience": "invoke_sdk_client",
                    "card_networks": null,
                    "accepted_currencies": null,
                    "accepted_countries": null,
                    "minimum_amount": 1,
                    "maximum_amount": 68607706,
                    "recurring_enabled": true,
                    "installment_payment_enabled": true
                }
            ]
        }
    ],
    "metadata": {
        "merchant_account_id": "PAYPAL_MERCHANT_ACCOUNT_ID",
        "merchant_config_currency": "USD",
        "paypal_sdk": {
            "client_id": "PAYPAL_CLIENT_ID"
        },
        "google_pay": {
            "allowed_payment_methods": [
                {
                    "type": "CARD",
                    "parameters": {
                        "allowed_auth_methods": [
                            "PAN_ONLY",
                            "CRYPTOGRAM_3DS"
                        ],
                        "allowed_card_networks": [
                            "AMEX",
                            "DISCOVER",
                            "INTERAC",
                            "JCB",
                            "MASTERCARD",
                            "VISA"
                        ]
                    },
                    "tokenization_specification": {
                        "type": "PAYMENT_GATEWAY",
                        "parameters": {
                            "gateway": "example",
                            "gateway_merchant_id": "exampleGatewayMerchantId"
                        }
                    }
                }
            ],
            "merchant_info": {
                "merchant_name": "Narayan Bhat"
            }
        },
        "apple_pay_combined": {
            "simplified": {
                "session_token_data": {
                    "initiative_context": "debuglab.basilisk-char.ts.net",
                    "merchant_business_country": "US"
                },
                "payment_request_data": {
                    "label": "applepay",
                    "supported_networks": [
                        "visa",
                        "masterCard",
                        "amex",
                        "discover"
                    ],
                    "merchant_capabilities": [
                        "supports3DS"
                    ]
                }
            }
        }
    },
    "connector_webhook_details": {
        "merchant_secret": "MyWebhookSecret"
    },
    "business_country": "US",
    "business_label": "default"
}'

Response:

{"connector_type":"payment_processor","connector_name":"braintree","connector_label":"braintree_US_default","merchant_connector_id":"mca_HrBB5GxZaPbMIZm9sAkO","profile_id":"pro_UF7x1VUr8LV9gu1lQwn1","connector_account_details":{"auth_type":"SignatureKey","api_key":"5j************93","key1":"gs************sk","api_secret":"26****************************55"},"payment_methods_enabled":[{"payment_method":"card","payment_method_types":[{"payment_method_type":"credit","payment_experience":null,"card_networks":["Visa","Mastercard"],"accepted_currencies":{"type":"enable_only","list":["USD","GBP","INR"]},"accepted_countries":{"type":"disable_only","list":["HK"]},"minimum_amount":1,"maximum_amount":68607706,"recurring_enabled":true,"installment_payment_enabled":true},{"payment_method_type":"debit","payment_experience":null,"card_networks":["Visa","Mastercard"],"accepted_currencies":{"type":"enable_only","list":["USD","GBP","INR"]},"accepted_countries":{"type":"disable_only","list":["HK"]},"minimum_amount":1,"maximum_amount":68607706,"recurring_enabled":true,"installment_payment_enabled":true}]},{"payment_method":"pay_later","payment_method_types":[{"payment_method_type":"klarna","payment_experience":"redirect_to_url","card_networks":null,"accepted_currencies":null,"accepted_countries":null,"minimum_amount":1,"maximum_amount":68607706,"recurring_enabled":true,"installment_payment_enabled":true},{"payment_method_type":"affirm","payment_experience":"redirect_to_url","card_networks":null,"accepted_currencies":null,"accepted_countries":null,"minimum_amount":1,"maximum_amount":68607706,"recurring_enabled":true,"installment_payment_enabled":true},{"payment_method_type":"afterpay_clearpay","payment_experience":"redirect_to_url","card_networks":null,"accepted_currencies":null,"accepted_countries":null,"minimum_amount":1,"maximum_amount":68607706,"recurring_enabled":true,"installment_payment_enabled":true}]},{"payment_method":"wallet","payment_method_types":[{"payment_method_type":"paypal","payment_experience":"invoke_sdk_client","card_networks":null,"accepted_currencies":null,"accepted_countries":null,"minimum_amount":1,"maximum_amount":68607706,"recurring_enabled":true,"installment_payment_enabled":true},{"payment_method_type":"google_pay","payment_experience":"invoke_sdk_client","card_networks":null,"accepted_currencies":null,"accepted_countries":null,"minimum_amount":1,"maximum_amount":68607706,"recurring_enabled":true,"installment_payment_enabled":true},{"payment_method_type":"apple_pay","payment_experience":"invoke_sdk_client","card_networks":null,"accepted_currencies":null,"accepted_countries":null,"minimum_amount":1,"maximum_amount":68607706,"recurring_enabled":true,"installment_payment_enabled":true},{"payment_method_type":"mobile_pay","payment_experience":null,"card_networks":null,"accepted_currencies":null,"accepted_countries":null,"minimum_amount":1,"maximum_amount":68607706,"recurring_enabled":true,"installment_payment_enabled":true},{"payment_method_type":"ali_pay","payment_experience":null,"card_networks":null,"accepted_currencies":null,"accepted_countries":null,"minimum_amount":1,"maximum_amount":68607706,"recurring_enabled":true,"installment_payment_enabled":true},{"payment_method_type":"we_chat_pay","payment_experience":null,"card_networks":null,"accepted_currencies":null,"accepted_countries":null,"minimum_amount":1,"maximum_amount":68607706,"recurring_enabled":true,"installment_payment_enabled":true},{"payment_method_type":"mb_way","payment_experience":null,"card_networks":null,"accepted_currencies":null,"accepted_countries":null,"minimum_amount":1,"maximum_amount":68607706,"recurring_enabled":true,"installment_payment_enabled":true}]}],"connector_webhook_details":{"merchant_secret":"MyWebhookSecret","additional_secret":null},"metadata":{"google_pay":{"merchant_info":{"merchant_name":"Narayan Bhat"},"allowed_payment_methods":[{"type":"CARD","parameters":{"allowed_auth_methods":["PAN_ONLY","CRYPTOGRAM_3DS"],"allowed_card_networks":["AMEX","DISCOVER","INTERAC","JCB","MASTERCARD","VISA"]},"tokenization_specification":{"type":"PAYMENT_GATEWAY","parameters":{"gateway":"example","gateway_merchant_id":"exampleGatewayMerchantId"}}}]},"paypal_sdk":{"client_id":"PAYPAL_CLIENT_ID"},"apple_pay_combined":{"simplified":{"session_token_data":{"initiative_context":"debuglab.basilisk-char.ts.net","merchant_business_country":"US"},"payment_request_data":{"label":"applepay","supported_networks":["visa","masterCard","amex","discover"],"merchant_capabilities":["supports3DS"]}}},"merchant_account_id":"MERCHANT_ACCOUNT_ID","merchant_config_currency":"USD"},"test_mode":true,"disabled":false,"frm_configs":null,"business_country":"US","business_label":"default","business_sub_label":null,"applepay_verified_domains":null,"pm_auth_config":null,"status":"active","additional_merchant_data":null,"connector_wallets_details":{"apple_pay_combined":{"simplified":{"payment_request_data":{"supported_networks":["visa","masterCard","amex","discover"],"merchant_capabilities":["supports3DS"],"label":"applepay"},"session_token_data":{"initiative_context":"debuglab.basilisk-char.ts.net","merchant_business_country":"US"}}}}}
2. Session Token
curl --location 'http://localhost:8080/payments/session_tokens' \
--header 'Content-Type: application/json' \
--header 'x-merchant-domain: https://popular-grasshopper-95.telebit.io' \
--header 'api-key: pk_dev_d9bc174655254b479705763816e61259' \
--data '{
    "payment_id": "pay_z7h5aBGzTHwYhw4Aw5WC",
    "wallets": [],
    "client_secret": "pay_z7h5aBGzTHwYhw4Aw5WC_secret_hIDNsxR1lOzC5AQydKKy"
}
'

Response:

{
    "payment_id": "pay_z7h5aBGzTHwYhw4Aw5WC",
    "client_secret": "pay_z7h5aBGzTHwYhw4Aw5WC_secret_hIDNsxR1lOzC5AQydKKy",
    "session_token": [
        {
            "wallet_name": "paypal",
            "connector": "braintree",
            "session_token": "ASKAGh2WXgqfQ5TzjpZzLsfhVGlFbjq5VrV5IOX8KXDD2N_XqkGeYNDkWyr_UXnfhXpEkABdmP284b_2",
            "sdk_next_action": {
                "next_action": "confirm"
            },
            "client_token": "eyJ2ZXJzaW9uIjoyLCJhdXRob3JpemF0aW9uRmluZ2VycHJpbnQiOiJleUowZVhBaU9pSktWMVFpTENKaGJHY2lPaUpGVXpJMU5pSXNJbXRwW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oibW9jayIsInN1cHBvcnRlZE5ldHdvcmtzIjpbInZpc2EiLCJtYXN0ZXJjYXJkIiwiYW1leCIsImRpc2NvdmVyIl19LCJwYXlwYWxFbmFibGVkIjp0cnVlLCJwYXlwYWwiOnsiYmlsbGluZ0FncmVlbWVudHNFbmFibGVkIjp0cnVlLCJlbnZpcm9ubWVudE5vTmV0d29yayI6ZmFsc2UsInVudmV0dGVkTWVyY2hhbnQiOmZhbHNlLCJhbGxvd0h0dHAiOnRydWUsImRpc3BsYXlOYW1lIjoiSnVzcGF5IiwiY2xpZW50SWQiOiJBU0tBR2gyV1hncWZRNVR6anBaekxzZmhWR2xGYmpxNVZyVjVJT1g4S1hERDJOX1hxa0dlWU5Ea1d5cl9VWG5maFhwRWtBQmRtUDI4NGJfMiIsImFjY291bnROdW1iZXIiOm51bGwsImJhc2VVcmwiOiJodHRwczovL2Fzc2V0cy5icmFpbnRyZWVnYXRld2F5LmNvbSIsImFzc2V0c1VybCI6Imh0dHBzOi8vY2hlY2tvdXQucGF5cGFsLmNvbSIsImRpcmVjdEJhc2VVcmwiOm51bGwsImVudmlyb25tZW50Ijoib2ZmbGluZSIsImJyYWludHJlZUNsaWVudElkIjoibWFzdGVyY2xpZW50MyIsIm1lcmNoYW50QWNjb3VudElkIjoiQW5hbmQiLCJjdXJyZW5jeUlzb0NvZGUiOiJVU0QifX0=",
            "transaction_info": {
                "flow": "checkout",
                "currency_code": "USD",
                "total_price": "65.40"
            }
        },
        {
            "wallet_name": "google_pay",
            "merchant_info": {
                "merchant_name": "Braintree Merchant"
            },
            "shipping_address_required": false,
            "email_required": false,
            "shipping_address_parameters": {
                "phone_number_required": false
            },
            "allowed_payment_methods": [],
            "transaction_info": {
                "country_code": "US",
                "currency_code": "USD",
                "total_price_status": "FINAL",
                "total_price": "65.40"
            },
            "delayed_session_token": false,
            "connector": "braintree",
            "sdk_next_action": {
                "next_action": "confirm"
            },
            "secrets": {
                "display": "eyJ2ZXJzaW9uIjoyLCJhdXRob3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OiJVU0QiLCJtZXJjaGFudElkZW50aWZpZXIiOiJtZXJjaGFudC5jb20uYWR5ZW4uc2FuIiwic3RhdHVzIjoibW9jayIsInN1cHBvcnRlZE5ldHdvcmtzIjpbInZpc2EiLCJtYXN0ZXJjYXJkIiwiYW1leCIsImRpc2NvdmVyIl19LCJwYXlwYWxFbmFibGVkIjp0cnVlLCJwYXlwYWwiOnsiYmlsbGluZ0FncmVlbWVudHNFbmFibGVkIjp0cnVlLCJlbnZpcm9ubWVudE5vTmV0d29yayI6ZmFsc2UsInVudmV0dGVkTWVyY2hhbnQiOmZhbHNlLCJhbGxvd0h0dHAiOnRydWUsImRpc3BsYXlOYW1lIjoiSnVzcGF5IiwiY2xpZW50SWQiOiJBU0tBR2gyV1hncWZRNVR6anBaekxzZmhWR2xGYmpxNVZyVjVJT1g4S1hERDJOX1hxa0dlWU5Ea1d5cl9VWG5maFhwRWtBQmRtUDI4NGJfMiIsImFjY291bnROdW1iZXIiOm51bGwsImJhc2VVcmwiOiJodHRwczovL2Fzc2V0cy5icmFpbnRyZWVnYXRld2F5LmNvbSIsImFzc2V0c1VybCI6Imh0dHBzOi8vY2hlY2tvdXQucGF5cGFsLmNvbSIsImRpcmVjdEJhc2VVcmwiOm51bGwsImVudmlyb25tZW50Ijoib2ZmbGluZSIsImJyYWludHJlZUNsaWVudElkIjoibWFzdGVyY2xpZW50MyIsIm1lcmNoYW50QWNjb3VudElkIjoiQW5hbmQiLCJjdXJyZW5jeUlzb0NvZGUiOiJVU0QifX0=",
                "payment": null
            }
        },
        {
            "wallet_name": "apple_pay",
            "session_token_data": {
                "secrets": {
                    "display": "eyJ2ZXJzaW9uIjoyLCJhdXRob3JpemF0aW9uRmluZ2VycHJpbnQiOiJleUowZVhBaU9pSktWMVFpTENKaGJHY2lPaUpGVXpJMU5pSXNJbXRwWkNJNklqSXdNVGd3TkRJMk1UWXRjMkZ1WkdKdmVDSXNJbWx6Y3lJNkltaDBkSEJ6T2k4dllYQnBMbk5oYm1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c2NvdmVyIl19LCJwYXlwYWxFbmFibGVkIjp0cnVlLCJwYXlwYWwiOnsiYmlsbGluZ0FncmVlbWVudHNFbmFibGVkIjp0cnVlLCJlbnZpcm9ubWVudE5vTmV0d29yayI6ZmFsc2UsInVudmV0dGVkTWVyY2hhbnQiOmZhbHNlLCJhbGxvd0h0dHAiOnRydWUsImRpc3BsYXlOYW1lIjoiSnVzcGF5IiwiY2xpZW50SWQiOiJBU0tBR2gyV1hncWZRNVR6anBaekxzZmhWR2xGYmpxNVZyVjVJT1g4S1hERDJOX1hxa0dlWU5Ea1d5cl9VWG5maFhwRWtBQmRtUDI4NGJfMiIsImFjY291bnROdW1iZXIiOm51bGwsImJhc2VVcmwiOiJodHRwczovL2Fzc2V0cy5icmFpbnRyZWVnYXRld2F5LmNvbSIsImFzc2V0c1VybCI6Imh0dHBzOi8vY2hlY2tvdXQucGF5cGFsLmNvbSIsImRpcmVjdEJhc2VVcmwiOm51bGwsImVudmlyb25tZW50Ijoib2ZmbGluZSIsImJyYWludHJlZUNsaWVudElkIjoibWFzdGVyY2xpZW50MyIsIm1lcmNoYW50QWNjb3VudElkIjoiQW5hbmQiLCJjdXJyZW5jeUlzb0NvZGUiOiJVU0QifX0=",
                    "payment": null
                }
            },
            "payment_request_data": {
                "country_code": "US",
                "currency_code": "USD",
                "total": {
                    "label": "applepay",
                    "type": null,
                    "amount": "65.40"
                },
                "merchant_capabilities": [
                    "supports3DS"
                ],
                "supported_networks": [
                    "visa",
                    "masterCard",
                    "amex",
                    "discover"
                ],
                "merchant_identifier": null
            },
            "connector": "braintree",
            "delayed_session_token": false,
            "sdk_next_action": {
                "next_action": "confirm"
            },
            "connector_reference_id": null,
            "connector_sdk_public_key": null,
            "connector_merchant_id": null
        }
    ]
}
3. Paypal
curl --location 'http://localhost:8080/payments' \
--header 'Content-Type: application/json' \
--header 'Accept: application/json' \
--header 'api-key: dev_LyW7U8k5lBfnRiPjF75igyRatN0xh1g7cYbUW4pJiuZnmlaVOzeY0mw4bREoiQxh' \
--data-raw '{
    "amount": 6540,
    "currency": "USD",
    "amount_to_capture": 6540,
    "confirm": true,
    
    "capture_method": "automatic",
    "capture_on": "2022-09-10T10:11:12Z",
    "authentication_type": "no_three_ds",
    "setup_future_usage": "on_session", 
    "customer": {
        "id": "customer123",
        "name": "John Doe",
        "email": "[email protected]",
        "phone": "9999999999",
        "phone_country_code": "+1"
    },
    "customer_id": "customer123",

    "phone_country_code": "+1",
    "routing": { 
        "type": "single",
        "data": "stripe"
    },
    "description": "Its my first payment request",
    "return_url": "https://google.com",
    "payment_method": "wallet",
    "payment_method_type": "paypal",
    "payment_method_data": {
        "wallet": {
            "paypal_sdk": {
                "token": "b31837e5-c04e-1926-755a-8236ff8ef5e5"
            }
        }
    },
    
    "billing": {
        "address": {
            "line1": "1467",
            "line2": "Harrison Street",
            "line3": "Harrison Street",
            "city": "San Fransico",
            "state": "California",
            "zip": "94122",
            "country": "US",
            "first_name": "joseph",
            "last_name": "Doe"
        },
        "phone": {
            "number": "8056594427",
            "country_code": "+91"
        },
        "email": "[email protected]"
    },
    "shipping": {
        "address": {
            "line1": "1467",
            "line2": "Harrison Street",
            "line3": "Harrison Street",
            "city": "San Fransico",
            "state": "California",
            "zip": "94122",
            "country": "US",
            "first_name": "joseph",
            "last_name": "Doe"
        },
        "phone": {
            "number": "8056594427",
            "country_code": "+91"
        },
        "email": "[email protected]"
    },
    "statement_descriptor_name": "joseph",
    "statement_descriptor_suffix": "JS",
    "order_details": [
        {
            "product_name": "Apple iphone 15",
            "quantity": 1,
            "amount": 6540,
            "account_name": "transaction_processing"
        }
    ],
    "metadata": {
        "udf1": "value1",
        "new_customer": "true",
        "login_date": "2019-09-10T10:11:12Z"
    },
    "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": "128.0.0.1"
    },
    "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"
        }
    },
    
    "connector_metadata": {
        "noon": {
            "order_category": "pay"
        }
    },
    "payment_link": false,
    "payment_link_config": {
        "theme": "",
        "logo": "",
        "seller_name": "",
        "sdk_layout": "",
        "display_sdk_only": false,
        "enabled_saved_payment_method": false
    },
    "payment_type": "normal", 
    "request_incremental_authorization": false,
    "merchant_order_reference_id": "test_ord",
    "session_expiry": 900  
}'

Response:

{"payment_id":"pay_6b0waAI3jjWziaxxmGwU","merchant_id":"merchant_1754943264","status":"succeeded","amount":6540,"net_amount":6540,"shipping_cost":null,"amount_capturable":0,"amount_received":6540,"connector":"braintree","client_secret":"pay_6b0waAI3jjWziaxxmGwU_secret_C16kSabSeIECI3GAnDPg","created":"2025-08-12T07:32:15.043Z","currency":"USD","customer_id":"customer123","customer":{"id":"customer123","name":"John Doe","email":"[email protected]","phone":"9999999999","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":"wallet","payment_method_data":{"wallet":{},"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":"joseph","last_name":"Doe","origin_zip":null},"phone":{"number":"8056594427","country_code":"+91"},"email":"[email protected]"},"billing":{"address":{"city":"San Fransico","country":"US","line1":"1467","line2":"Harrison Street","line3":"Harrison Street","zip":"94122","state":"California","first_name":"joseph","last_name":"Doe","origin_zip":null},"phone":{"number":"8056594427","country_code":"+91"},"email":"[email protected]"},"order_details":[{"sku":null,"upc":null,"brand":null,"amount":6540,"category":null,"quantity":1,"tax_rate":null,"product_id":null,"description":null,"product_name":"Apple iphone 15","product_type":null,"sub_category":null,"total_amount":null,"commodity_code":null,"unit_of_measure":null,"product_img_link":null,"product_tax_code":null,"total_tax_amount":null,"requires_shipping":null,"unit_discount_amount":null}],"email":"[email protected]","name":"John Doe","phone":"9999999999","return_url":"https://google.com/","authentication_type":"no_three_ds","statement_descriptor_name":"joseph","statement_descriptor_suffix":"JS","next_action":null,"cancellation_reason":null,"error_code":null,"error_message":null,"unified_code":null,"unified_message":null,"payment_experience":null,"payment_method_type":"paypal","connector_label":null,"business_country":null,"business_label":"default","business_sub_label":null,"allowed_payment_method_types":null,"ephemeral_key":{"customer_id":"customer123","created_at":1754983934,"expires":1754987534,"secret":"epk_8e58911506de412686f6930dba01bd96"},"manual_retry_allowed":false,"connector_transaction_id":"dHJhbnNhY3Rpb25fMDE1djVtc2M","frm_message":null,"metadata":{"udf1":"value1","login_date":"2019-09-10T10:11:12Z","new_customer":"true"},"connector_metadata":{"apple_pay":null,"airwallex":null,"noon":{"order_category":"pay"},"braintree":null,"adyen":null},"feature_metadata":{"redirect_response":null,"search_tags":null,"apple_pay_recurring_details":null,"gateway_system":"direct"},"reference_id":null,"payment_link":null,"profile_id":"pro_UF7x1VUr8LV9gu1lQwn1","surcharge_details":null,"attempt_count":1,"merchant_decision":null,"merchant_connector_id":"mca_HrBB5GxZaPbMIZm9sAkO","incremental_authorization_allowed":false,"authorization_count":null,"incremental_authorizations":null,"external_authentication_details":null,"external_3ds_authentication_attempted":false,"expires_on":"2025-08-12T07:47:15.043Z","fingerprint":null,"browser_info":{"language":"nl-NL","time_zone":0,"ip_address":"128.0.0.1","user_agent":"Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/70.0.3538.110 Safari/537.36","color_depth":24,"java_enabled":true,"screen_width":1536,"accept_header":"text/html,application/xhtml+xml,application/xml;q=0.9,image/webp,image/apng,*/*;q=0.8","screen_height":723,"java_script_enabled":true},"payment_channel":null,"payment_method_id":null,"network_transaction_id":null,"payment_method_status":null,"updated":"2025-08-12T07:32:18.945Z","split_payments":null,"frm_metadata":null,"extended_authorization_applied":null,"capture_before":null,"merchant_order_reference_id":"test_ord","order_tax_amount":null,"connector_mandate_id":null,"card_discovery":null,"force_3ds_challenge":false,"force_3ds_challenge_trigger":false,"issuer_error_code":null,"issuer_error_message":null,"is_iframe_redirection_enabled":null,"whole_connector_response":null,"enable_partial_authorization":null}
4. Google pay
curl --location 'http://localhost:8080/payments' \
--header 'Content-Type: application/json' \
--header 'Accept: application/json' \
--header 'api-key: dev_LyW7U8k5lBfnRiPjF75igyRatN0xh1g7cYbUW4pJiuZnmlaVOzeY0mw4bREoiQxh' \
--data-raw '{
    "amount": 100,
    "currency": "USD",
    "confirm": true,
    "payment_link": false,
    "capture_method": "automatic",
    "capture_on": "2022-09-10T10:11:12Z",
    "amount_to_capture": 100,
    "customer_id": "StripeCustomer",
    "email": "[email protected]",
    "name": "John Doe",
    "phone": "999999999",
    "phone_country_code": "+1",
    "description": "Its my first payment request",
    "authentication_type": "three_ds",
    "return_url": "https://google.com",
    "payment_method": "wallet",
    "payment_method_type": "google_pay",
    "payment_method_data": {
        "wallet": {
            "google_pay": {
                "description": "Visa •••• 1111",
                "tokenization_data": {
                    "type": "PAYMENT_GATEWAY",
                    "token": "8d44a441-a82d-1286-47e0-df6acf6482a1"
                },
                "type": "CARD",
                "info": {
                    "card_network": "VISA",
                    "card_details": "1111"
                }
            }
        }
    },
    "billing": {
        "address": {
            "line1": "1467",
            "line2": "CA",
            "line3": "CA",
            "city": "Musterhausen",
            "state": "California",
            "zip": "12345",
            "country": "DE",
            "first_name": "Max",
            "last_name": "Mustermann"
        },
        "email": "[email protected]",
        "phone": {
            "number": "8056594427",
            "country_code": "+91"
        }
    },
    "shipping": {
        "address": {
            "line1": "Musterstr",
            "line2": "CA",
            "line3": "CA",
            "city": "Musterhausen",
            "state": "California",
            "zip": "94122",
            "country": "DE",
            "first_name": "joseph",
            "last_name": "Doe"
        },
        "phone": {
            "number": "8056594427",
            "country_code": "+91"
        }
    },
    "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,
        "ip_address": "103.77.139.95",
        "screen_height": 723,
        "screen_width": 1536,
        "time_zone": 0,
        "java_enabled": true,
        "java_script_enabled": true
    },
    "statement_descriptor_name": "joseph",
    "statement_descriptor_suffix": "JS",
    "metadata": {
        "udf1": "value1",
        "new_customer": "true",
        "login_date": "2019-09-10T10:11:12Z"
    }
}'

Response:

{"payment_id":"pay_bZ0aXWR7c4XyoZPgBp1o","merchant_id":"merchant_1754943264","status":"succeeded","amount":100,"net_amount":100,"shipping_cost":null,"amount_capturable":0,"amount_received":100,"connector":"braintree","client_secret":"pay_bZ0aXWR7c4XyoZPgBp1o_secret_70pJCGdL6IsG554zfj7V","created":"2025-08-12T07:35:15.497Z","currency":"USD","customer_id":"StripeCustomer","customer":{"id":"StripeCustomer","name":"John Doe","email":"[email protected]","phone":"999999999","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":"wallet","payment_method_data":{"wallet":{"google_pay":{"last4":"1111","card_network":"VISA","type":"CARD"}},"billing":null},"payment_token":null,"shipping":{"address":{"city":"Musterhausen","country":"DE","line1":"Musterstr","line2":"CA","line3":"CA","zip":"94122","state":"California","first_name":"joseph","last_name":"Doe","origin_zip":null},"phone":{"number":"8056594427","country_code":"+91"},"email":null},"billing":{"address":{"city":"Musterhausen","country":"DE","line1":"1467","line2":"CA","line3":"CA","zip":"12345","state":"California","first_name":"Max","last_name":"Mustermann","origin_zip":null},"phone":{"number":"8056594427","country_code":"+91"},"email":"[email protected]"},"order_details":null,"email":"[email protected]","name":"John Doe","phone":"999999999","return_url":"https://google.com/","authentication_type":"three_ds","statement_descriptor_name":"joseph","statement_descriptor_suffix":"JS","next_action":null,"cancellation_reason":null,"error_code":null,"error_message":null,"unified_code":null,"unified_message":null,"payment_experience":null,"payment_method_type":"google_pay","connector_label":null,"business_country":null,"business_label":"default","business_sub_label":null,"allowed_payment_method_types":null,"ephemeral_key":{"customer_id":"StripeCustomer","created_at":1754984115,"expires":1754987715,"secret":"epk_4fd82246514e4294b8e656686e8dd50c"},"manual_retry_allowed":false,"connector_transaction_id":"dHJhbnNhY3Rpb25fZnpzaGdncGY","frm_message":null,"metadata":{"udf1":"value1","login_date":"2019-09-10T10:11:12Z","new_customer":"true"},"connector_metadata":null,"feature_metadata":{"redirect_response":null,"search_tags":null,"apple_pay_recurring_details":null,"gateway_system":"direct"},"reference_id":null,"payment_link":null,"profile_id":"pro_UF7x1VUr8LV9gu1lQwn1","surcharge_details":null,"attempt_count":1,"merchant_decision":null,"merchant_connector_id":"mca_HrBB5GxZaPbMIZm9sAkO","incremental_authorization_allowed":null,"authorization_count":null,"incremental_authorizations":null,"external_authentication_details":null,"external_3ds_authentication_attempted":false,"expires_on":"2025-08-12T07:50:15.497Z","fingerprint":null,"browser_info":{"language":"nl-NL","time_zone":0,"ip_address":"103.77.139.95","user_agent":"Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/70.0.3538.110 Safari/537.36","color_depth":24,"java_enabled":true,"screen_width":1536,"accept_header":"text/html,application/xhtml+xml,application/xml;q=0.9,image/webp,image/apng,/;q=0.8","screen_height":723,"java_script_enabled":true},"payment_channel":null,"payment_method_id":null,"network_transaction_id":null,"payment_method_status":null,"updated":"2025-08-12T07:35:17.108Z","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":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}
5. Apple pay
curl --location 'http://localhost:8080/payments' \
--header 'Content-Type: application/json' \
--header 'Accept: application/json' \
--header 'api-key: dev_LyW7U8k5lBfnRiPjF75igyRatN0xh1g7cYbUW4pJiuZnmlaVOzeY0mw4bREoiQxh' \
--data '
{
    "amount": 100,
    "currency": "USD",
    "confirm": true,
    "capture_method": "automatic",
    "customer_id": "StripeCustomer",
    "payment_method": "wallet",
    "payment_method_type": "apple_pay",
    "payment_method_data": {
        "wallet": {
            "apple_pay": {
                "payment_data": {
                    "application_primary_account_number": "4242424242424242",
                    "application_expiration_month": "12",
                    "application_expiration_year": "30",
                    "payment_data": {
                        "online_payment_cryptogram": "8d44a441-a82d-1286-47e0-df6acf6482a1"
                        
                    }
                },
                "payment_method": {
                    "display_name": "Visa 0121",
                    "network": "Visa",
                    "type": "debit"
                },
                "transaction_identifier": "a79ec26218bffc43fc9dd6e184d2843f74623a5a982ae69ac66e7f45d3b78bd5"
            }
        },
        "billing": null
    },
    "billing": {
        "address": {
            "first_name": "John",
            "last_name": "Doe",
            "line1": "Harrison Street",
            "city": "San Francisco",
            "state": "California",
            "zip": "94016",
            "country": "US"
        }
    }
}'

Response:

{"payment_id":"pay_OQVfaSax3HlpcptsZU9P","merchant_id":"merchant_1752600273","status":"succeeded","amount":100,"net_amount":100,"shipping_cost":null,"amount_capturable":0,"amount_received":100,"connector":"braintree","client_secret":"pay_OQVfaSax3HlpcptsZU9P_secret_ZlepECcFLxoUnkI75eYU","created":"2025-07-15T17:24:42.658Z","currency":"USD","customer_id":"StripeCustomer","customer":{"id":"StripeCustomer","name":null,"email":null,"phone":null,"phone_country_code":null},"description":null,"refunds":null,"disputes":null,"mandate_id":null,"mandate_data":null,"setup_future_usage":null,"off_session":null,"capture_on":null,"capture_method":"automatic","payment_method":"wallet","payment_method_data":{"wallet":{"apple_pay":{"last4":"0121","card_network":"Visa","type":"debit"}},"billing":null},"payment_token":null,"shipping":null,"billing":{"address":{"city":"San Francisco","country":"US","line1":"Harrison Street","line2":null,"line3":null,"zip":"94016","state":"California","first_name":"John","last_name":"Doe"},"phone":null,"email":null},"order_details":null,"email":null,"name":null,"phone":null,"return_url":null,"authentication_type":"no_three_ds","statement_descriptor_name":null,"statement_descriptor_suffix":null,"next_action":null,"cancellation_reason":null,"error_code":null,"error_message":null,"unified_code":null,"unified_message":null,"payment_experience":null,"payment_method_type":"apple_pay","connector_label":null,"business_country":null,"business_label":"default","business_sub_label":null,"allowed_payment_method_types":null,"ephemeral_key":{"customer_id":"StripeCustomer","created_at":1752600282,"expires":1752603882,"secret":"epk_6a07cf81f20d420ea7ac55e4a080c3e4"},"manual_retry_allowed":false,"connector_transaction_id":"dHJhbnNhY3Rpb25fMTI5NW16ZGU","frm_message":null,"metadata":null,"connector_metadata":null,"feature_metadata":null,"reference_id":null,"payment_link":null,"profile_id":"pro_8u6aGw4HuUDKamhgmjfZ","surcharge_details":null,"attempt_count":1,"merchant_decision":null,"merchant_connector_id":"mca_FVuIgKveXUPQx1YwVrzb","incremental_authorization_allowed":null,"authorization_count":null,"incremental_authorizations":null,"external_authentication_details":null,"external_3ds_authentication_attempted":false,"expires_on":"2025-07-15T17:39:42.657Z","fingerprint":null,"browser_info":null,"payment_method_id":null,"payment_method_status":null,"updated":"2025-07-15T17:24:45.020Z","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":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}

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

@swetasharma03 swetasharma03 self-assigned this Jul 23, 2025
@swetasharma03 swetasharma03 requested a review from a team as a code owner July 23, 2025 09:23
Copy link

semanticdiff-com bot commented Jul 23, 2025

Review changes with  SemanticDiff

Changed Files
File Status
  crates/hyperswitch_connectors/src/connectors/klarna.rs  81% smaller
  crates/router/src/types/transformers.rs  28% smaller
  crates/router/src/core/payments/transformers.rs  23% smaller
  crates/router/src/core/payments/flows/session_flow.rs  11% smaller
  crates/router/src/core/payments/operations/payment_session.rs  9% smaller
  crates/router/src/core/utils.rs  5% smaller
  crates/hyperswitch_connectors/src/connectors/braintree.rs  4% smaller
  crates/hyperswitch_connectors/src/connectors/braintree/transformers.rs  2% smaller
  crates/api_models/src/payments.rs  0% smaller
  crates/common_enums/src/enums.rs  0% smaller
  crates/hyperswitch_connectors/src/connectors/adyen.rs  0% smaller
  crates/hyperswitch_connectors/src/connectors/authorizedotnet.rs  0% smaller
  crates/hyperswitch_connectors/src/connectors/stripe/transformers.rs  0% smaller
  crates/hyperswitch_connectors/src/connectors/trustpay/transformers.rs  0% smaller
  crates/hyperswitch_connectors/src/utils.rs  0% smaller
  crates/hyperswitch_domain_models/src/router_data.rs  0% smaller
  crates/hyperswitch_domain_models/src/router_request_types.rs  0% smaller
  crates/hyperswitch_interfaces/src/api.rs  0% smaller
  crates/hyperswitch_interfaces/src/connector_integration_interface.rs Unsupported file format
  crates/hyperswitch_interfaces/src/conversion_impls.rs  0% smaller
  crates/kgraph_utils/src/mca.rs  0% smaller
  crates/router/src/configs/secrets_transformers.rs  0% smaller
  crates/router/src/configs/settings.rs  0% smaller
  crates/router/src/core/authentication/transformers.rs  0% smaller
  crates/router/src/core/fraud_check.rs  0% smaller
  crates/router/src/core/fraud_check/flows/checkout_flow.rs  0% smaller
  crates/router/src/core/fraud_check/flows/fulfillment_flow.rs  0% smaller
  crates/router/src/core/fraud_check/flows/record_return.rs  0% smaller
  crates/router/src/core/fraud_check/flows/sale_flow.rs  0% smaller
  crates/router/src/core/fraud_check/flows/transaction_flow.rs  0% smaller
  crates/router/src/core/mandate/utils.rs  0% smaller
  crates/router/src/core/payments.rs  0% smaller
  crates/router/src/core/payments/flows.rs  0% smaller
  crates/router/src/core/payments/flows/approve_flow.rs  0% smaller
  crates/router/src/core/payments/flows/authorize_flow.rs  0% smaller
  crates/router/src/core/payments/flows/cancel_flow.rs  0% smaller
  crates/router/src/core/payments/flows/cancel_post_capture_flow.rs  0% smaller
  crates/router/src/core/payments/flows/capture_flow.rs  0% smaller
  crates/router/src/core/payments/flows/complete_authorize_flow.rs  0% smaller
  crates/router/src/core/payments/flows/incremental_authorization_flow.rs  0% smaller
  crates/router/src/core/payments/flows/post_session_tokens_flow.rs  0% smaller
  crates/router/src/core/payments/flows/psync_flow.rs  0% smaller
  crates/router/src/core/payments/flows/reject_flow.rs  0% smaller
  crates/router/src/core/payments/flows/session_update_flow.rs  0% smaller
  crates/router/src/core/payments/flows/setup_mandate_flow.rs  0% smaller
  crates/router/src/core/payments/flows/update_metadata_flow.rs  0% smaller
  crates/router/src/core/payments/helpers.rs  0% smaller
  crates/router/src/core/relay/utils.rs  0% smaller
  crates/router/src/core/unified_authentication_service/utils.rs Unsupported file format
  crates/router/src/core/webhooks/utils.rs  0% smaller
  crates/router/src/types.rs  0% smaller
  crates/router/src/types/api/verify_connector.rs  0% smaller
  crates/router/tests/connectors/aci.rs  0% smaller
  crates/router/tests/connectors/utils.rs  0% smaller

@swetasharma03 swetasharma03 force-pushed the braintree-wallets branch 4 times, most recently from 0142ee7 to 8f49cb0 Compare July 23, 2025 09:32
@swetasharma03 swetasharma03 changed the title feat(connector): [AUTHORIZEDOTNET] Paypal, Googlepay, Applepay wallets added feat(connector): [BRAINTREE] Paypal, Googlepay, Applepay wallets added Jul 23, 2025
@swetasharma03 swetasharma03 force-pushed the braintree-wallets branch 2 times, most recently from cf97700 to a438026 Compare July 23, 2025 09:38
@swetasharma03 swetasharma03 requested review from a team as code owners July 28, 2025 16:05
@swetasharma03 swetasharma03 requested a review from a team as a code owner August 11, 2025 21:23
@swetasharma03 swetasharma03 force-pushed the braintree-wallets branch 9 times, most recently from c985579 to 718b836 Compare August 12, 2025 13:01
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant