feat(core): send customer date of birth to UCS as a typed field - #13973
Open
shuklatushar226 wants to merge 1 commit into
Open
feat(core): send customer date of birth to UCS as a typed field#13973shuklatushar226 wants to merge 1 commit into
shuklatushar226 wants to merge 1 commit into
Conversation
Ilixium requires `customer.dateOfBirth` on every card authorisation. It is a UCS-only connector, and because the UCS payment model had nowhere to put a date of birth, the connector read one out of the merchant's free-form payment `metadata` blob under `ilixium_date_of_birth`. That means no validation, no prompting in the SDK, and PII travelling in an opaque JSON object. The pieces to fix it already exist on both sides. #13870 added `customer.date_of_birth` to the payment request and carried it through to `RouterData::customer_date_of_birth`, which the Checkout and WorldpayXML integrations already consume on the direct path. connector-service #2188 added `Customer.date_of_birth` to the gRPC contract. Only the join was missing: every `payments_grpc::Customer` this file builds left the field unset. - Bump `unified-connector-service-{client,cards}` to 2026.09.01.0, the first release carrying `Customer.date_of_birth`. The proto diff is additive, but these literals are exhaustive, so the new AFT and payout fields are filled in as well. They stay `None`: Hyperswitch's own AFT support runs on the direct connector path today, and routing it through UCS is separate work. - `to_grpc_customer_date_of_birth` maps `RouterData::customer_date_of_birth` to the ISO-8601 string the contract asks for, mirroring `to_grpc_customer_document_details`, and is applied at every construction site. `date_of_birth_to_string` in `api_models::customers` is the one place that encodes `time::Date` for the wire; only the Ilixium transformer knows the `ddmmyyyy` shape the processor actually wants. - Ilixium's required fields gain `customer.date_of_birth` (`FieldType::UserDateOfBirth`) so the SDK collects it, and move from `non_mandate` to `common`. `non_mandate` is merged only when the payment is not customer-initiated, so a save-card or `setup_future_usage = off_session` payment was collecting none of Ilixium's required fields at all. Merchants passing `ilixium_date_of_birth` in `metadata` must move to `customer.date_of_birth`; the metadata key stops being read once the corresponding UCS release ships. Ship this before that one, or Ilixium loses its only source of a date of birth. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_015KgmRmPj7PmQQLF1pPsRPf
Changed Files
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Type of Change
Description
Ilixium requires
customer.dateOfBirthon every card authorisation. It is a UCS-only connector, and because the UCS payment model had nowhere to put a date of birth, the connector read one out of the merchant's free-form paymentmetadatablob underilixium_date_of_birth.The pieces to fix this already exist on both sides. #13870 added
customer.date_of_birthto the payment request and carried it toRouterData::customer_date_of_birth, which Checkout and WorldpayXML already consume on the direct path. connector-service #2188 addedCustomer.date_of_birthto the gRPC contract. Only the join was missing — everypayments_grpc::Customerwe build left the field unset.unified-connector-service-{client,cards}to2026.09.01.0, the first release carryingCustomer.date_of_birth. The proto diff is additive, but these literals are exhaustive, so the new AFT and payout fields are filled in too. They stayNone: Hyperswitch's AFT support runs on the direct connector path today, and routing it through UCS is separate work.to_grpc_customer_date_of_birthmapsRouterData::customer_date_of_birthto the ISO-8601 string the contract asks for, mirroringto_grpc_customer_document_details, and is applied at all 16Customerconstruction sites plus the payoutsForeignFrom.date_of_birth_to_stringinapi_models::customersis the single place that encodestime::Datefor the wire; only the Ilixium transformer knows theddmmyyyyshape the processor wants.customer.date_of_birth(FieldType::UserDateOfBirth) so the SDK collects it from the shopper, and move fromnon_mandatetocommon.non_mandateis merged only when the payment is not customer-initiated, so a save-card orsetup_future_usage = off_sessionpayment was collecting none of Ilixium's required fields at all.Additional Changes
Dependency tags only:
crates/{external_services,router,hyperswitch_interfaces}/Cargo.toml. No API-contract or schema change —customer.date_of_birthon the payment request already shipped in #13870.Motivation and Context
Closes #13977.
Sourcing a date of birth from an opaque
metadatakey means no validation, no prompting in the SDK, and PII travelling outside the typed customer object. This moves it onto thecustomerobject the shopper actually fills in.Pairs with juspay/hyperswitch-prism#2211, which plumbs
Customer.date_of_birthintoPaymentsAuthorizeDataand switches Ilixium off the metadata path.How did you test it?
Unit test
ilixium_collects_date_of_birth_on_every_card_paymentassertscustomer.date_of_birthis in Ilixium'scommonbucket (the only one merged for both customer-initiated and one-off payments) withFieldType::UserDateOfBirth, and thatmandate/non_mandateare empty.Cypress:
cypress-tests/cypress/e2e/configs/Payment/Ilixium.jsnow sendscustomer: { date_of_birth: "1990-01-01" }instead ofmetadata.ilixium_date_of_birth.Ship this before juspay/hyperswitch-prism#2211. This PR only starts sending the field, which the current UCS release ignores — harmless. The prism PR changes where Ilixium reads from, so deployed first it would leave Ilixium with no date of birth at all.
Merchants passing
ilixium_date_of_birthinmetadatamust move tocustomer.date_of_birth; the metadata key stops being read once the prism side ships. Worth a release note.Checklist
cargo +nightly fmt --allcargo clippy🤖 Generated with Claude Code
https://claude.ai/code/session_015KgmRmPj7PmQQLF1pPsRPf