Skip to content

feat(api_models/connector): [SANTANDER] Add boleto related fields in feature metadata #12683

Merged
bsayak03 merged 6 commits into
mainfrom
boleto/cm/to/fm
Jun 16, 2026
Merged

feat(api_models/connector): [SANTANDER] Add boleto related fields in feature metadata #12683
bsayak03 merged 6 commits into
mainfrom
boleto/cm/to/fm

Conversation

@bsayak03

@bsayak03 bsayak03 commented Jun 10, 2026

Copy link
Copy Markdown
Contributor

Type of Change

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

Description

This PR contains two changes :

  • adding boleto related fields in feature metadata
  • populating image_data_url with the base64 encoded data of qr code for pix

Additional Changes

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

Motivation and Context

How did you test it?

  1. Boleto

cURL

curl --location 'http://localhost:8080/payments' \
--header 'Content-Type: application/json' \
--header 'Accept: application/json' \
--header 'api-key: dev_Wq7GxU0qZUD28ln5FAGVOc2Z864FXwLQiCPQGGAj0Rxblu1EYwmYpdlZsUmGE97N' \
--data-raw '{
    "amount": 25000,
    "currency": "BRL",
    "connector": [
        "santander"
    ],
    "confirm": true,
    "capture_method": "automatic",
    "capture_on": "2022-09-10T10:11:12Z",
    "amount_to_capture": 25000,
    "email": "guest@example.com",
    "name": "João da Silva santos",
    "phone": "999999999",
    "phone_country_code": "+65",
    "description": "Its my first payment request",
    "authentication_type": "no_three_ds",
    "return_url": "https://duck.com",
    "payment_method": "voucher",
    "payment_method_type": "boleto",
    "payment_method_data": {
        "voucher": {
            "boleto": {}
        }
    },
    "billing": {
        "address": {
            "line1": "rua nove de janeiro",
            "line2": "bela vista",
            "city": "sao paulo",
            "state": "SP",
            "zip": "05134-897",
            "country": "BR",
            "first_name": "João da Silva",
            "last_name": "santos"
        },
        "phone": {
            "number": "9123456789",
            "country_code": "+91"
        }
    },
    "customer": {
        "id": "nbjfnjknaf",
        "document_details": {
            "document_type": "cpf",
            "document_number": "94620639079"
        }
    },
    "feature_metadata": {
        "boleto_additional_details": {
            "due_date": "2026-10-31",
            "covenant_code": "3568253",
            "penalties": {
                "fixed_penalty": {
                    "value": "2.00",
                    "grace_period_days": 5
                },
                "interest": {
                    "interest_percentage": "5.00"
                }
            },
            "collection_actions": {
                "legal_protest": {
                    "protest_type": "disabled"
                },
                "auto_write_off_days": 32
            },
            "payment_constraints": {
                "type": "fixed_amount"
                
            },
            "beneficiary": {
                "name": "João da Silva",
                "document_number": "20201210000155",
                "document_type": "cnpj"
            },
            "document_kind": "commercial_invoice"
        }
    }
}'

Response

