Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Split object missing #1106

Open
milandhango opened this issue Jan 24, 2025 · 18 comments
Open

Split object missing #1106

milandhango opened this issue Jan 24, 2025 · 18 comments
Labels
do not stale Missing field Missing field from model during the api update

Comments

@milandhango
Copy link

This class is missing the Split object. Can you please add support for this?

Here's an example from the Adyen Postman -

split.api=1&split.nrOfItems=2&split.totalAmount=62000&split.currencyCode=EUR&split.item1.amount=60000&split.item1.type=BalanceAccount&split.item1.account=BA00000000000000000000001&split.item1.reference=TestPayment&split.item1.description=TestDescription&split.item2.amount=2000&split.item2.type=Commission&split.item2.reference=TestCommission

@Kwok-he-Chu
Copy link
Member

Hi,

Which class are you're referring to and which postman collection (endpoint), could you provide a minimal example of the request that you're trying to send?

@milandhango
Copy link
Author

The Adyen.Model.TerminalApi.PaymentRequest class has the SaleDataProperty. That property needs a property within it to specify the split values. The Postman example has the appended string I pasted above, but that is not supported in the C# SDK. The C# SDK is object based, so we need a property to specify those values.

Let me know if that's not clear. Another way to posing this is as a question. If I'm using this SDK and I want to specify the split amounts in a Terminal.PaymentRequest, how do I accomplish that?

@Kwok-he-Chu
Copy link
Member

It looks like you're trying to use the Terminal.PaymentRequest-model, however looking at the call split.api=1&split.nrOfItems=2&split.totalAmount=62000&split.currencyCode=EUR&split.item1.amount=60000&split.item1.type=BalanceAccount&split.item1.account=BA00000000000000000000001&split.item1.reference=TestPayment&split.item1.description=TestDescription&split.item2.amount=2000&split.item2.type=Commission&split.item2.reference=TestCommission

It looks like you're trying to interact with the /payments-endpoint for Adyen for Platforms

Are you perhaps looking for this: https://github.com/Adyen/adyen-dotnet-api-library/blob/v28.0.0/Adyen/Model/Checkout/PaymentRequest.cs#L736-L737

Let me know if this works for you

@milandhango
Copy link
Author

I don't think that's what we're looking for. We are trying to replicate this example - https://www.postman.com/adyendev/adyen-in-person-payments/request/ss5y7yf/platform-payment-request We are trying to push a request to a terminal and have the split payments information in that initial request.

We do use the checkout SDK for eCommerce transactions.

@Kwok-he-Chu
Copy link
Member

Thanks for the clarification, the libraries is missing some SaleToAcquirerData-field here - I've created a start in: #1117 and I'm currently investigating whether we've included all missing properties

@milandhango
Copy link
Author

Thank you. That change looks good on the surface.

We are using your Nuget package. Does that get updated automatically after you merge in changes to the Github repo??

@Kwok-he-Chu
Copy link
Member

When changes are made, and merged into-main, we will release it in the PR named "Release V..." (example: #1115 ) - Once that is merged, our pipeline will trigger and release the package.

We usually maintain a release schedule of 2 weeks±

@milandhango
Copy link
Author

Great. Thank you. One last question - is there a way to specify the PlatformChargebackLogic on this call?

@Kwok-he-Chu
Copy link
Member

You mean: In the SplitObject? I think the PlatformChargebackLogic is a completely different flow, are your referring to the endpoint here: https://docs.adyen.com/marketplaces/split-transactions/ ?

@milandhango
Copy link
Author

For an ecommerce transaction, there is a PaymentCaptureRequest. In that object, there is the Splits collection and the separate PlatformChargebackLogic property. Since you all are adding Splits to Termina.PaymentRequest, I was wondering if you all intend on adding PlatformChargebackLogic as well to make it more consistent with the ecommerce version.

@Kwok-he-Chu
Copy link
Member

That's a great question actually, ideally we want this behavior to be consistent. I'll reach out internally

@Kwok-he-Chu
Copy link
Member

PR is merged/closed in: #1117

@milandhango
Copy link
Author

Thank you for getting this done! Any thoughts on the PlatformChargebackLogic property that is in the PaymentCaptureRequest but not in the Terminal.PaymentRequest?

@Kwok-he-Chu
Copy link
Member

I've forwarded your feedback regarding the PlatformChargebackLogic-field; I assume that they will be looking into the API consistency for both the Terminal and Checkout API.

@asisro
Copy link

asisro commented Mar 25, 2025

Hi @milandhango were you able to make a successful Terminal payment using split with the Nuget?

@Kwok-he-Chu i am trying to create a Terminal payment using split information populated in the adyenMessagePayload.SaleData.SaleToAcquirerData.Split object but getting back an error
{"message":"Sale to Acquirer Data: NotAllowed Value: split, Reason: Failed validation","store":"xxxxxx"}

When translated to Json, the payload structure is not similar to the querystring format that is shown in the docs, how can we validate?

@milandhango
Copy link
Author

I haven't had a chance to try it yet. Thanks for giving this a shot.

@asisro
Copy link

asisro commented Mar 25, 2025

The split information is converted to base64 and when decoded it looks like this:

"split": { "api": 1, "totalAmount": 520, "currencyCode": "USD", "nrOfItems": 2, "items": [ { "amount": 514, "type": "BalanceAccount", "account": "BAXXXXXXXXXXXXXXXXXXXX", "reference": "b97acf7e-97e8-49e7-9f9d-8a23383e8148", "description": "" }, { "amount": 6, "type": "BalanceAccount", "account": "BAXXXXXXXXXXXXXXXXXX", "reference": "a2587b6d-74a3-4f8d-bf81-046bfd9c9fd3", "description": "" } ] }

Items is an array in this case and not a group of item1, item2 .... item n

@Kwok-he-Chu
Copy link
Member

@asisro Could you check if PR #1130 addresses your issue?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
do not stale Missing field Missing field from model during the api update
Projects
None yet
Development

No branches or pull requests

3 participants