Skip to content

feat(feature): [Zift] Add Cards Support#10171

Merged
likhinbopanna merged 8 commits intomainfrom
zift-integ
Nov 10, 2025
Merged

feat(feature): [Zift] Add Cards Support#10171
likhinbopanna merged 8 commits intomainfrom
zift-integ

Conversation

@awasthi21
Copy link
Contributor

@awasthi21 awasthi21 commented Nov 7, 2025

Type of Change

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

Description

Added Cards Payment Flows /Mandates Non -3ds
Void Not supported

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?

MCA:

{
    "connector_name": "zift",
    "connector_type": "payment_processor",
    "connector_account_details": {
        "auth_type": "SignatureKey",
        "api_key": "api_key",
        "key1": "key1",
        "api_secret": "api_secret"
    },
        "test_mode": false,
    "disabled": false,
    "payment_methods_enabled": [
        {
            "payment_method": "card",
            "payment_method_types": [
                {
                    "payment_method_type": "credit",
                    "minimum_amount": 1,
                    "maximum_amount": 68607706,
                    "recurring_enabled": true,
                    "installment_payment_enabled": true
                }
            ]
        },
        {
            "payment_method": "card",
            "payment_method_types": [
                {
                    "payment_method_type": "debit",
                    "minimum_amount": 1,
                    "maximum_amount": 68607706,
                    "recurring_enabled": true,
                    "installment_payment_enabled": true
                }
            ]
        }
    ]
}

Normal Cards (automatic flow)

{
    "payment_id": "pay_kxHKtDuSchQKvPegvrOb",
    "merchant_id": "merchant_1762777467",
    "status": "succeeded",
    "amount": 400,
    "net_amount": 400,
    "shipping_cost": null,
    "amount_capturable": 0,
    "amount_received": 400,
    "connector": "zift",
    "client_secret": "pay_kxHKtDuSchQKvPegvrOb_secret_jHxJTZLF4tFsph2hKZ22",
    "created": "2025-11-10T13:31:02.651Z",
    "currency": "USD",
    "customer_id": "3231",
    "customer": {
        "id": "3231",
        "name": null,
        "email": "guest@example.com",
        "phone": null,
        "phone_country_code": null
    },
    "description": null,
    "refunds": null,
    "disputes": null,
    "mandate_id": null,
    "mandate_data": null,
    "setup_future_usage": null,
    "off_session": null,
    "capture_on": null,
    "capture_method": "automatic",
    "payment_method": "card",
    "payment_method_data": {
        "card": {
            "last4": "0007",
            "card_type": null,
            "card_network": null,
            "card_issuer": null,
            "card_issuing_country": null,
            "card_isin": "520000",
            "card_extended_bin": null,
            "card_exp_month": "06",
            "card_exp_year": "29",
            "card_holder_name": "joseph Doe",
            "payment_checks": null,
            "authentication_data": null
        },
        "billing": null
    },
    "payment_token": null,
    "shipping": null,
    "billing": {
        "address": {
            "city": "Zurich",
            "country": "CH",
            "line1": "1467",
            "line2": "Harrison Street",
            "line3": "Harrison Street",
            "zip": "8008",
            "state": "asd",
            "first_name": "joseph",
            "last_name": null,
            "origin_zip": null
        },
        "phone": null,
        "email": null
    },
    "order_details": null,
    "email": "guest@example.com",
    "name": null,
    "phone": null,
    "return_url": "https://duck.com/",
    "authentication_type": "no_three_ds",
    "statement_descriptor_name": null,
    "statement_descriptor_suffix": null,
    "next_action": null,
    "cancellation_reason": null,
    "error_code": null,
    "error_message": null,
    "unified_code": null,
    "unified_message": null,
    "payment_experience": null,
    "payment_method_type": "credit",
    "connector_label": null,
    "business_country": null,
    "business_label": "default",
    "business_sub_label": null,
    "allowed_payment_method_types": null,
    "ephemeral_key": {
        "customer_id": "3231",
        "created_at": 1762781462,
        "expires": 1762785062,
        "secret": "epk_1d7b88942e974766be5b4c6348eaa3d0"
    },
    "manual_retry_allowed": null,
    "connector_transaction_id": "8616899782",
    "frm_message": null,
    "metadata": null,
    "connector_metadata": null,
    "feature_metadata": {
        "redirect_response": null,
        "search_tags": null,
        "apple_pay_recurring_details": null,
        "gateway_system": "direct"
    },
    "reference_id": null,
    "payment_link": null,
    "profile_id": "pro_CwSwrVaeGf08DzBylSnF",
    "surcharge_details": null,
    "attempt_count": 1,
    "merchant_decision": null,
    "merchant_connector_id": "mca_D0ymoXa1J7qeDMz2y1b4",
    "incremental_authorization_allowed": false,
    "authorization_count": null,
    "incremental_authorizations": null,
    "external_authentication_details": null,
    "external_3ds_authentication_attempted": false,
    "expires_on": "2025-11-10T13:46:02.651Z",
    "fingerprint": null,
    "browser_info": null,
    "payment_channel": null,
    "payment_method_id": null,
    "network_transaction_id": null,
    "payment_method_status": null,
    "updated": "2025-11-10T13:31:03.391Z",
    "split_payments": null,
    "frm_metadata": null,
    "extended_authorization_applied": null,
    "extended_authorization_last_applied_at": null,
    "request_extended_authorization": null,
    "capture_before": null,
    "merchant_order_reference_id": null,
    "order_tax_amount": null,
    "connector_mandate_id": null,
    "card_discovery": "manual",
    "force_3ds_challenge": false,
    "force_3ds_challenge_trigger": false,
    "issuer_error_code": null,
    "issuer_error_message": null,
    "is_iframe_redirection_enabled": null,
    "whole_connector_response": null,
    "enable_partial_authorization": null,
    "enable_overcapture": null,
    "is_overcapture_enabled": null,
    "network_details": null,
    "is_stored_credential": null,
    "mit_category": null,
    "billing_descriptor": null
}

Response

{
    "payment_id": "pay_kxHKtDuSchQKvPegvrOb",
    "merchant_id": "merchant_1762777467",
    "status": "succeeded",
    "amount": 400,
    "net_amount": 400,
    "shipping_cost": null,
    "amount_capturable": 0,
    "amount_received": 400,
    "connector": "zift",
    "client_secret": "pay_kxHKtDuSchQKvPegvrOb_secret_jHxJTZLF4tFsph2hKZ22",
    "created": "2025-11-10T13:31:02.651Z",
    "currency": "USD",
    "customer_id": "3231",
    "customer": {
        "id": "3231",
        "name": null,
        "email": "guest@example.com",
        "phone": null,
        "phone_country_code": null
    },
    "description": null,
    "refunds": null,
    "disputes": null,
    "mandate_id": null,
    "mandate_data": null,
    "setup_future_usage": null,
    "off_session": null,
    "capture_on": null,
    "capture_method": "automatic",
    "payment_method": "card",
    "payment_method_data": {
        "card": {
            "last4": "0007",
            "card_type": null,
            "card_network": null,
            "card_issuer": null,
            "card_issuing_country": null,
            "card_isin": "520000",
            "card_extended_bin": null,
            "card_exp_month": "06",
            "card_exp_year": "29",
            "card_holder_name": "joseph Doe",
            "payment_checks": null,
            "authentication_data": null
        },
        "billing": null
    },
    "payment_token": null,
    "shipping": null,
    "billing": {
        "address": {
            "city": "Zurich",
            "country": "CH",
            "line1": "1467",
            "line2": "Harrison Street",
            "line3": "Harrison Street",
            "zip": "8008",
            "state": "asd",
            "first_name": "joseph",
            "last_name": null,
            "origin_zip": null
        },
        "phone": null,
        "email": null
    },
    "order_details": null,
    "email": "guest@example.com",
    "name": null,
    "phone": null,
    "return_url": "https://duck.com/",
    "authentication_type": "no_three_ds",
    "statement_descriptor_name": null,
    "statement_descriptor_suffix": null,
    "next_action": null,
    "cancellation_reason": null,
    "error_code": null,
    "error_message": null,
    "unified_code": null,
    "unified_message": null,
    "payment_experience": null,
    "payment_method_type": "credit",
    "connector_label": null,
    "business_country": null,
    "business_label": "default",
    "business_sub_label": null,
    "allowed_payment_method_types": null,
    "ephemeral_key": {
        "customer_id": "3231",
        "created_at": 1762781462,
        "expires": 1762785062,
        "secret": "epk_1d7b88942e974766be5b4c6348eaa3d0"
    },
    "manual_retry_allowed": null,
    "connector_transaction_id": "8616899782",
    "frm_message": null,
    "metadata": null,
    "connector_metadata": null,
    "feature_metadata": {
        "redirect_response": null,
        "search_tags": null,
        "apple_pay_recurring_details": null,
        "gateway_system": "direct"
    },
    "reference_id": null,
    "payment_link": null,
    "profile_id": "pro_CwSwrVaeGf08DzBylSnF",
    "surcharge_details": null,
    "attempt_count": 1,
    "merchant_decision": null,
    "merchant_connector_id": "mca_D0ymoXa1J7qeDMz2y1b4",
    "incremental_authorization_allowed": false,
    "authorization_count": null,
    "incremental_authorizations": null,
    "external_authentication_details": null,
    "external_3ds_authentication_attempted": false,
    "expires_on": "2025-11-10T13:46:02.651Z",
    "fingerprint": null,
    "browser_info": null,
    "payment_channel": null,
    "payment_method_id": null,
    "network_transaction_id": null,
    "payment_method_status": null,
    "updated": "2025-11-10T13:31:03.391Z",
    "split_payments": null,
    "frm_metadata": null,
    "extended_authorization_applied": null,
    "extended_authorization_last_applied_at": null,
    "request_extended_authorization": null,
    "capture_before": null,
    "merchant_order_reference_id": null,
    "order_tax_amount": null,
    "connector_mandate_id": null,
    "card_discovery": "manual",
    "force_3ds_challenge": false,
    "force_3ds_challenge_trigger": false,
    "issuer_error_code": null,
    "issuer_error_message": null,
    "is_iframe_redirection_enabled": null,
    "whole_connector_response": null,
    "enable_partial_authorization": null,
    "enable_overcapture": null,
    "is_overcapture_enabled": null,
    "network_details": null,
    "is_stored_credential": null,
    "mit_category": null,
    "billing_descriptor": null
}

Manual

curl --location 'http://localhost:8080/payments' \
--header 'Content-Type: application/json' \
--header 'Accept: application/json' \
--header 'api-key: dev_0hTrjOhwKU8xlx5QxUCcNGGyL3lLYokSiU09NbzKmMGWx5IO2dpZAMWi3dqnyESI' \
--data-raw '{
    "amount": 400,
    "currency": "USD",
    "confirm": true,
    "customer_id":"3231",
    "capture_method": "manual",
    
    "authentication_type": "no_three_ds",
    "payment_method": "card",
    "payment_method_type": "credit",
    "email": "guest@example.com",
    "payment_method_data": {
        "card": {
            "card_number": "5200000000000007",
            "card_exp_month": "06",
            "card_exp_year": "29",
            "card_holder_name": "joseph Doe",
            "card_cvc": "123"
        }
    },
    "return_url": "https://duck.com",
    "billing": {
        "address": {
            "line1": "1467",
            "line2": "Harrison Street",
            "line3": "Harrison Street",
            "city": "Zurich",
            "state": "asd",
            "zip": "8008",
            "country": "CH",
            "first_name": "joseph"
        }
    }

Response

curl --location 'http://localhost:8080/payments' \
--header 'Content-Type: application/json' \
--header 'Accept: application/json' \
--header 'api-key: dev_0hTrjOhwKU8xlx5QxUCcNGGyL3lLYokSiU09NbzKmMGWx5IO2dpZAMWi3dqnyESI' \
--data-raw '{
    "amount": 400,
    "currency": "USD",
    
    "confirm": true,
    "customer_id":"3231",
    "capture_method": "manual",
    
    "authentication_type": "no_three_ds",
    "payment_method": "card",
    "payment_method_type": "credit",
    "email": "guest@example.com",
    "payment_method_data": {
        "card": {
            "card_number": "5200000000000007",
            "card_exp_month": "06",
            "card_exp_year": "29",
            "card_holder_name": "joseph Doe",
            "card_cvc": "123"
        }
    },
    "return_url": "https://duck.com",
    "billing": {
        "address": {
            "line1": "1467",
            "line2": "Harrison Street",
            "line3": "Harrison Street",
            "city": "Zurich",
            "state": "asd",
            "zip": "8008",
            "country": "CH",
            "first_name": "joseph"
        }
    }
      
}
'

Caputre

curl --location 'http://localhost:8080/payments/pay_vc0Qi8DdWUwPnID1nsVb/capture' \
--header 'Content-Type: application/json' \
--header 'Accept: application/json' \
--header 'api-key: dev_0hTrjOhwKU8xlx5QxUCcNGGyL3lLYokSiU09NbzKmMGWx5IO2dpZAMWi3dqnyESI' \
--data '{
  "amount_to_capture": 400,
  "statement_descriptor_name": "Joseph",
  "statement_descriptor_prefix" :"joseph",
  "statement_descriptor_suffix": "JS"
}'

Response