{
    "payment_id": "pay_eJd9mI1P1hcW3lEkZTPw",
    "merchant_id": "merchant_1781163576",
    "status": "requires_customer_action",
    "amount": 25000,
    "net_amount": 25000,
    "shipping_cost": null,
    "amount_capturable": 25000,
    "amount_received": null,
    "processor_merchant_id": "merchant_1781163576",
    "initiator": null,
    "sdk_authorization": "cHJvZmlsZV9pZD1wcm9fR1JSS2hZajNQVzhUckVMSnU1R2EscHVibGlzaGFibGVfa2V5PXBrX2Rldl8wOWYzMDQwZTZjMjI0OTI2ODFlMzQxNGFjYjJkNjA0MSxjbGllbnRfc2VjcmV0PXBheV9lSmQ5bUkxUDFoY1czbEVrWlRQd19zZWNyZXRfMWlFMFZCWGpLOFNQcEZQTlVzWGUsY3VzdG9tZXJfaWQ9bmJqZm5qa25hZixjbGllbnRfc2Vzc2lvbl9pZD1jbGllbnRfc2Vzc19Iajc0WlVyVlBybW9DV1FyaDJneixwYXltZW50X2lkPXBheV9lSmQ5bUkxUDFoY1czbEVrWlRQdw==",
    "connector": "santander",
    "state_metadata": null,
    "client_secret": "pay_eJd9mI1P1hcW3lEkZTPw_secret_1iE0VBXjK8SPpFPNUsXe",
    "created": "2026-06-11T07:50:22.158Z",
    "modified_at": "2026-06-11T07:50:23.824Z",
    "connector_customer_id": null,
    "currency": "BRL",
    "customer_id": "nbjfnjknaf",
    "customer": {
        "id": "nbjfnjknaf",
        "name": "João da Silva santos",
        "email": "guest@example.com",
        "phone": "999999999",
        "phone_country_code": "+65",
        "customer_document_details": {
            "document_type": "cpf",
            "document_number": "94620639079"
        }
    },
    "description": "Its my first payment request",
    "refunds": null,
    "disputes": null,
    "mandate_id": null,
    "mandate_data": null,
    "setup_future_usage": null,
    "off_session": null,
    "capture_on": null,
    "capture_method": "automatic",
    "payment_method": "voucher",
    "payment_method_data": {
        "voucher": {
            "boleto": {
                "social_security_number": null,
                "bank_number": null,
                "document_type": null,
                "fine_percentage": null,
                "fine_quantity_days": null,
                "interest_percentage": null,
                "write_off_quantity_days": null,
                "messages": null,
                "due_date": null
            }
        },
        "billing": null
    },
    "payment_token": null,
    "shipping": null,
    "billing": {
        "address": {
            "city": "sao paulo",
            "country": "BR",
            "line1": "rua nove de janeiro",
            "line2": "bela vista",
            "line3": null,
            "zip": "05134-897",
            "state": "SP",
            "first_name": "João da Silva",
            "last_name": "santos",
            "origin_zip": null
        },
        "phone": {
            "number": "9123456789",
            "country_code": "+91"
        },
        "email": null
    },
    "order_details": null,
    "email": "guest@example.com",
    "name": "João da Silva santos",
    "phone": "999999999",
    "return_url": "https://duck.com/",
    "authentication_type": "no_three_ds",
    "statement_descriptor_name": null,
    "statement_descriptor_suffix": null,
    "next_action": {
        "type": "display_voucher_information",
        "voucher_details": {
            "entry_date": "2026-06-11",
            "expires_at": null,
            "expiry_date": "2026-10-31 00:00:00.0",
            "reference": "6319473289269",
            "download_url": null,
            "instructions_url": null,
            "digitable_line": "03399356862536319473628926901019516160000025000",
            "barcode": "03395161600000250009356825363194732892690101",
            "qr_code_url": "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAegAAAHoCAAAAACnOyPQAAAT2klEQVR4Ae3gAZAkSZIkSRKLqpm7R0REZmZmVlVVVVV3d3d3d/fMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMdHd3d3dXV1VVVVVmZ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ULnq/wMqV/1/QOWq/w+oXPX/AZWr/j+gctX/B1Su+v+AylX/H1C56v8DKlf9f0Dlqv8PqFz1/wGVq/4/oHLV/wdUrvr/gMpV/x9Quer/AypX/X9A5ar/D6hc9f8Blav+P6By1f8HVK76/4DKVf8fULnq/wMqV/1/QOWq/w/4R8YXloKAIRkPAAAAAElFTkSuQmCC",
            "raw_qr_data": "00020101021226920014br.gov.bcb.pix2570pix-h.santander.com.br/qr/v2/cobv/05931b3e-b8b7-4042-90e6-ae8a1a9175f45204000053039865406250.005802BR5925TESTE CONECTIVIDADE API 16005IBATE62070503***63049731"
        }
    },
    "cancellation_reason": null,
    "error_code": null,
    "error_message": null,
    "unified_code": null,
    "unified_message": null,
    "error_details": null,
    "payment_experience": null,
    "payment_method_type": "boleto",
    "connector_label": null,
    "business_country": null,
    "business_label": "default",
    "business_sub_label": null,
    "allowed_payment_method_types": null,
    "manual_retry_allowed": null,
    "connector_transaction_id": "6319473289269",
    "frm_message": null,
    "metadata": null,
    "connector_metadata": null,
    "connector_response_metadata": null,
    "feature_metadata": {
        "redirect_response": null,
        "search_tags": null,
        "apple_pay_recurring_details": null,
        "pix_additional_details": null,
        "boleto_additional_details": {
            "due_date": "2026-10-31",
            "document_kind": "commercial_invoice",
            "payment_type": null,
            "covenant_code": "3568253",
            "pix_key": null,
            "discount_rules": null,
            "penalties": {
                "fixed_penalty": {
                    "value": "2.00",
                    "grace_period_days": 5
                },
                "interest": {
                    "interest_percentage": "5.00",
                    "iof_percentage": null
                }
            },
            "collection_actions": {
                "legal_protest": {
                    "protest_type": "disabled",
                    "days_after_due_date": null
                },
                "auto_write_off_days": 32
            },
            "payment_constraints": {
                "type": "fixed_amount"
            },
            "beneficiary": {
                "name": "João da Silva",
                "document_number": "20201210000155",
                "document_type": "cnpj"
            }
        },
        "pix_automatico_additional_details": null,
        "finix_additional_details": null
    },
    "reference_id": null,
    "payment_link": null,
    "profile_id": "pro_GRRKhYj3PW8TrELJu5Ga",
    "surcharge_details": null,
    "attempt_count": 1,
    "merchant_decision": null,
    "merchant_connector_id": "mca_vdG6dzTirBpgVl0NZIbm",
    "incremental_authorization_allowed": false,
    "authorization_count": null,
    "incremental_authorizations": null,
    "external_authentication_details": null,
    "external_3ds_authentication_attempted": false,
    "expires_on": "2026-06-11T08:05:22.158Z",
    "fingerprint": null,
    "browser_info": null,
    "payment_channel": null,
    "payment_method_id": null,
    "network_transaction_id": null,
    "network_transaction_link_id": null,
    "payment_method_status": null,
    "updated": "2026-06-11T07:50:23.824Z",
    "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": null,
    "force_3ds_challenge": false,
    "force_3ds_challenge_trigger": false,
    "issuer_error_code": null,
    "issuer_error_message": null,
    "is_iframe_redirection_enabled": null,
    "whole_connector_response": null,
    "enable_partial_authorization": null,
    "enable_overcapture": null,
    "is_overcapture_enabled": null,
    "network_details": null,
    "is_stored_credential": null,
    "mit_category": null,
    "billing_descriptor": null,
    "tokenization": null,
    "partner_merchant_identifier_details": null,
    "payment_method_tokenization_details": null,
    "installment_options": null,
    "installment_data": null,
    "sender_payment_instrument_id": 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

@bsayak03 bsayak03 self-assigned this Jun 10, 2026
@bsayak03
bsayak03 requested review from a team as code owners June 10, 2026 12:24
@semanticdiff-com

semanticdiff-com Bot commented Jun 10, 2026

Copy link
Copy Markdown

@bsayak03 bsayak03 added the S-test-ready Status: This PR is ready for cypress-tests label Jun 10, 2026
@hyperswitch-bot hyperswitch-bot Bot added the M-api-contract-changes Metadata: This PR involves API contract changes label Jun 10, 2026

@XyneSpaces XyneSpaces left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Automated Review Summary

PR: feat(api_models/connector): [SANTANDER] Add boleto related fields in feature metadata
Team: connector + baseline


Findings Overview

Clean implementation — API contract extension follows established patterns. One observation on deprecation handling.


Verification Passed

1. API Models (crates/api_models/src/payments.rs)

  • ✅ New boleto fields properly added to BoletoAdditionalDetails with #[serde(default)] for backward compatibility
  • merge function updated to combine new fields from both instances
  • #[schema(value_type = ...)] attributes present for proper OpenAPI spec generation

2. Diesel Models (crates/diesel_models/src/types.rs)

  • ✅ Storage types mirror API types with proper field mapping
  • StringMajorUnit used appropriately for monetary values (amount, percentages)
  • ✅ Custom serialization for PrimitiveDateTime fields via date_only_optional module

3. Connector Transformers (crates/hyperswitch_connectors/src/connectors/santander/transformers.rs)

  • ✅ Source changed from connector_intent_metadata to feature_metadata — aligns with architectural direction
  • qr_code_url now properly set to Some(image_data_url) matching the actual QR code source

4. Domain Model Converters (crates/hyperswitch_domain_models/src/lib.rs)

  • ✅ Bidirectional conversions (convert_from / convert_back) implemented for all new types
  • ✅ Enum variants exhaustively matched (Standard, FixedDate, DailyCalendar, DailyBusiness, etc.)

5. OpenAPI Specs

  • ✅ Both v1 and v2 specs updated with new schema references

Observation (Non-blocking)

Deprecation removal on document_kind:
The #[schema(deprecated)] attribute was removed from document_kind. The PR description notes these fields moved to connector_metadata — verify this removal is intentional and coordinated with any consumer migration.

// Before:
#[schema(value_type = Option<BoletoDocumentKind>, example="commercial_invoice", deprecated)]

// After:
#[schema(value_type = Option<BoletoDocumentKind>, example="commercial_invoice")]

Verdict:Approve — Well-structured API extension following patterns. Verify deprecation removal is intentional before merge.

@XyneSpaces XyneSpaces left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Automated Review Summary

PR: feat(api_models/connector): [SANTANDER] Add boleto related fields in feature metadata
Team: connector + baseline
Reviewer: XyneSpaces Automation


Findings Overview

No blocking issues found. This is a clean connector feature addition extending the boleto payment method metadata structure for Santander.


Verification Passed

Type consistency — New SantanderPaymentDiscountRules, PenaltyRules, CollectionActions, BoletoPaymentTypeConstraints, and BeneficiaryDetails types properly mirror API model structure in diesel models

Bidirectional conversion — All 16 new ApiModelToDieselModelConvertor implementations in hyperswitch_domain_models/src/lib.rs follow the established pattern with proper From/TryFrom bounds

Connector transformer updatesantander/transformers.rs correctly updated to read from feature_metadata instead of connector_intent_metadata, fixing the field path alignment

OpenAPI spec sync — Both v1 and v2 specs updated with new nullable fields, maintaining API contract consistency

Deprecated field cleanup — Removal of #[deprecated] from document_kind is intentional as the field is actively used in the boleto flow


Observations

ℹ️ Field richness — The new metadata structure supports sophisticated boleto configurations (discount tiers, penalty rules, protest actions, flexible amounts). Ensure these are documented in the connector setup guides so merchants can leverage the full feature set.

ℹ️ QR code fix — The change from populating qr_code_url from transaction_data.image_data_url is noted as a fix. This aligns with the connector's response structure.


Verdict:Approve — Clean feature addition with proper type modeling and conversion implementations.

@github-actions github-actions Bot removed the S-test-ready Status: This PR is ready for cypress-tests label Jun 10, 2026
@bsayak03
bsayak03 requested a review from a team as a code owner June 10, 2026 14:16
@hyperswitch-bot hyperswitch-bot Bot removed the M-api-contract-changes Metadata: This PR involves API contract changes label Jun 10, 2026
@bsayak03 bsayak03 added the S-test-ready Status: This PR is ready for cypress-tests label Jun 10, 2026
@hyperswitch-bot hyperswitch-bot Bot added the M-api-contract-changes Metadata: This PR involves API contract changes label Jun 10, 2026

@deepanshu-iiitu deepanshu-iiitu left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Connector changes look good

@bsayak03
bsayak03 added this pull request to the merge queue Jun 15, 2026
@github-merge-queue
github-merge-queue Bot removed this pull request from the merge queue due to failed status checks Jun 15, 2026
@bsayak03
bsayak03 added this pull request to the merge queue Jun 15, 2026
@github-merge-queue
github-merge-queue Bot removed this pull request from the merge queue due to failed status checks Jun 15, 2026
@bsayak03
bsayak03 added this pull request to the merge queue Jun 15, 2026
@github-merge-queue
github-merge-queue Bot removed this pull request from the merge queue due to failed status checks Jun 15, 2026
@bsayak03
bsayak03 added this pull request to the merge queue Jun 15, 2026
@github-merge-queue
github-merge-queue Bot removed this pull request from the merge queue due to failed status checks Jun 15, 2026
@bsayak03
bsayak03 added this pull request to the merge queue Jun 16, 2026
Merged via the queue into main with commit 4ce8ca4 Jun 16, 2026
56 of 59 checks passed
@bsayak03
bsayak03 deleted the boleto/cm/to/fm branch June 16, 2026 07:24
@hyperswitch-bot hyperswitch-bot Bot removed the S-test-ready Status: This PR is ready for cypress-tests label Jun 21, 2026
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