feat(connector): Archipel connector
Flowbird Archipel connector implementation Closes #7899
Co-authored-by: Guillaume Bague [email protected]
@michal-czernecki @gbague please resolve the merge conflicts
@michal-czernecki @gbague please resolve the merge conflicts
@cookieg13 Done. Our changes rebased on yours. Conflicts resolved.
Please add a linked github issue to this PR. It is a required check https://github.com/juspay/hyperswitch/actions/runs/14619166648/job/41014420662?pr=7851
Please add a linked github issue to this PR. It is a required check https://github.com/juspay/hyperswitch/actions/runs/14619166648/job/41014420662?pr=7851
@cookieg13 Done - https://github.com/juspay/hyperswitch/issues/7899
@michal-czernecki @gbague Kindly add Cypress tests screenshot and request curl, response of all the flows (Authorization, Capture, Refund etc) in description Reference PR: https://github.com/juspay/hyperswitch/pull/5726
Type of Change
- [ ] Bugfix
- [x] New feature
- [ ] Enhancement
- [ ] Refactoring
- [ ] Dependency updates
- [ ] Documentation
- [ ] CI/CD
Description
Integrate Card and ApplePay payments for new connector ArchiPEL. Also used Netcetera as external 3DS authentication processor for 3DS payments
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?
Cypress test:
Test passes for
-
00004-NoThreeDSAutoCapture
-
00006-NoThreeDSManualCapture
-
00007-VoidPayment
-
00008-SyncPayment
-
00011-CreateSingleuseMandate
-
00012-CreateMultiuseMandate
Test cases failing for
- 00009-RefundPayment (we get an error on Archipel side due to async job and we try to solve it)
- 00014-SaveCardFlow (for off_session)
Following flows need to be tested for card payments for new connector ArchiPEL:
1. Authorize
{
"Request Body": "{\"amount\":6000,\"currency\":\"USD\",\"confirm\":true,\"capture_method\":\"automatic\",\"capture_on\":\"2022-09-10T10:11:12Z\",\"customer_id\":\"cus_SmyTJuHz7PlcgSu4mLIE\",\"email\":\"[email protected]\",\"name\":\"John Doe\",\"phone\":\"999999999\",\"phone_country_code\":\"+65\",\"description\":\"Its my first payment request\",\"authentication_type\":\"no_three_ds\",\"return_url\":\"https://example.com\",\"setup_future_usage\":\"on_session\",\"customer_acceptance\":null,\"payment_method\":\"card\",\"payment_method_type\":\"debit\",\"payment_method_data\":{\"card\":{\"card_number\":\"4242424242424242\",\"card_exp_month\":\"01\",\"card_exp_year\":\"50\",\"card_holder_name\":\"joseph Doe\",\"card_cvc\":\"123\"}},\"billing\":{\"address\":{\"line1\":\"1467\",\"line2\":\"Harrison Street\",\"line3\":\"Harrison Street\",\"city\":\"San Fransico\",\"state\":\"California\",\"zip\":\"94122\",\"country\":\"US\",\"first_name\":\"john\",\"last_name\":\"doe\"}},\"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\"}},\"statement_descriptor_name\":\"joseph\",\"statement_descriptor_suffix\":\"JS\",\"metadata\":{\"udf1\":\"value1\",\"new_customer\":\"true\",\"login_date\":\"2019-09-10T10:11:12Z\"},\"browser_info\":{\"ip_address\":\"129.0.0.1\",\"user_agent\":\"Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/120.0.0.0 Safari/537.36\",\"accept_header\":\"text/html,application/xhtml+xml,application/xml;q=0.9,image/webp,image/apng,*/*;q=0.8\",\"language\":\"en-US\",\"color_depth\":32,\"screen_height\":1117,\"screen_width\":1728,\"time_zone\":-330,\"java_enabled\":true,\"java_script_enabled\":true},\"profile_id\":\"pro_YY9dWdVzNaAPji1kyDRP\"}",
"Request Headers": {
"Connection": "keep-alive",
"Content-Type": "application/json",
"api-key": "dev_MXTjP4FRaXH0ktSveRgQvZ8gO8L5O3LuBhmbPaIMMem1IlfAbGQAuTLbBblAtPjj",
"user-agent": "Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/135.0.0.0 Safari/537.36",
"accept": "*/*",
"accept-encoding": "gzip, deflate",
"content-length": 1657
},
"Request URL": "http://localhost:8080/payments",
"Response Body": {
"payment_id": "pay_A8G4g6ydwlphOH3tWbvK",
"merchant_id": "cyMerchant_8b858ab7",
"status": "succeeded",
"amount": 6000,
"net_amount": 6000,
"shipping_cost": null,
"amount_capturable": 0,
"amount_received": 6000,
"connector": "archipel",
"client_secret": "pay_A8G4g6ydwlphOH3tWbvK_secret_SE52gbydbOqWBTY5HeQs",
"created": "2025-04-30T09:28:39.928Z",
"currency": "USD",
"customer_id": "cus_SmyTJuHz7PlcgSu4mLIE",
"customer": {
"id": "cus_SmyTJuHz7PlcgSu4mLIE",
"name": "John 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": "on_session",
"off_session": null,
"capture_on": null,
"capture_method": "automatic",
"payment_method": "card",
"payment_method_data": {
"card": {
"last4": "4242",
"card_type": null,
"card_network": null,
"card_issuer": null,
"card_issuing_country": null,
"card_isin": "424242",
"card_extended_bin": null,
"card_exp_month": "01",
"card_exp_year": "50",
"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": "California",
"first_name": "john",
"last_name": "doe"
},
"phone": null,
"email": null
},
"billing": {
"address": {
"city": "San Fransico",
"country": "US",
"line1": "1467",
"line2": "Harrison Street",
"line3": "Harrison Street",
"zip": "94122",
"state": "California",
"first_name": "john",
"last_name": "doe"
},
"phone": null,
"email": null
},
"order_details": null,
"email": "[email protected]",
"name": "John Doe",
"phone": "999999999",
"return_url": "https://example.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": "debit",
"connector_label": null,
"business_country": null,
"business_label": "default",
"business_sub_label": null,
"allowed_payment_method_types": null,
"ephemeral_key": {
"customer_id": "cus_SmyTJuHz7PlcgSu4mLIE",
"created_at": 1746005319,
"expires": 1746008919,
"secret": "epk_4b46ed4f594346f8ba4b0e3698eb1ccf"
},
"manual_retry_allowed": false,
"connector_transaction_id": "03Kkf90Sg8f0",
"frm_message": null,
"metadata": {
"udf1": "value1",
"login_date": "2019-09-10T10:11:12Z",
"new_customer": "true"
},
"connector_metadata": null,
"feature_metadata": null,
"reference_id": null,
"payment_link": null,
"profile_id": "pro_YY9dWdVzNaAPji1kyDRP",
"surcharge_details": null,
"attempt_count": 1,
"merchant_decision": null,
"merchant_connector_id": "mca_c5GLVWKw8LVUR30GnBP8",
"incremental_authorization_allowed": false,
"authorization_count": null,
"incremental_authorizations": null,
"external_authentication_details": null,
"external_3ds_authentication_attempted": false,
"expires_on": "2025-04-30T09:43:39.928Z",
"fingerprint": null,
"browser_info": {
"language": "en-US",
"time_zone": -330,
"ip_address": "129.0.0.1",
"user_agent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/120.0.0.0 Safari/537.36",
"color_depth": 32,
"java_enabled": true,
"screen_width": 1728,
"accept_header": "text/html,application/xhtml+xml,application/xml;q=0.9,image/webp,image/apng,*/*;q=0.8",
"screen_height": 1117,
"java_script_enabled": true
},
"payment_method_id": null,
"payment_method_status": null,
"updated": "2025-04-30T09:28:40.646Z",
"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
},
"Response Headers": {
"content-length": "3773",
"content-type": "application/json",
"x-hs-latency": "689",
"via": "HyperSwitch",
"connector_http_status_code": "200",
"strict-transport-security": "max-age=31536000",
"x-request-id": "01968606-e0de-7a61-aac3-8c5e95c75cb3",
"access-control-expose-headers": "via, connector_http_status_code, x-request-id, x-hs-latency, content-type, strict-transport-security",
"vary": "Origin, Access-Control-Request-Method, Access-Control-Request-Headers",
"date": "Wed, 30 Apr 2025 09:28:40 GMT"
},
"Response Status": 200
}
2. Capture
{
"Request Body": "{\"amount_to_capture\":6000,\"statement_descriptor_name\":\"Joseph\",\"statement_descriptor_suffix\":\"JS\",\"profile_id\":\"pro_YY9dWdVzNaAPji1kyDRP\"}",
"Request Headers": {
"Connection": "keep-alive",
"Content-Type": "application/json",
"api-key": "dev_MXTjP4FRaXH0ktSveRgQvZ8gO8L5O3LuBhmbPaIMMem1IlfAbGQAuTLbBblAtPjj",
"user-agent": "Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/135.0.0.0 Safari/537.36",
"accept": "*/*",
"accept-encoding": "gzip, deflate",
"content-length": 138
},
"Request URL": "http://localhost:8080/payments/pay_e9SS5FZYsJSYucSfrG5B/capture",
"Response Body": {
"payment_id": "pay_e9SS5FZYsJSYucSfrG5B",
"merchant_id": "cyMerchant_8b858ab7",
"status": "succeeded",
"amount": 6000,
"net_amount": 6000,
"shipping_cost": null,
"amount_capturable": 0,
"amount_received": 6000,
"connector": "archipel",
"client_secret": "pay_e9SS5FZYsJSYucSfrG5B_secret_3dJmgWoIIPfjDGis8eyE",
"created": "2025-04-30T09:26:27.386Z",
"currency": "USD",
"customer_id": "cus_SmyTJuHz7PlcgSu4mLIE",
"customer": {
"id": "cus_SmyTJuHz7PlcgSu4mLIE",
"name": "John Doe",
"email": "[email protected]",
"phone": "999999999",
"phone_country_code": "+65"
},
"description": "Joseph First Crypto",
"refunds": null,
"disputes": null,
"mandate_id": null,
"mandate_data": null,
"setup_future_usage": "on_session",
"off_session": null,
"capture_on": null,
"capture_method": "manual",
"payment_method": "card",
"payment_method_data": {
"card": {
"last4": "4242",
"card_type": null,
"card_network": null,
"card_issuer": null,
"card_issuing_country": null,
"card_isin": "424242",
"card_extended_bin": null,
"card_exp_month": "01",
"card_exp_year": "50",
"card_holder_name": "joseph Doe",
"payment_checks": null,
"authentication_data": null
},
"billing": null
},
"payment_token": null,
"shipping": null,
"billing": {
"address": {
"city": "New York",
"country": "US",
"line1": "123",
"line2": "Main Street",
"line3": "Apt 4B",
"zip": "10001",
"state": "New York",
"first_name": "john",
"last_name": "doe"
},
"phone": null,
"email": null
},
"order_details": null,
"email": "[email protected]",
"name": "John Doe",
"phone": "999999999",
"return_url": "https://example.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,
"payment_experience": null,
"payment_method_type": null,
"connector_label": null,
"business_country": null,
"business_label": "default",
"business_sub_label": null,
"allowed_payment_method_types": null,
"ephemeral_key": null,
"manual_retry_allowed": false,
"connector_transaction_id": "03KkeWKT3yK0",
"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": "applepay"
},
"braintree": null,
"adyen": null
},
"feature_metadata": null,
"reference_id": null,
"payment_link": null,
"profile_id": "pro_YY9dWdVzNaAPji1kyDRP",
"surcharge_details": null,
"attempt_count": 1,
"merchant_decision": null,
"merchant_connector_id": "mca_c5GLVWKw8LVUR30GnBP8",
"incremental_authorization_allowed": true,
"authorization_count": null,
"incremental_authorizations": null,
"external_authentication_details": null,
"external_3ds_authentication_attempted": false,
"expires_on": "2025-04-30T09:41:27.386Z",
"fingerprint": null,
"browser_info": {
"os_type": null,
"language": "en-US",
"time_zone": -330,
"ip_address": "127.0.0.1",
"os_version": null,
"user_agent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/120.0.0.0 Safari/537.36",
"color_depth": 32,
"device_model": null,
"java_enabled": true,
"screen_width": 1728,
"accept_header": "text/html,application/xhtml+xml,application/xml;q=0.9,image/webp,image/apng,*/*;q=0.8",
"screen_height": 1117,
"accept_language": "en",
"java_script_enabled": true
},
"payment_method_id": null,
"payment_method_status": null,
"updated": "2025-04-30T09:26:29.505Z",
"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
},
"Response Headers": {
"content-length": "3596",
"x-hs-latency": "441",
"content-type": "application/json",
"x-request-id": "01968604-e1a6-71f3-99a3-46a1c910c353",
"strict-transport-security": "max-age=31536000",
"access-control-expose-headers": "x-request-id, x-hs-latency, via, connector_http_status_code, content-type, strict-transport-security",
"vary": "Origin, Access-Control-Request-Method, Access-Control-Request-Headers",
"via": "HyperSwitch",
"connector_http_status_code": "200",
"date": "Wed, 30 Apr 2025 09:26:29 GMT"
},
"Response Status": 200
}
3. PSync
{
"Request Body": null,
"Request Headers": {
"Connection": "keep-alive",
"Content-Type": "application/json",
"api-key": "dev_MXTjP4FRaXH0ktSveRgQvZ8gO8L5O3LuBhmbPaIMMem1IlfAbGQAuTLbBblAtPjj",
"user-agent": "Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/135.0.0.0 Safari/537.36",
"accept": "*/*",
"accept-encoding": "gzip, deflate"
},
"Request URL": "http://localhost:8080/payments/pay_A8G4g6ydwlphOH3tWbvK?force_sync=true&expand_attempts=true",
"Response Body": "{\"payment_id\":\"pay_A8G4g6ydwlphOH3tWbvK\",\"merchant_id\":\"cyMerchant_8b858ab7\",\"status\":\"succeeded\",\"amount\":6000,\"net_amount\":6000,\"shipping_cost\":null,\"amount_capturable\":0,\"amount_received\":6000,\"connector\":\"archipel\",\"client_secret\":\"pay_A8G4g6ydwlphOH3tWbvK_secret_SE52gbydbOqWBTY5HeQs\",\"created\":\"2025-04-30T09:28:39.928Z\",\"currency\":\"USD\",\"customer_id\":\"cus_SmyTJuHz7PlcgSu4mLIE\",\"customer\":{\"id\":\"cus_SmyTJuHz7PlcgSu4mLIE\",\"name\":\"John Doe\",\"email\":\"[email protected]\",\"phone\":\"999999999\",\"phone_country_code\":\"+65\"},\"description\":\"Its my first payment request\",\"refunds\":null,\"disputes\":null,\"attempts\":[{\"attempt_id\":\"pay_A8G4g6ydwlphOH3tWbvK_1\",\"status\":\"charged\",\"amount\":6000,\"order_tax_amount\":null,\"currency\":\"USD\",\"connector\":\"archipel\",\"error_message\":null,\"payment_method\":\"card\",\"connector_transaction_id\":\"03Kkf90Sg8f0\",\"capture_method\":\"automatic\",\"authentication_type\":\"no_three_ds\",\"created_at\":\"2025-04-30T09:28:39.928Z\",\"modified_at\":\"2025-04-30T09:28:40.646Z\",\"cancellation_reason\":null,\"mandate_id\":null,\"error_code\":null,\"payment_token\":null,\"connector_metadata\":{\"responseCode\":null,\"transactionId\":\"ee07e65b-8c7b-4bd5-aa9c-15e844ee12d7\",\"transactionDate\":\"2025-04-30T09:28:39.973Z\",\"authorizationCode\":null,\"issuerTransactionId\":null,\"financialNetworkCode\":null,\"paymentAccountReference\":null},\"payment_experience\":null,\"payment_method_type\":\"debit\",\"reference_id\":null,\"unified_code\":null,\"unified_message\":null,\"client_source\":null,\"client_version\":null}],\"mandate_id\":null,\"mandate_data\":null,\"setup_future_usage\":\"on_session\",\"off_session\":null,\"capture_on\":null,\"capture_method\":\"automatic\",\"payment_method\":\"card\",\"payment_method_data\":{\"card\":{\"last4\":\"4242\",\"card_type\":null,\"card_network\":null,\"card_issuer\":null,\"card_issuing_country\":null,\"card_isin\":\"424242\",\"card_extended_bin\":null,\"card_exp_month\":\"01\",\"card_exp_year\":\"50\",\"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\":\"California\",\"first_name\":\"john\",\"last_name\":\"doe\"},\"phone\":null,\"email\":null},\"billing\":{\"address\":{\"city\":\"San Fransico\",\"country\":\"US\",\"line1\":\"1467\",\"line2\":\"Harrison Street\",\"line3\":\"Harrison Street\",\"zip\":\"94122\",\"state\":\"California\",\"first_name\":\"john\",\"last_name\":\"doe\"},\"phone\":null,\"email\":null},\"order_details\":null,\"email\":\"[email protected]\",\"name\":\"John Doe\",\"phone\":\"999999999\",\"return_url\":\"https://example.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\":\"debit\",\"connector_label\":null,\"business_country\":null,\"business_label\":\"default\",\"business_sub_label\":null,\"allowed_payment_method_types\":null,\"ephemeral_key\":null,\"manual_retry_allowed\":false,\"connector_transaction_id\":\"03Kkf90Sg8f0\",\"frm_message\":null,\"metadata\":{\"udf1\":\"value1\",\"login_date\":\"2019-09-10T10:11:12Z\",\"new_customer\":\"true\"},\"connector_metadata\":null,\"feature_metadata\":null,\"reference_id\":null,\"payment_link\":null,\"profile_id\":\"pro_YY9dWdVzNaAPji1kyDRP\",\"surcharge_details\":null,\"attempt_count\":1,\"merchant_decision\":null,\"merchant_connector_id\":\"mca_c5GLVWKw8LVUR30GnBP8\",\"incremental_authorization_allowed\":false,\"authorization_count\":null,\"incremental_authorizations\":null,\"external_authentication_details\":null,\"external_3ds_authentication_attempted\":false,\"expires_on\":\"2025-04-30T09:43:39.928Z\",\"fingerprint\":null,\"browser_info\":{\"language\":\"en-US\",\"time_zone\":-330,\"ip_address\":\"129.0.0.1\",\"user_agent\":\"Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/120.0.0.0 Safari/537.36\",\"color_depth\":32,\"java_enabled\":true,\"screen_width\":1728,\"accept_header\":\"text/html,application/xhtml+xml,application/xml;q=0.9,image/webp,image/apng,*/*;q=0.8\",\"screen_height\":1117,\"java_script_enabled\":true},\"payment_method_id\":null,\"payment_method_status\":null,\"updated\":\"2025-04-30T09:28:40.646Z\",\"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}",
"Response Headers": {
"content-length": "4529",
"content-type": "application/json",
"via": "HyperSwitch",
"strict-transport-security": "max-age=31536000",
"x-request-id": "01968606-e425-7c01-856d-6b56837e0ae1",
"access-control-expose-headers": "strict-transport-security, via, content-type, x-request-id",
"vary": "Origin, Access-Control-Request-Method, Access-Control-Request-Headers",
"date": "Wed, 30 Apr 2025 09:28:40 GMT"
},
"Response Status": 200
}
4. Refund
[!WARNING] There is currently an error for Refunds with ArchiPEL connector
{
"Request Body": "{\"payment_id\":\"pay_rBKKMBOiJhg9XkFAoap6\",\"amount\":100,\"reason\":\"FRAUD\",\"refund_type\":\"instant\",\"metadata\":{\"udf1\":\"value1\",\"new_customer\":\"true\",\"login_date\":\"2019-09-10T10:11:12Z\"},\"payment_method\":\"card\",\"payment_method_data\":{\"card\":{\"card_number\":\"4242424242424242\",\"card_exp_month\":\"01\",\"card_exp_year\":\"50\",\"card_holder_name\":\"joseph Doe\",\"card_cvc\":\"123\"}},\"currency\":\"USD\",\"customer_acceptance\":null}",
"Request Headers": {
"Connection": "keep-alive",
"Content-Type": "application/json",
"api-key": "dev_MXTjP4FRaXH0ktSveRgQvZ8gO8L5O3LuBhmbPaIMMem1IlfAbGQAuTLbBblAtPjj",
"user-agent": "Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/135.0.0.0 Safari/537.36",
"accept": "*/*",
"accept-encoding": "gzip, deflate",
"content-length": 408
},
"Request URL": "http://localhost:8080/refunds",
"Response Body": {
"error": {
"error_type": "invalid_request",
"message": "Json deserialize error: unknown field `payment_method`, expected one of `payment_id`, `refund_id`, `merchant_id`, `amount`, `reason`, `refund_type`, `metadata`, `merchant_connector_details`, `split_refunds` at line 1 column 198",
"code": "IR_06"
}
},
"Response Headers": {
"content-length": "297",
"access-control-expose-headers": "content-type, x-request-id, via, strict-transport-security",
"content-type": "application/json",
"strict-transport-security": "max-age=31536000",
"via": "HyperSwitch",
"x-request-id": "019685fd-2daa-7483-9b85-23cd559b2eb0",
"vary": "Origin, Access-Control-Request-Method, Access-Control-Request-Headers",
"date": "Wed, 30 Apr 2025 09:18:04 GMT"
},
"Response Status": 400
}
5. RSync
[!WARNING] There is currently an error for Refunds with ArchiPEL connector
{}
6. VoidPayment
{
"Request Body": "{\"cancellation_reason\":\"requested_by_customer\",\"profile_id\":\"pro_YY9dWdVzNaAPji1kyDRP\"}",
"Request Headers": {
"Connection": "keep-alive",
"Content-Type": "application/json",
"api-key": "dev_MXTjP4FRaXH0ktSveRgQvZ8gO8L5O3LuBhmbPaIMMem1IlfAbGQAuTLbBblAtPjj",
"user-agent": "Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/135.0.0.0 Safari/537.36",
"accept": "*/*",
"accept-encoding": "gzip, deflate",
"content-length": 87
},
"Request URL": "http://localhost:8080/payments/pay_V72fnWe4sJsrCuOs2vpY/cancel",
"Response Body": {
"payment_id": "pay_V72fnWe4sJsrCuOs2vpY",
"merchant_id": "cyMerchant_8b858ab7",
"status": "cancelled",
"amount": 6000,
"net_amount": 6000,
"shipping_cost": null,
"amount_capturable": 0,
"amount_received": null,
"connector": "archipel",
"client_secret": "pay_V72fnWe4sJsrCuOs2vpY_secret_8V32msqMaQCCJJrk6ygl",
"created": "2025-04-30T09:15:35.450Z",
"currency": "USD",
"customer_id": "cus_SmyTJuHz7PlcgSu4mLIE",
"customer": {
"id": "cus_SmyTJuHz7PlcgSu4mLIE",
"name": "John Doe",
"email": "[email protected]",
"phone": "999999999",
"phone_country_code": "+65"
},
"description": "Joseph First Crypto",
"refunds": null,
"disputes": null,
"mandate_id": null,
"mandate_data": null,
"setup_future_usage": "on_session",
"off_session": null,
"capture_on": null,
"capture_method": "manual",
"payment_method": "card",
"payment_method_data": {
"card": {
"last4": "4242",
"card_type": null,
"card_network": null,
"card_issuer": null,
"card_issuing_country": null,
"card_isin": "424242",
"card_extended_bin": null,
"card_exp_month": "01",
"card_exp_year": "50",
"card_holder_name": "joseph Doe",
"payment_checks": null,
"authentication_data": null
},
"billing": null
},
"payment_token": null,
"shipping": null,
"billing": {
"address": {
"city": "New York",
"country": "US",
"line1": "123",
"line2": "Main Street",
"line3": "Apt 4B",
"zip": "10001",
"state": "New York",
"first_name": "john",
"last_name": "doe"
},
"phone": null,
"email": null
},
"order_details": null,
"email": "[email protected]",
"name": "John Doe",
"phone": "999999999",
"return_url": "https://example.com/",
"authentication_type": "no_three_ds",
"statement_descriptor_name": null,
"statement_descriptor_suffix": null,
"next_action": null,
"cancellation_reason": "requested_by_customer",
"error_code": null,
"error_message": null,
"unified_code": null,
"unified_message": null,
"payment_experience": null,
"payment_method_type": null,
"connector_label": null,
"business_country": null,
"business_label": "default",
"business_sub_label": null,
"allowed_payment_method_types": null,
"ephemeral_key": null,
"manual_retry_allowed": false,
"connector_transaction_id": "03KkbRHrKIC0",
"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": "applepay"
},
"braintree": null,
"adyen": null
},
"feature_metadata": null,
"reference_id": null,
"payment_link": null,
"profile_id": "pro_YY9dWdVzNaAPji1kyDRP",
"surcharge_details": null,
"attempt_count": 1,
"merchant_decision": null,
"merchant_connector_id": "mca_c5GLVWKw8LVUR30GnBP8",
"incremental_authorization_allowed": true,
"authorization_count": null,
"incremental_authorizations": null,
"external_authentication_details": null,
"external_3ds_authentication_attempted": false,
"expires_on": "2025-04-30T09:30:35.450Z",
"fingerprint": null,
"browser_info": {
"os_type": null,
"language": "en-US",
"time_zone": -330,
"ip_address": "127.0.0.1",
"os_version": null,
"user_agent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/120.0.0.0 Safari/537.36",
"color_depth": 32,
"device_model": null,
"java_enabled": true,
"screen_width": 1728,
"accept_header": "text/html,application/xhtml+xml,application/xml;q=0.9,image/webp,image/apng,*/*;q=0.8",
"screen_height": 1117,
"accept_language": "en",
"java_script_enabled": true
},
"payment_method_id": null,
"payment_method_status": null,
"updated": "2025-04-30T09:15:36.928Z",
"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
},
"Response Headers": {
"content-length": "3615",
"vary": "Origin, Access-Control-Request-Method, Access-Control-Request-Headers",
"connector_http_status_code": "200",
"via": "HyperSwitch",
"strict-transport-security": "max-age=31536000",
"x-hs-latency": "428",
"access-control-expose-headers": "via, connector_http_status_code, x-request-id, x-hs-latency, strict-transport-security, content-type",
"x-request-id": "019685fa-ec97-7f03-8fc3-29fa010c3f17",
"content-type": "application/json",
"date": "Wed, 30 Apr 2025 09:15:36 GMT"
},
"Response Status": 200
}
7. ZeroAuthMandate
{
"Request Body": "{\"amount\":0,\"currency\":\"USD\",\"confirm\":true,\"capture_method\":\"automatic\",\"capture_on\":\"2022-09-10T10:11:12Z\",\"customer_id\":\"cus_SmyTJuHz7PlcgSu4mLIE\",\"email\":\"[email protected]\",\"name\":\"John Doe\",\"phone\":\"999999999\",\"phone_country_code\":\"+65\",\"description\":\"Its my first payment request\",\"authentication_type\":\"no_three_ds\",\"return_url\":\"https://example.com\",\"payment_method\":\"card\",\"payment_method_type\":\"debit\",\"payment_method_data\":{\"card\":{\"card_number\":\"4242424242424242\",\"card_exp_month\":\"01\",\"card_exp_year\":\"50\",\"card_holder_name\":\"joseph Doe\",\"card_cvc\":\"123\"}},\"setup_future_usage\":\"off_session\",\"mandate_data\":{\"customer_acceptance\":{\"acceptance_type\":\"offline\",\"accepted_at\":\"1963-05-03T04:07:52.723Z\",\"online\":{\"ip_address\":\"127.0.0.1\",\"user_agent\":\"amet irure esse\"}},\"mandate_type\":{\"single_use\":{\"amount\":8000,\"currency\":\"USD\"}}},\"payment_type\":\"setup_mandate\",\"billing\":{\"address\":{\"line1\":\"1467\",\"line2\":\"Harrison Street\",\"line3\":\"Harrison Street\",\"city\":\"San Fransico\",\"state\":\"California\",\"zip\":\"94122\",\"country\":\"US\",\"first_name\":\"john\",\"last_name\":\"Doe\"}},\"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\"}},\"statement_descriptor_name\":\"joseph\",\"statement_descriptor_suffix\":\"JS\",\"metadata\":{\"udf1\":\"value1\",\"new_customer\":\"true\",\"login_date\":\"2019-09-10T10:11:12Z\"},\"browser_info\":{\"ip_address\":\"129.0.0.1\",\"user_agent\":\"Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/120.0.0.0 Safari/537.36\",\"accept_header\":\"text/html,application/xhtml+xml,application/xml;q=0.9,image/webp,image/apng,*/*;q=0.8\",\"language\":\"en-US\",\"color_depth\":32,\"screen_height\":1117,\"screen_width\":1728,\"time_zone\":-330,\"java_enabled\":true,\"java_script_enabled\":true},\"profile_id\":\"pro_YY9dWdVzNaAPji1kyDRP\"}",
"Request Headers": {
"Connection": "keep-alive",
"Content-Type": "application/json",
"api-key": "dev_MXTjP4FRaXH0ktSveRgQvZ8gO8L5O3LuBhmbPaIMMem1IlfAbGQAuTLbBblAtPjj",
"user-agent": "Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/135.0.0.0 Safari/537.36",
"accept": "*/*",
"accept-encoding": "gzip, deflate",
"content-length": 1899
},
"Request URL": "http://localhost:8080/payments",
"Response Body": {
"payment_id": "pay_HoeVKovbpAgt2NgYKtgR",
"merchant_id": "cyMerchant_8b858ab7",
"status": "succeeded",
"amount": 0,
"net_amount": 0,
"shipping_cost": null,
"amount_capturable": 0,
"amount_received": null,
"connector": "archipel",
"client_secret": "pay_HoeVKovbpAgt2NgYKtgR_secret_1IEMIPz8fIo9vSXDkfE2",
"created": "2025-04-30T09:09:00.660Z",
"currency": "USD",
"customer_id": "cus_SmyTJuHz7PlcgSu4mLIE",
"customer": {
"id": "cus_SmyTJuHz7PlcgSu4mLIE",
"name": "John Doe",
"email": "[email protected]",
"phone": "999999999",
"phone_country_code": "+65"
},
"description": "Its my first payment request",
"refunds": null,
"disputes": null,
"mandate_id": "man_dq2doAy93LoMo6n49ToD",
"mandate_data": {
"update_mandate_id": null,
"customer_acceptance": {
"acceptance_type": "offline",
"accepted_at": "1963-05-03T04:07:52.723Z",
"online": {
"ip_address": "127.0.0.1",
"user_agent": "amet irure esse"
}
},
"mandate_type": {
"single_use": {
"amount": 8000,
"currency": "USD",
"start_date": null,
"end_date": null,
"metadata": 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": "50",
"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": "California",
"first_name": "john",
"last_name": "Doe"
},
"phone": null,
"email": null
},
"billing": {
"address": {
"city": "San Fransico",
"country": "US",
"line1": "1467",
"line2": "Harrison Street",
"line3": "Harrison Street",
"zip": "94122",
"state": "California",
"first_name": "john",
"last_name": "Doe"
},
"phone": null,
"email": null
},
"order_details": null,
"email": "[email protected]",
"name": "John Doe",
"phone": "999999999",
"return_url": "https://example.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": "debit",
"connector_label": null,
"business_country": null,
"business_label": "default",
"business_sub_label": null,
"allowed_payment_method_types": null,
"ephemeral_key": {
"customer_id": "cus_SmyTJuHz7PlcgSu4mLIE",
"created_at": 1746004140,
"expires": 1746007740,
"secret": "epk_be6262f74037492cbaa40c8348d8a7d4"
},
"manual_retry_allowed": false,
"connector_transaction_id": "03KkZZY3q3E0",
"frm_message": null,
"metadata": {
"udf1": "value1",
"login_date": "2019-09-10T10:11:12Z",
"new_customer": "true"
},
"connector_metadata": null,
"feature_metadata": null,
"reference_id": "32683156-3cfb-4bba-8083-92adea327bac",
"payment_link": null,
"profile_id": "pro_YY9dWdVzNaAPji1kyDRP",
"surcharge_details": null,
"attempt_count": 1,
"merchant_decision": null,
"merchant_connector_id": "mca_c5GLVWKw8LVUR30GnBP8",
"incremental_authorization_allowed": false,
"authorization_count": null,
"incremental_authorizations": null,
"external_authentication_details": null,
"external_3ds_authentication_attempted": false,
"expires_on": "2025-04-30T09:24:00.660Z",
"fingerprint": null,
"browser_info": {
"language": "en-US",
"time_zone": -330,
"ip_address": "129.0.0.1",
"user_agent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/120.0.0.0 Safari/537.36",
"color_depth": 32,
"java_enabled": true,
"screen_width": 1728,
"accept_header": "text/html,application/xhtml+xml,application/xml;q=0.9,image/webp,image/apng,*/*;q=0.8",
"screen_height": 1117,
"java_script_enabled": true
},
"payment_method_id": "pm_VrBH0d10nBRjl71z9ZGz",
"payment_method_status": "active",
"updated": "2025-04-30T09:09:01.609Z",
"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
},
"Response Headers": {
"content-length": "4144",
"content-type": "application/json",
"x-hs-latency": "900",
"via": "HyperSwitch",
"connector_http_status_code": "200",
"strict-transport-security": "max-age=31536000",
"x-request-id": "019685f4-e256-70c0-bc6e-29849471540b",
"access-control-expose-headers": "connector_http_status_code, via, content-type, x-hs-latency, strict-transport-security, x-request-id",
"vary": "Origin, Access-Control-Request-Method, Access-Control-Request-Headers",
"date": "Wed, 30 Apr 2025 09:09:01 GMT"
},
"Response Status": 200
}
Checklist
- [ ] I formatted the code
cargo +nightly fmt --all - [X] I addressed lints thrown by
cargo clippy - [X] I reviewed the submitted code
- [X] I added unit tests for my changes where possible
@gbague can you please address these 3 issues? These 3 are also required checks for merge which are failing.
- Formatting issues
https://github.com/juspay/hyperswitch/actions/runs/14884539548/job/41855899744?pr=7851
to fix the formatting issues, please run
cargo +nightly fmt --alland commit the changes - Clippy errors
https://github.com/juspay/hyperswitch/actions/runs/14884539548/job/41855899769?pr=7851
to fix the clippy errors, please run
just clippyto fix the issues - Clippy v2 errors
https://github.com/juspay/hyperswitch/actions/runs/14884539548/job/41855899742?pr=7851
to fix the clippy errors, please run
just clippy_v2to fix the issues
The rest of the PR looks good to me 👍
@gbague Can you please run the test cases in headless mode ?
@likhinbopanna Please found the test cases result in headless mode
And generated screenshots screenshots.zip