-
Notifications
You must be signed in to change notification settings - Fork 32
Description
Environment
- Checkout SDK version: 6.11.3
- Platform and version:
- Operating System and version:
Description
Using your SDK flow client, I send request for payment session:
CompletableFuture paymentSession = flowClient.requestPaymentSession(paymentSessionRequest);
Payment session request object:
PaymentSessionRequest(amount=1099, currency=EUR, billing=Billing(address=Address(addressLine1=XXXX, addressLine2=XXXX, city=XXXX, state=null, zip=XXXXX, country=LT), phone=null), successUrl=xxxx, failureUrl=xxxx, paymentType=REGULAR, billingDescriptor=null, reference=INV-20250918-001, description=null, customer=Customer(email=xxxx@example.com, name=Test Testauskas, id=null, phone=null, taxNumber=null), shipping=Shipping(address=Address(addressLine1=XXXX addressLine2=XXX, city=XXX, state=null, zip=XXXX, country=LT), phone=null), recipient=Recipient(dob=null, accountNumber=XXXXXXXXXXXXXXXXXXXX, address=null, firstName=Test, lastName=Testauskas), processing=Processing(aft=true, discountAmount=null, shippingAmount=null, taxAmount=null, invoiceId=null, brandName=null, locale=null, partnerCustomerRiskData=null, customPaymentMethodIds=null, airlineData=null, accommodationData=null, orderId=null, surchargeAmount=null, dutyAmount=null, shippingTaxAmount=null, purchaseCountry=null, merchantInitiatedReason=null, campaignId=null, originalOrderAmount=null, receiptId=null, merchantCallbackUrl=null, lineOfBusiness=null, panPreference=null, provisionNetworkToken=true), instruction=null, processingChannelId=xxxxx, paymentMethodConfiguration=null, items=null, amountAllocations=[AmountAllocation(id=xxxxx, amount=1099, reference=null, commission=null)], risk=null, displayName=null, metadata={}, locale=EN_GB, threeds=Threeds(enabled=true, attemptN3d=null, challengeIndicator=null, exemption=null, allowUpgrade=null), sender=IndividualSender(super=AbstractSender(type=INDIVIDUAL), firstName=Test, lastName=Testauskas, dob=null, dateOfBirth=1990-05-15T00:00:00Z, address=Address(addressLine1=XXXX addressLine2=XXXX, city=XXXX, state=null, zip=XXXXX, country=LT), reference=null, identification=null), capture=true, captureOn=null, expiresOn=null, enabledPaymentMethods=[CARD, GOOGLEPAY, APPLEPAY], disabledPaymentMethods=null, customerRetry=null, ipAddress=null)
How IndividualSender object is built on my side:
IndividualSender.builder()
.firstName(customer.firstName())
.lastName(customer.lastName())
.address(address)
.dateOfBirth(LocalDate.parse(customer.dateOfBirth(), DateTimeFormatter.ISO_LOCAL_DATE).atStartOfDay(ZoneOffset.UTC).toInstant())
.build();
The object IndividualSender has parameter dateOfBirth of type Instant. However, according to your API documentation, expected value of this parameter should be in format "yyyy-mm-dd". How should I send you the date of birth in required format using your SDK?
Expected behavior
Current behavior
CheckoutApiException(httpStatusCode=422, responseHeaders={X-Dns-Prefetch-Control=off, Origin-Agent-Cluster=?1, Access-Control-Allow-Origin=, X-Content-Type-Options=nosniff, X-Amzn-Requestid=b450f6c8-cfa4-408f-9c19-9468e5b13e6e, Connection=keep-alive, X-Download-Options=noopen, Cko-Version=1.230.0, X-Permitted-Cross-Domain-Policies=none, Cko-Response-Version=0.0.0, Pragma=no-cache, Date=Tue, 09 Dec 2025 03:43:27 GMT, X-Amzn-Trace-Id=Root=1-69379adf-5449389536e3887300353cab, X-Amz-Apigw-Id=VTUi7HWtDoEFVgw=, Cko-Request-Id=b30820d3-701f-4c2b-8837-1306df0dce47, Referrer-Policy=no-referrer, Strict-Transport-Security=max-age=16000000; includeSubDomains; preload;, Cache-Control=no-store, Timing-Allow-Origin=, Content-Length=133, Content-Type=application/json}, errorDetails={request_id=c900490a-2de6-4fbf-9545-2122d9a6f7e1, error_type=validation_error, error_codes=[sender_invalid]})
Steps to reproduce
Possible solution
If only date is expected, either use LocalDate object for date parameters or fix serialization with customized object mapper to serialize Instant object to your format correctly (ApiClientImpl.sendRequestAsync -> serializer.toJson(request)
- I may be able to implement this bug fix