{
    "payment_id": "pay_vc0Qi8DdWUwPnID1nsVb",
    "merchant_id": "merchant_1762777467",
    "status": "succeeded",
    "amount": 400,
    "net_amount": 400,
    "shipping_cost": null,
    "amount_capturable": 0,
    "amount_received": 400,
    "connector": "zift",
    "client_secret": "pay_vc0Qi8DdWUwPnID1nsVb_secret_Db7q1rBTjSGO1TBrYc4U",
    "created": "2025-11-10T13:31:54.839Z",
    "currency": "USD",
    "customer_id": "3231",
    "customer": {
        "id": "3231",
        "name": null,
        "email": "guest@example.com",
        "phone": null,
        "phone_country_code": null
    },
    "description": null,
    "refunds": null,
    "disputes": null,
    "mandate_id": null,
    "mandate_data": null,
    "setup_future_usage": null,
    "off_session": null,
    "capture_on": null,
    "capture_method": "manual",
    "payment_method": "card",
    "payment_method_data": {
        "card": {
            "last4": "0007",
            "card_type": null,
            "card_network": null,
            "card_issuer": null,
            "card_issuing_country": null,
            "card_isin": "520000",
            "card_extended_bin": null,
            "card_exp_month": "06",
            "card_exp_year": "29",
            "card_holder_name": "joseph Doe",
            "payment_checks": null,
            "authentication_data": null
        },
        "billing": null
    },
    "payment_token": null,
    "shipping": null,
    "billing": {
        "address": {
            "city": "Zurich",
            "country": "CH",
            "line1": "1467",
            "line2": "Harrison Street",
            "line3": "Harrison Street",
            "zip": "8008",
            "state": "asd",
            "first_name": "joseph",
            "last_name": null,
            "origin_zip": null
        },
        "phone": null,
        "email": null
    },
    "order_details": null,
    "email": "guest@example.com",
    "name": null,
    "phone": null,
    "return_url": "https://duck.com/",
    "authentication_type": "no_three_ds",
    "statement_descriptor_name": null,
    "statement_descriptor_suffix": null,
    "next_action": null,
    "cancellation_reason": null,
    "error_code": null,
    "error_message": null,
    "unified_code": null,
    "unified_message": null,
    "payment_experience": null,
    "payment_method_type": "credit",
    "connector_label": null,
    "business_country": null,
    "business_label": "default",
    "business_sub_label": null,
    "allowed_payment_method_types": null,
    "ephemeral_key": null,
    "manual_retry_allowed": null,
    "connector_transaction_id": "8616899792",
    "frm_message": null,
    "metadata": null,
    "connector_metadata": null,
    "feature_metadata": {
        "redirect_response": null,
        "search_tags": null,
        "apple_pay_recurring_details": null,
        "gateway_system": "direct"
    },
    "reference_id": null,
    "payment_link": null,
    "profile_id": "pro_CwSwrVaeGf08DzBylSnF",
    "surcharge_details": null,
    "attempt_count": 1,
    "merchant_decision": null,
    "merchant_connector_id": "mca_D0ymoXa1J7qeDMz2y1b4",
    "incremental_authorization_allowed": false,
    "authorization_count": null,
    "incremental_authorizations": null,
    "external_authentication_details": null,
    "external_3ds_authentication_attempted": false,
    "expires_on": "2025-11-10T13:46:54.839Z",
    "fingerprint": null,
    "browser_info": null,
    "payment_channel": null,
    "payment_method_id": null,
    "network_transaction_id": null,
    "payment_method_status": null,
    "updated": "2025-11-10T13:32:32.499Z",
    "split_payments": null,
    "frm_metadata": null,
    "extended_authorization_applied": null,
    "extended_authorization_last_applied_at": null,
    "request_extended_authorization": null,
    "capture_before": null,
    "merchant_order_reference_id": null,
    "order_tax_amount": null,
    "connector_mandate_id": null,
    "card_discovery": "manual",
    "force_3ds_challenge": false,
    "force_3ds_challenge_trigger": false,
    "issuer_error_code": null,
    "issuer_error_message": null,
    "is_iframe_redirection_enabled": null,
    "whole_connector_response": null,
    "enable_partial_authorization": null,
    "enable_overcapture": null,
    "is_overcapture_enabled": null,
    "network_details": null,
    "is_stored_credential": null,
    "mit_category": null,
    "billing_descriptor": null
}
{
    "payment_id": "pay_o8N7W1ZvLfyawCJ6DiH1",
    "merchant_id": "merchant_1762777467",
    "status": "succeeded",
    "amount": 400,
    "net_amount": 400,
    "shipping_cost": null,
    "amount_capturable": 0,
    "amount_received": 400,
    "connector": "zift",
    "client_secret": "pay_o8N7W1ZvLfyawCJ6DiH1_secret_1vtT27oEdLX8wcZOBt24",
    "created": "2025-11-10T13:28:41.677Z",
    "currency": "USD",
    "customer_id": "3231",
    "customer": {
        "id": "3231",
        "name": null,
        "email": "guest@example.com",
        "phone": null,
        "phone_country_code": null
    },
    "description": null,
    "refunds": null,
    "disputes": null,
    "mandate_id": null,
    "mandate_data": null,
    "setup_future_usage": "off_session",
    "off_session": null,
    "capture_on": null,
    "capture_method": "automatic",
    "payment_method": "card",
    "payment_method_data": {
        "card": {
            "last4": "0007",
            "card_type": null,
            "card_network": null,
            "card_issuer": null,
            "card_issuing_country": null,
            "card_isin": "520000",
            "card_extended_bin": null,
            "card_exp_month": "06",
            "card_exp_year": "29",
            "card_holder_name": "joseph Doe",
            "payment_checks": null,
            "authentication_data": null
        },
        "billing": null
    },
    "payment_token": null,
    "shipping": null,
    "billing": {
        "address": {
            "city": "Zurich",
            "country": "CH",
            "line1": "1467",
            "line2": "Harrison Street",
            "line3": "Harrison Street",
            "zip": "8008",
            "state": "asd",
            "first_name": "joseph",
            "last_name": null,
            "origin_zip": null
        },
        "phone": null,
        "email": null
    },
    "order_details": null,
    "email": "guest@example.com",
    "name": null,
    "phone": null,
    "return_url": "https://duck.com/",
    "authentication_type": "no_three_ds",
    "statement_descriptor_name": null,
    "statement_descriptor_suffix": null,
    "next_action": null,
    "cancellation_reason": null,
    "error_code": null,
    "error_message": null,
    "unified_code": null,
    "unified_message": null,
    "payment_experience": null,
    "payment_method_type": "credit",
    "connector_label": null,
    "business_country": null,
    "business_label": "default",
    "business_sub_label": null,
    "allowed_payment_method_types": null,
    "ephemeral_key": {
        "customer_id": "3231",
        "created_at": 1762781321,
        "expires": 1762784921,
        "secret": "epk_ecd50af8b818494ab35d3228362ccfdf"
    },
    "manual_retry_allowed": null,
    "connector_transaction_id": "8616899772",
    "frm_message": null,
    "metadata": null,
    "connector_metadata": null,
    "feature_metadata": {
        "redirect_response": null,
        "search_tags": null,
        "apple_pay_recurring_details": null,
        "gateway_system": "direct"
    },
    "reference_id": null,
    "payment_link": null,
    "profile_id": "pro_CwSwrVaeGf08DzBylSnF",
    "surcharge_details": null,
    "attempt_count": 1,
    "merchant_decision": null,
    "merchant_connector_id": "mca_D0ymoXa1J7qeDMz2y1b4",
    "incremental_authorization_allowed": false,
    "authorization_count": null,
    "incremental_authorizations": null,
    "external_authentication_details": null,
    "external_3ds_authentication_attempted": false,
    "expires_on": "2025-11-10T13:43:41.677Z",
    "fingerprint": null,
    "browser_info": null,
    "payment_channel": null,
    "payment_method_id": "pm_OGIMszFyg0ueVYOTPmOn",
    "network_transaction_id": null,
    "payment_method_status": "active",
    "updated": "2025-11-10T13:28:42.587Z",
    "split_payments": null,
    "frm_metadata": null,
    "extended_authorization_applied": null,
    "extended_authorization_last_applied_at": null,
    "request_extended_authorization": null,
    "capture_before": null,
    "merchant_order_reference_id": null,
    "order_tax_amount": null,
    "connector_mandate_id": "MC10000000000024680007",
    "card_discovery": "manual",
    "force_3ds_challenge": false,
    "force_3ds_challenge_trigger": false,
    "issuer_error_code": null,
    "issuer_error_message": null,
    "is_iframe_redirection_enabled": null,
    "whole_connector_response": null,
    "enable_partial_authorization": null,
    "enable_overcapture": null,
    "is_overcapture_enabled": null,
    "network_details": null,
    "is_stored_credential": null,
    "mit_category": null,
    "billing_descriptor": null
}

Mandates

curl --location 'http://localhost:8080/payments' \
--header 'Content-Type: application/json' \
--header 'Accept: application/json' \
--header 'api-key: dev_0hTrjOhwKU8xlx5QxUCcNGGyL3lLYokSiU09NbzKmMGWx5IO2dpZAMWi3dqnyESI' \
--data-raw '{
    "amount": 400,
    "currency": "USD",
    
    "confirm": true,
    "customer_id":"3231",
    "capture_method": "automatic",
    
    "authentication_type": "no_three_ds",
    "payment_method": "card",
    "payment_method_type": "credit",
    "email": "guest@example.com",
    "payment_method_data": {
        "card": {
            "card_number": "5200000000000007",
            "card_exp_month": "06",
            "card_exp_year": "29",
            "card_holder_name": "joseph Doe",
            "card_cvc": "123"
        }
    },
    "return_url": "https://duck.com",
    "billing": {
        "address": {
            "line1": "1467",
            "line2": "Harrison Street",
            "line3": "Harrison Street",
            "city": "Zurich",
            "state": "asd",
            "zip": "8008",
            "country": "CH",
            "first_name": "joseph"
        }
    }
    ,
    "customer_acceptance": {
          "acceptance_type": "online",
          "accepted_at":"1963-05-03T04:07:52.723Z",
          "online": {
            "ip_address":"127.0.0.1",
            "user_agent": "amet irure esse"
          }
    },
    "setup_future_usage":"off_session"
}
'

Response

{
    "payment_id": "pay_ITAkIHOwDEbGXsLsiRl2",
    "merchant_id": "merchant_1762777467",
    "status": "requires_capture",
    "amount": 400,
    "net_amount": 400,
    "shipping_cost": null,
    "amount_capturable": 400,
    "amount_received": null,
    "connector": "zift",
    "client_secret": "pay_ITAkIHOwDEbGXsLsiRl2_secret_tnJvT37aElomKDzU3mce",
    "created": "2025-11-10T13:35:32.127Z",
    "currency": "USD",
    "customer_id": "3231",
    "customer": {
        "id": "3231",
        "name": null,
        "email": "guest@example.com",
        "phone": null,
        "phone_country_code": null
    },
    "description": null,
    "refunds": null,
    "disputes": null,
    "mandate_id": null,
    "mandate_data": null,
    "setup_future_usage": "off_session",
    "off_session": null,
    "capture_on": null,
    "capture_method": "manual",
    "payment_method": "card",
    "payment_method_data": {
        "card": {
            "last4": "0007",
            "card_type": null,
            "card_network": null,
            "card_issuer": null,
            "card_issuing_country": null,
            "card_isin": "520000",
            "card_extended_bin": null,
            "card_exp_month": "06",
            "card_exp_year": "29",
            "card_holder_name": "joseph Doe",
            "payment_checks": null,
            "authentication_data": null
        },
        "billing": null
    },
    "payment_token": null,
    "shipping": null,
    "billing": {
        "address": {
            "city": "Zurich",
            "country": "CH",
            "line1": "1467",
            "line2": "Harrison Street",
            "line3": "Harrison Street",
            "zip": "8008",
            "state": "asd",
            "first_name": "joseph",
            "last_name": null,
            "origin_zip": null
        },
        "phone": null,
        "email": null
    },
    "order_details": null,
    "email": "guest@example.com",
    "name": null,
    "phone": null,
    "return_url": "https://duck.com/",
    "authentication_type": "no_three_ds",
    "statement_descriptor_name": null,
    "statement_descriptor_suffix": null,
    "next_action": null,
    "cancellation_reason": null,
    "error_code": null,
    "error_message": null,
    "unified_code": null,
    "unified_message": null,
    "payment_experience": null,
    "payment_method_type": "credit",
    "connector_label": null,
    "business_country": null,
    "business_label": "default",
    "business_sub_label": null,
    "allowed_payment_method_types": null,
    "ephemeral_key": {
        "customer_id": "3231",
        "created_at": 1762781732,
        "expires": 1762785332,
        "secret": "epk_ff5f68fa05e247f19a15d5449ebbdc93"
    },
    "manual_retry_allowed": null,
    "connector_transaction_id": "8616899802",
    "frm_message": null,
    "metadata": null,
    "connector_metadata": null,
    "feature_metadata": {
        "redirect_response": null,
        "search_tags": null,
        "apple_pay_recurring_details": null,
        "gateway_system": "direct"
    },
    "reference_id": null,
    "payment_link": null,
    "profile_id": "pro_CwSwrVaeGf08DzBylSnF",
    "surcharge_details": null,
    "attempt_count": 1,
    "merchant_decision": null,
    "merchant_connector_id": "mca_D0ymoXa1J7qeDMz2y1b4",
    "incremental_authorization_allowed": false,
    "authorization_count": null,
    "incremental_authorizations": null,
    "external_authentication_details": null,
    "external_3ds_authentication_attempted": false,
    "expires_on": "2025-11-10T13:50:32.127Z",
    "fingerprint": null,
    "browser_info": null,
    "payment_channel": null,
    "payment_method_id": "pm_lAUbMWaabPykZXTk6O3L",
    "network_transaction_id": null,
    "payment_method_status": "active",
    "updated": "2025-11-10T13:35:32.872Z",
    "split_payments": null,
    "frm_metadata": null,
    "extended_authorization_applied": null,
    "extended_authorization_last_applied_at": null,
    "request_extended_authorization": null,
    "capture_before": null,
    "merchant_order_reference_id": null,
    "order_tax_amount": null,
    "connector_mandate_id": "MC10000000000024680007",
    "card_discovery": "manual",
    "force_3ds_challenge": false,
    "force_3ds_challenge_trigger": false,
    "issuer_error_code": null,
    "issuer_error_message": null,
    "is_iframe_redirection_enabled": null,
    "whole_connector_response": null,
    "enable_partial_authorization": null,
    "enable_overcapture": null,
    "is_overcapture_enabled": null,
    "network_details": null,
    "is_stored_credential": null,
    "mit_category": null,
    "billing_descriptor": null
}

Mandate Payment

curl --location 'http://localhost:8080/payments' \
--header 'Content-Type: application/json' \
--header 'Accept: application/json' \
--header 'api-key: dev_0hTrjOhwKU8xlx5QxUCcNGGyL3lLYokSiU09NbzKmMGWx5IO2dpZAMWi3dqnyESI' \
--data-raw '


{"amount": 100,
    "currency": "USD",
    "confirm": true,
        "customer_id":"3231",
    "capture_method":"automatic",
    "return_url": "https://google.com",
    "recurring_details": {
        "type": "payment_method_id",
        "data": "pm_lAUbMWaabPykZXTk6O3L"
    },
    "off_session": true,
    "payment_method":"card",
    "billing": {
        "address": {
            "first_name":"John",
            "last_name":"Doe",
            "line1": "1467",
            "line2": "Harrison Street",
            "line3": "Harrison Street",
            "city": "San Fransico",
            "state": "California",
            "zip": "94122",
            "country": "US"
            
            
        },
         "phone": {
            "number": "8056594427",
            "country_code": "+91"
        },
        "email":"xyz@gmail.com"
    }
}
'

Response

{
    "payment_id": "pay_d6Ey0iEqIjCznOark4r3",
    "merchant_id": "merchant_1762777467",
    "status": "succeeded",
    "amount": 100,
    "net_amount": 100,
    "shipping_cost": null,
    "amount_capturable": 0,
    "amount_received": 100,
    "connector": "zift",
    "client_secret": "pay_d6Ey0iEqIjCznOark4r3_secret_to7Vkk6AilbgixZiwghE",
    "created": "2025-11-10T13:36:41.967Z",
    "currency": "USD",
    "customer_id": "3231",
    "customer": {
        "id": "3231",
        "name": null,
        "email": "guest@example.com",
        "phone": null,
        "phone_country_code": null
    },
    "description": null,
    "refunds": null,
    "disputes": null,
    "mandate_id": null,
    "mandate_data": null,
    "setup_future_usage": null,
    "off_session": true,
    "capture_on": null,
    "capture_method": "automatic",
    "payment_method": "card",
    "payment_method_data": {
        "card": {
            "last4": "0007",
            "card_type": null,
            "card_network": null,
            "card_issuer": null,
            "card_issuing_country": null,
            "card_isin": "520000",
            "card_extended_bin": null,
            "card_exp_month": "06",
            "card_exp_year": "29",
            "card_holder_name": "joseph Doe",
            "payment_checks": null,
            "authentication_data": null
        },
        "billing": null
    },
    "payment_token": null,
    "shipping": null,
    "billing": {
        "address": {
            "city": "San Fransico",
            "country": "US",
            "line1": "1467",
            "line2": "Harrison Street",
            "line3": "Harrison Street",
            "zip": "94122",
            "state": "California",
            "first_name": "John",
            "last_name": "Doe",
            "origin_zip": null
        },
        "phone": {
            "number": "8056594427",
            "country_code": "+91"
        },
        "email": "xyz@gmail.com"
    },
    "order_details": null,
    "email": "guest@example.com",
    "name": null,
    "phone": null,
    "return_url": "https://google.com/",
    "authentication_type": "no_three_ds",
    "statement_descriptor_name": null,
    "statement_descriptor_suffix": null,
    "next_action": null,
    "cancellation_reason": null,
    "error_code": null,
    "error_message": null,
    "unified_code": null,
    "unified_message": null,
    "payment_experience": null,
    "payment_method_type": "credit",
    "connector_label": null,
    "business_country": null,
    "business_label": "default",
    "business_sub_label": null,
    "allowed_payment_method_types": null,
    "ephemeral_key": {
        "customer_id": "3231",
        "created_at": 1762781801,
        "expires": 1762785401,
        "secret": "epk_8630f73f17774122905f99d62605b946"
    },
    "manual_retry_allowed": null,
    "connector_transaction_id": "8616899812",
    "frm_message": null,
    "metadata": null,
    "connector_metadata": null,
    "feature_metadata": {
        "redirect_response": null,
        "search_tags": null,
        "apple_pay_recurring_details": null,
        "gateway_system": "direct"
    },
    "reference_id": null,
    "payment_link": null,
    "profile_id": "pro_CwSwrVaeGf08DzBylSnF",
    "surcharge_details": null,
    "attempt_count": 1,
    "merchant_decision": null,
    "merchant_connector_id": "mca_D0ymoXa1J7qeDMz2y1b4",
    "incremental_authorization_allowed": false,
    "authorization_count": null,
    "incremental_authorizations": null,
    "external_authentication_details": null,
    "external_3ds_authentication_attempted": false,
    "expires_on": "2025-11-10T13:51:41.967Z",
    "fingerprint": null,
    "browser_info": null,
    "payment_channel": null,
    "payment_method_id": "pm_lAUbMWaabPykZXTk6O3L",
    "network_transaction_id": null,
    "payment_method_status": "active",
    "updated": "2025-11-10T13:36:42.640Z",
    "split_payments": null,
    "frm_metadata": null,
    "extended_authorization_applied": null,
    "extended_authorization_last_applied_at": null,
    "request_extended_authorization": null,
    "capture_before": null,
    "merchant_order_reference_id": null,
    "order_tax_amount": null,
    "connector_mandate_id": "MC10000000000024680007",
    "card_discovery": "manual",
    "force_3ds_challenge": false,
    "force_3ds_challenge_trigger": false,
    "issuer_error_code": null,
    "issuer_error_message": null,
    "is_iframe_redirection_enabled": null,
    "whole_connector_response": null,
    "enable_partial_authorization": null,
    "enable_overcapture": null,
    "is_overcapture_enabled": null,
    "network_details": null,
    "is_stored_credential": true,
    "mit_category": null,
    "billing_descriptor": null
}

Refunds

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

Response

{
    "refund_id": "ref_dbczjLAVIvplZUzDls9g",
    "payment_id": "pay_d6Ey0iEqIjCznOark4r3",
    "amount": 50,
    "currency": "USD",
    "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-11-10T13:37:33.377Z",
    "updated_at": "2025-11-10T13:37:33.776Z",
    "connector": "zift",
    "profile_id": "pro_CwSwrVaeGf08DzBylSnF",
    "merchant_connector_id": "mca_D0ymoXa1J7qeDMz2y1b4",
    "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

@awasthi21 awasthi21 self-assigned this Nov 7, 2025
@awasthi21 awasthi21 requested review from a team as code owners November 7, 2025 10:30
@semanticdiff-com
Copy link

semanticdiff-com bot commented Nov 7, 2025

@codecov
Copy link

codecov bot commented Nov 7, 2025

Codecov Report

❌ Patch coverage is 0% with 417 lines in your changes missing coverage. Please review.
⚠️ Please upload report for BASE (main@4174929). Learn more about missing BASE report.

Files with missing lines Patch % Lines
...tch_connectors/src/connectors/zift/transformers.rs 0.00% 272 Missing ⚠️
...ates/hyperswitch_connectors/src/connectors/zift.rs 0.00% 119 Missing ⚠️
crates/hyperswitch_connectors/src/utils.rs 0.00% 19 Missing ⚠️
crates/common_enums/src/connector_enums.rs 0.00% 2 Missing ⚠️
crates/router/src/core/connector_validation.rs 0.00% 2 Missing ⚠️
crates/router/src/types/api/connector_mapping.rs 0.00% 1 Missing ⚠️
crates/router/src/types/api/feature_matrix.rs 0.00% 1 Missing ⚠️
crates/router/src/types/connector_transformers.rs 0.00% 1 Missing ⚠️
Additional details and impacted files
@@           Coverage Diff           @@
##             main   #10171   +/-   ##
=======================================
  Coverage        ?    4.05%           
=======================================
  Files           ?     1227           
  Lines           ?   304992           
  Branches        ?        0           
=======================================
  Hits            ?    12369           
  Misses          ?   292623           
  Partials        ?        0           

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@hyperswitch-bot hyperswitch-bot bot added the M-api-contract-changes Metadata: This PR involves API contract changes label Nov 7, 2025
@awasthi21 awasthi21 requested a review from a team as a code owner November 9, 2025 22:07
@hyperswitch-bot hyperswitch-bot bot removed the M-api-contract-changes Metadata: This PR involves API contract changes label Nov 9, 2025
@hyperswitch-bot hyperswitch-bot bot added the M-api-contract-changes Metadata: This PR involves API contract changes label Nov 10, 2025
@hyperswitch-bot hyperswitch-bot bot removed the M-api-contract-changes Metadata: This PR involves API contract changes label Nov 10, 2025
@hyperswitch-bot hyperswitch-bot bot added the M-api-contract-changes Metadata: This PR involves API contract changes label Nov 10, 2025
@hyperswitch-bot hyperswitch-bot bot removed the M-api-contract-changes Metadata: This PR involves API contract changes label Nov 10, 2025
let response: zift::ZiftPaymentsResponse = res
.response
.parse_struct("Zift PaymentsAuthorizeResponse")
dbg!(res.response.clone());
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

remove this

@awasthi21 awasthi21 requested a review from a team as a code owner November 10, 2025 14:00
@awasthi21 awasthi21 removed the request for review from a team November 10, 2025 14:08
ShankarSinghC
ShankarSinghC previously approved these changes Nov 10, 2025
@hyperswitch-bot hyperswitch-bot bot added the M-api-contract-changes Metadata: This PR involves API contract changes label Nov 10, 2025
@likhinbopanna likhinbopanna added this pull request to the merge queue Nov 10, 2025
Merged via the queue into main with commit e5f32f1 Nov 10, 2025
28 of 31 checks passed
@likhinbopanna likhinbopanna deleted the zift-integ branch November 10, 2025 16:44
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

M-api-contract-changes Metadata: This PR involves API contract changes

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants