Skip to content

Conversation

AkshayaFoiger
Copy link
Contributor

@AkshayaFoiger AkshayaFoiger commented Mar 21, 2025

Type of Change

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

Description

  1. Redsys Psync and Rsync implementation.
    API type: SOAP XML API

Note: Connector doesn't support Psync call, when the next action is threeds_invoke (just after the preprocessing call). If triggeredRedsys will throw an error with error_code: xml0024.

  1. Status mapping change
    a) "9999" is mapped to Authentication pending as this status specifies - "Operation that has been redirected to the issuer to authenticate" and "9998" maps to failed status

How did you test it?

Cannot be tested as processing status cannot be stimulated during sandbox testing

Local Testing (manually mark the payment as pending and do a Psync)
curl --location 'http://localhost:8080/payments' \
--header 'Content-Type: application/json' \
--header 'Accept: application/json' \
--header 'api-key: dev_S8QiRuQPjHGG1szVbgNxJVhTwTRF9ydj9APuvTeXCsp79NmRGNctIyPsvMAZL3Hg' \
--data-raw '{
    "amount": 10,
    "currency": "EUR",
    "return_url": "https://hyperswitch.io",
    "confirm": true,
    "customer_acceptance": null,
    "customer_id" :"asbh",
    "capture_method": "automatic",
    "authentication_type": "three_ds",
    "billing": {
        "address": {
            "line1": "1467",
            "line2": "Harrison Street",
            "line3": "Harrison Street",
            "city": "San Fransico",
            "state": "Ceuta",
            "zip": "94122",
            "country": "ES",
            "first_name": "joseph",
            "last_name": "Doe"
        },
        "email": "[email protected]",
        "phone": {
            "number": "9123456789",
            "country_code": "+91"
        }
    },
    "email": "[email protected]",
    "browser_info": {
        "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,
        "ip_address": "127.0.0.1"
    },
    
    "payment_method": "card",
    
    "payment_method_data": {
        "card": {
            "card_number": "4548814479727229",
            "card_exp_month": "12",
            "card_exp_year": "49",
            "card_holder_name": "Joseph",
            "card_cvc": "123"
        }
    },
    "setup_future_usage": "on_session",
    "shipping": {
        "address": {
            "line1": "1467",
            "line2": "Harrison Street",
            "line3": "Harrison Street",
            "city": "San Fransico",
            "state": "Ceuta",
            "zip": "94122",
            "country": "ES",
            "first_name": "joseph",
            "last_name": "Doe"
        },
        "email": "[email protected]",
        "phone": {
            "number": "9123456789",
            "country_code": "+91"
        }
    }
}'

Response

{"payment_id":"pay_sJAE201oybS9Nom6njE0","merchant_id":"postman_merchant_GHAction_20dc3fc4-9c75-4224-9113-f1a66dc1d515","status":"processing","amount":10,"net_amount":10,"shipping_cost":null,"amount_capturable":0,"amount_received":null,"connector":"redsys","client_secret":"pay_sJAE201oybS9Nom6njE0_secret_1Krj7K16Sbb8Jys68BQn","created":"2025-03-21T06:29:43.144Z","currency":"EUR","customer_id":"asbh","customer":{"id":"asbh","name":null,"email":"[email protected]","phone":null,"phone_country_code":null},"description":null,"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":"7229","card_type":null,"card_network":null,"card_issuer":null,"card_issuing_country":null,"card_isin":"454881","card_extended_bin":null,"card_exp_month":"12","card_exp_year":"49","card_holder_name":"Joseph","payment_checks":null,"authentication_data":null},"billing":null},"payment_token":"token_PGJePKDPhz6Q0RyBeRap","shipping":{"address":{"city":"San Fransico","country":"ES","line1":"1467","line2":"Harrison Street","line3":"Harrison Street","zip":"94122","state":"Ceuta","first_name":"joseph","last_name":"Doe"},"phone":{"number":"9123456789","country_code":"+91"},"email":"[email protected]"},"billing":{"address":{"city":"San Fransico","country":"ES","line1":"1467","line2":"Harrison Street","line3":"Harrison Street","zip":"94122","state":"Ceuta","first_name":"joseph","last_name":"Doe"},"phone":{"number":"9123456789","country_code":"+91"},"email":"[email protected]"},"order_details":null,"email":"[email protected]","name":null,"phone":null,"return_url":"https://hyperswitch.io/","authentication_type":"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":{"customer_id":"asbh","created_at":1742538583,"expires":1742542183,"secret":"epk_ab1283dd0d4042c88994d81e0163ea30"},"manual_retry_allowed":false,"connector_transaction_id":"206678482225","frm_message":null,"metadata":null,"connector_metadata":null,"feature_metadata":null,"reference_id":"206678482225","payment_link":null,"profile_id":"pro_501tEJX8ANb93eYoVAeO","surcharge_details":null,"attempt_count":1,"merchant_decision":null,"merchant_connector_id":"mca_TUNS4WRo8qUaNApH0dtb","incremental_authorization_allowed":null,"authorization_count":null,"incremental_authorizations":null,"external_authentication_details":null,"external_3ds_authentication_attempted":false,"expires_on":"2025-03-21T06:44:43.144Z","fingerprint":null,"browser_info":{"language":"en-US","time_zone":-330,"ip_address":"127.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-03-21T06:29:48.812Z","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","issuer_error_code":null,"issuer_error_message":null}

Psync


curl --location 'http://localhost:8080/payments/pay_sJAE201oybS9Nom6njE0?force_sync=true' \
--header 'Accept: application/json' \
--header 'api-key: dev_S8QiRuQPjHGG1szVbgNxJVhTwTRF9ydj9APuvTeXCsp79NmRGNctIyPsvMAZL3Hg'

Response

{"payment_id":"pay_sJAE201oybS9Nom6njE0","merchant_id":"postman_merchant_GHAction_20dc3fc4-9c75-4224-9113-f1a66dc1d515","status":"succeeded","amount":10,"net_amount":10,"shipping_cost":null,"amount_capturable":0,"amount_received":10,"connector":"redsys","client_secret":"pay_sJAE201oybS9Nom6njE0_secret_1Krj7K16Sbb8Jys68BQn","created":"2025-03-21T06:29:43.144Z","currency":"EUR","customer_id":"asbh","customer":{"id":"asbh","name":null,"email":"[email protected]","phone":null,"phone_country_code":null},"description":null,"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":"7229","card_type":null,"card_network":null,"card_issuer":null,"card_issuing_country":null,"card_isin":"454881","card_extended_bin":null,"card_exp_month":"12","card_exp_year":"49","card_holder_name":"Joseph","payment_checks":null,"authentication_data":null},"billing":null},"payment_token":"token_PGJePKDPhz6Q0RyBeRap","shipping":{"address":{"city":"San Fransico","country":"ES","line1":"1467","line2":"Harrison Street","line3":"Harrison Street","zip":"94122","state":"Ceuta","first_name":"joseph","last_name":"Doe"},"phone":{"number":"9123456789","country_code":"+91"},"email":"[email protected]"},"billing":{"address":{"city":"San Fransico","country":"ES","line1":"1467","line2":"Harrison Street","line3":"Harrison Street","zip":"94122","state":"Ceuta","first_name":"joseph","last_name":"Doe"},"phone":{"number":"9123456789","country_code":"+91"},"email":"[email protected]"},"order_details":null,"email":"[email protected]","name":null,"phone":null,"return_url":"https://hyperswitch.io/","authentication_type":"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":"206678482225","frm_message":null,"metadata":null,"connector_metadata":null,"feature_metadata":null,"reference_id":"206678482225","payment_link":null,"profile_id":"pro_501tEJX8ANb93eYoVAeO","surcharge_details":null,"attempt_count":1,"merchant_decision":null,"merchant_connector_id":"mca_TUNS4WRo8qUaNApH0dtb","incremental_authorization_allowed":null,"authorization_count":null,"incremental_authorizations":null,"external_authentication_details":null,"external_3ds_authentication_attempted":false,"expires_on":"2025-03-21T06:44:43.144Z","fingerprint":null,"browser_info":{"language":"en-US","time_zone":-330,"ip_address":"127.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-03-21T06:30:31.189Z","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","issuer_error_code":null,"issuer_error_message":null}
Psync after and before redirection Create a 3ds payment
curl --location 'http://localhost:8080/payments' \
--header 'Content-Type: application/json' \
--header 'Accept: application/json' \
--header 'api-key: dev_eYTBjERYvLMQg36q5VL8J3bwcWX9TONkgOB8E1wbOaQ38InTXnDJHrYQDQWoRu2b' \
--data-raw '{
    "amount": 10,
    "currency": "EUR",
    "return_url": "https://hyperswitch.io",
    "confirm": true,
    "customer_acceptance": null,
    "customer_id" :"asbh",
    "capture_method": "automatic",
    "authentication_type": "three_ds",
    "billing": {
        "address": {
            "line1": "1467",
            "line2": "Harrison Street",
            "line3": "Harrison Street",
            "city": "San Fransico",
            "state": "Ceutâ",
            "zip": "94122",
            "country": "ES",
            "first_name": "joseph",
            "last_name": "Doe"
        },
        "email": "[email protected]",
        "phone": {
            "number": "9123456789",
            "country_code": "+91"
        }
    },
    "email": "[email protected]",
    "browser_info": {
        "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,
        "ip_address": "127.0.0.1"
    },
    
    "payment_method": "card",
    
    "payment_method_data": {
        "card": {
            "card_number": "4548817212493017",
            "card_exp_month": "12",
            "card_exp_year": "49",
            "card_holder_name": "Joseph",
            "card_cvc": "123"
        }
    },
    "setup_future_usage": "on_session",
    "shipping": {
        "address": {
            "line1": "1467",
            "line2": "Harrison Street",
            "line3": "Harrison Street",
            "city": "San Fransico",
            "state": "Ceuta",
            "zip": "94122",
            "country": "ES",
            "first_name": "joseph",
            "last_name": "Doe"
        },
        "email": "[email protected]",
        "phone": {
            "number": "9123456789",
            "country_code": "+91"
        }
    }
}'

Response

{"payment_id":"pay_W2nrSGTtg0T5gxvc9W20","merchant_id":"postman_merchant_GHAction_cfbbe59e-3f32-4dc5-a43f-6cb0dd952d10","status":"requires_customer_action","amount":10,"net_amount":10,"shipping_cost":null,"amount_capturable":10,"amount_received":null,"connector":"redsys","client_secret":"pay_W2nrSGTtg0T5gxvc9W20_secret_vbXSeTVqLKxCS4WLKP5O","created":"2025-03-21T12:53:47.232Z","currency":"EUR","customer_id":"asbh","customer":{"id":"asbh","name":null,"email":"[email protected]","phone":null,"phone_country_code":null},"description":null,"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":"3017","card_type":null,"card_network":null,"card_issuer":null,"card_issuing_country":null,"card_isin":"454881","card_extended_bin":null,"card_exp_month":"12","card_exp_year":"49","card_holder_name":"Joseph","payment_checks":null,"authentication_data":null},"billing":null},"payment_token":"token_ZnViWQzmhFBJ2I9Nt2fK","shipping":{"address":{"city":"San Fransico","country":"ES","line1":"1467","line2":"Harrison Street","line3":"Harrison Street","zip":"94122","state":"Ceuta","first_name":"joseph","last_name":"Doe"},"phone":{"number":"9123456789","country_code":"+91"},"email":"[email protected]"},"billing":{"address":{"city":"San Fransico","country":"ES","line1":"1467","line2":"Harrison Street","line3":"Harrison Street","zip":"94122","state":"Ceutâ","first_name":"joseph","last_name":"Doe"},"phone":{"number":"9123456789","country_code":"+91"},"email":"[email protected]"},"order_details":null,"email":"[email protected]","name":null,"phone":null,"return_url":"https://hyperswitch.io/","authentication_type":"three_ds","statement_descriptor_name":null,"statement_descriptor_suffix":null,"next_action":{"type":"redirect_to_url","redirect_to_url":"http://localhost:8080/payments/redirect/pay_W2nrSGTtg0T5gxvc9W20/postman_merchant_GHAction_cfbbe59e-3f32-4dc5-a43f-6cb0dd952d10/pay_W2nrSGTtg0T5gxvc9W20_1"},"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":{"customer_id":"asbh","created_at":1742561627,"expires":1742565227,"secret":"epk_6f43b57c9b1f4199a874280094988181"},"manual_retry_allowed":null,"connector_transaction_id":"511143349445","frm_message":null,"metadata":null,"connector_metadata":null,"feature_metadata":null,"reference_id":"511143349445","payment_link":null,"profile_id":"pro_YFj3piUG8tJyeIjrH3PJ","surcharge_details":null,"attempt_count":1,"merchant_decision":null,"merchant_connector_id":"mca_X7xy9kmBfdRs0l8kjOlo","incremental_authorization_allowed":null,"authorization_count":null,"incremental_authorizations":null,"external_authentication_details":null,"external_3ds_authentication_attempted":false,"expires_on":"2025-03-21T13:08:47.232Z","fingerprint":null,"browser_info":{"language":"en-US","time_zone":-330,"ip_address":"127.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-03-21T12:53:52.795Z","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","issuer_error_code":null,"issuer_error_message":null}

Before processing the the redirection, do a psync

curl --location 'http://localhost:8080/payments/pay_W2nrSGTtg0T5gxvc9W20?force_sync=true' \
--header 'Accept: application/json' \
--header 'api-key: dev_eYTBjERYvLMQg36q5VL8J3bwcWX9TONkgOB8E1wbOaQ38InTXnDJHrYQDQWoRu2b'

Response

{"payment_id":"pay_W2nrSGTtg0T5gxvc9W20","merchant_id":"postman_merchant_GHAction_cfbbe59e-3f32-4dc5-a43f-6cb0dd952d10","status":"requires_customer_action","amount":10,"net_amount":10,"shipping_cost":null,"amount_capturable":10,"amount_received":null,"connector":"redsys","client_secret":"pay_W2nrSGTtg0T5gxvc9W20_secret_vbXSeTVqLKxCS4WLKP5O","created":"2025-03-21T12:53:47.232Z","currency":"EUR","customer_id":"asbh","customer":{"id":"asbh","name":null,"email":"[email protected]","phone":null,"phone_country_code":null},"description":null,"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":"3017","card_type":null,"card_network":null,"card_issuer":null,"card_issuing_country":null,"card_isin":"454881","card_extended_bin":null,"card_exp_month":"12","card_exp_year":"49","card_holder_name":"Joseph","payment_checks":null,"authentication_data":null},"billing":null},"payment_token":"token_ZnViWQzmhFBJ2I9Nt2fK","shipping":{"address":{"city":"San Fransico","country":"ES","line1":"1467","line2":"Harrison Street","line3":"Harrison Street","zip":"94122","state":"Ceuta","first_name":"joseph","last_name":"Doe"},"phone":{"number":"9123456789","country_code":"+91"},"email":"[email protected]"},"billing":{"address":{"city":"San Fransico","country":"ES","line1":"1467","line2":"Harrison Street","line3":"Harrison Street","zip":"94122","state":"Ceutâ","first_name":"joseph","last_name":"Doe"},"phone":{"number":"9123456789","country_code":"+91"},"email":"[email protected]"},"order_details":null,"email":"[email protected]","name":null,"phone":null,"return_url":"https://hyperswitch.io/","authentication_type":"three_ds","statement_descriptor_name":null,"statement_descriptor_suffix":null,"next_action":{"type":"redirect_to_url","redirect_to_url":"http://localhost:8080/payments/redirect/pay_W2nrSGTtg0T5gxvc9W20/postman_merchant_GHAction_cfbbe59e-3f32-4dc5-a43f-6cb0dd952d10/pay_W2nrSGTtg0T5gxvc9W20_1"},"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":null,"connector_transaction_id":"511143349445","frm_message":null,"metadata":null,"connector_metadata":null,"feature_metadata":null,"reference_id":"511143349445","payment_link":null,"profile_id":"pro_YFj3piUG8tJyeIjrH3PJ","surcharge_details":null,"attempt_count":1,"merchant_decision":null,"merchant_connector_id":"mca_X7xy9kmBfdRs0l8kjOlo","incremental_authorization_allowed":null,"authorization_count":null,"incremental_authorizations":null,"external_authentication_details":null,"external_3ds_authentication_attempted":false,"expires_on":"2025-03-21T13:08:47.232Z","fingerprint":null,"browser_info":{"language":"en-US","time_zone":-330,"ip_address":"127.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-03-21T12:57:13.053Z","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","issuer_error_code":null,"issuer_error_message":null}

After redirection completion, do a Psync

curl --location 'http://localhost:8080/payments/pay_W2nrSGTtg0T5gxvc9W20?force_sync=true' \
--header 'Accept: application/json' \
--header 'api-key: dev_eYTBjERYvLMQg36q5VL8J3bwcWX9TONkgOB8E1wbOaQ38InTXnDJHrYQDQWoRu2b'

Response

{"payment_id":"pay_W2nrSGTtg0T5gxvc9W20","merchant_id":"postman_merchant_GHAction_cfbbe59e-3f32-4dc5-a43f-6cb0dd952d10","status":"succeeded","amount":10,"net_amount":10,"shipping_cost":null,"amount_capturable":0,"amount_received":10,"connector":"redsys","client_secret":"pay_W2nrSGTtg0T5gxvc9W20_secret_vbXSeTVqLKxCS4WLKP5O","created":"2025-03-21T12:53:47.232Z","currency":"EUR","customer_id":"asbh","customer":{"id":"asbh","name":null,"email":"[email protected]","phone":null,"phone_country_code":null},"description":null,"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":"3017","card_type":null,"card_network":null,"card_issuer":null,"card_issuing_country":null,"card_isin":"454881","card_extended_bin":null,"card_exp_month":"12","card_exp_year":"49","card_holder_name":"Joseph","payment_checks":null,"authentication_data":null},"billing":null},"payment_token":"token_ZnViWQzmhFBJ2I9Nt2fK","shipping":{"address":{"city":"San Fransico","country":"ES","line1":"1467","line2":"Harrison Street","line3":"Harrison Street","zip":"94122","state":"Ceuta","first_name":"joseph","last_name":"Doe"},"phone":{"number":"9123456789","country_code":"+91"},"email":"[email protected]"},"billing":{"address":{"city":"San Fransico","country":"ES","line1":"1467","line2":"Harrison Street","line3":"Harrison Street","zip":"94122","state":"Ceutâ","first_name":"joseph","last_name":"Doe"},"phone":{"number":"9123456789","country_code":"+91"},"email":"[email protected]"},"order_details":null,"email":"[email protected]","name":null,"phone":null,"return_url":"https://hyperswitch.io/","authentication_type":"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":"511143349445","frm_message":null,"metadata":null,"connector_metadata":null,"feature_metadata":null,"reference_id":"511143349445","payment_link":null,"profile_id":"pro_YFj3piUG8tJyeIjrH3PJ","surcharge_details":null,"attempt_count":1,"merchant_decision":null,"merchant_connector_id":"mca_X7xy9kmBfdRs0l8kjOlo","incremental_authorization_allowed":null,"authorization_count":null,"incremental_authorizations":null,"external_authentication_details":null,"external_3ds_authentication_attempted":false,"expires_on":"2025-03-21T13:08:47.232Z","fingerprint":null,"browser_info":{"language":"en-US","time_zone":-330,"ip_address":"127.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-03-21T12:57:53.568Z","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","issuer_error_code":null,"issuer_error_message":null}
Test Rsync by updating the refund status to pending locally

Create a refund

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

Response

{"refund_id":"ref_5Oc5arvl7rYO2GK8pZFX","payment_id":"pay_W2nrSGTtg0T5gxvc9W20","amount":5,"currency":"EUR","status":"pending","reason":"Customer returned product","metadata":{"udf1":"value1","new_customer":"true","login_date":"2019-09-10T10:11:12Z"},"error_message":null,"error_code":null,"unified_code":null,"unified_message":null,"created_at":"2025-03-21T13:00:21.670Z","updated_at":"2025-03-21T13:00:22.652Z","connector":"redsys","profile_id":"pro_YFj3piUG8tJyeIjrH3PJ","merchant_connector_id":"mca_X7xy9kmBfdRs0l8kjOlo","split_refunds":null,"issuer_error_code":null,"issuer_error_message":null}

Trigger a Rsync call

curl --location 'http://localhost:8080/refunds/ref_5Oc5arvl7rYO2GK8pZFX' \
--header 'Accept: application/json' \
--header 'api-key: dev_eYTBjERYvLMQg36q5VL8J3bwcWX9TONkgOB8E1wbOaQ38InTXnDJHrYQDQWoRu2b'

Response

{"refund_id":"ref_5Oc5arvl7rYO2GK8pZFX","payment_id":"pay_W2nrSGTtg0T5gxvc9W20","amount":5,"currency":"EUR","status":"succeeded","reason":"Customer returned product","metadata":{"udf1":"value1","new_customer":"true","login_date":"2019-09-10T10:11:12Z"},"error_message":null,"error_code":null,"unified_code":null,"unified_message":null,"created_at":"2025-03-21T13:00:21.670Z","updated_at":"2025-03-21T13:01:23.315Z","connector":"redsys","profile_id":"pro_YFj3piUG8tJyeIjrH3PJ","merchant_connector_id":"mca_X7xy9kmBfdRs0l8kjOlo","split_refunds":null,"issuer_error_code":null,"issuer_error_message":null}

Checklist

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

Base automatically changed from redsys-3ds to main March 21, 2025 10:12
@hyperswitch-bot hyperswitch-bot bot added the M-api-contract-changes Metadata: This PR involves API contract changes label Mar 21, 2025
@hyperswitch-bot hyperswitch-bot bot removed the M-api-contract-changes Metadata: This PR involves API contract changes label Mar 21, 2025
awasthi21
awasthi21 previously approved these changes Mar 21, 2025
@AkshayaFoiger AkshayaFoiger dismissed stale reviews from deepanshu-iiitu and awasthi21 via 4763d85 March 21, 2025 12:29
@Gnanasundari24 Gnanasundari24 added this pull request to the merge queue Mar 22, 2025
Merged via the queue into main with commit 3f18c94 Mar 22, 2025
17 of 20 checks passed
@Gnanasundari24 Gnanasundari24 deleted the redsys-soap-api branch March 22, 2025 06:06
pixincreate added a commit that referenced this pull request Mar 24, 2025
…lobalpay-fixes

* 'main' of github.com:juspay/hyperswitch:
  feat(connector): [Recurly] Add record back support for recurly [V2] (#7544)
  refactor(webhook): add jwt authenticated endpoint to list unique webhook events for a profile (#7325)
  feat(core): Add three_ds_requestor_app_url in business_profile (#7589)
  feat(refunds): Add refunds diesel model support in V2 API (#7503)
  fix(connector): [globalpay] address 5xx due to deserialization issue when `account_name` is not passed (#7540)
  chore: update production endpoint url for globalPay (#7588)
  feat(connector): [Stripebilling] add record back support for stripebilling (#7561)
  feat(router): Make payment_method_subtype optional in payment_attempt [V2] (#7568)
  fix(connector): RSync voided status mapping in AuthorizeDotNet (#7566)
  chore(version): 2025.03.24.0
  feat(connector): [Coingate] implement refunds  (#7513)
  feat(connectors): [Redsys] add Psync and Rsync support (#7586)
  refactor(connector): [BRAINTREE] Pass email in payment requests (#7591)
  feat(webhook): Return events list and total_count on list initial delivery attempt call (#7243)
  refactor(router): make error_type generic in domain_models inorder to avoid conversion of errors in storage_impl (#7537)
  feat(router): [V2] Return connector customer reference IDs in `CustomerResponse` (#7319)
  feat: core changes for extended authorization (#6766)
  feat(coingate): Add Payment webhooks (#7489)
  refactor(dynamic_routing): change insert operation to upsert for dynamic_routing_stats (#7398)
  feat(connectors): [Redsys] add 3D secure card payment support, including transaction capture, cancellation, and refunds (#7508)
pixincreate added a commit that referenced this pull request Mar 27, 2025
…e-status-check

* 'main' of github.com:juspay/hyperswitch: (74 commits)
  chore(version): 2025.03.26.0
  feat(connector): [Coingate] add wasm changes for coingate metadata (#7632)
  feat(connector): [TRUSTPAY]  implement Banktransfer PaymentMethod (#7575)
  feat(connector): [BANKOFAMERICA] Implement Samsung Pay (#6888)
  fix(connector):  add Nomupay in payout_connector_list for all environment (#7521)
  chore(version): 2025.03.25.0
  feat(connector): [Recurly] Add record back support for recurly [V2] (#7544)
  refactor(webhook): add jwt authenticated endpoint to list unique webhook events for a profile (#7325)
  feat(core): Add three_ds_requestor_app_url in business_profile (#7589)
  feat(refunds): Add refunds diesel model support in V2 API (#7503)
  fix(connector): [globalpay] address 5xx due to deserialization issue when `account_name` is not passed (#7540)
  chore: update production endpoint url for globalPay (#7588)
  feat(connector): [Stripebilling] add record back support for stripebilling (#7561)
  feat(router): Make payment_method_subtype optional in payment_attempt [V2] (#7568)
  fix(connector): RSync voided status mapping in AuthorizeDotNet (#7566)
  chore(version): 2025.03.24.0
  feat(connector): [Coingate] implement refunds  (#7513)
  feat(connectors): [Redsys] add Psync and Rsync support (#7586)
  refactor(connector): [BRAINTREE] Pass email in payment requests (#7591)
  feat(webhook): Return events list and total_count on list initial delivery attempt call (#7243)
  ...
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-connector-compatibility Area: Connector compatibility A-connector-integration Area: Connector integration
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants