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

Creating a refund allows setting of unknown parameter "currency" #2786

Open
markjerz opened this issue Oct 26, 2023 · 1 comment
Open

Creating a refund allows setting of unknown parameter "currency" #2786

markjerz opened this issue Oct 26, 2023 · 1 comment
Assignees

Comments

@markjerz
Copy link

Describe the bug

RefundCreateOptions has a Currency property in it but that parameter isn't present in the API docs. So, if I set it to something in the code I get an error response back from Stripe about an unknown parameter.

To Reproduce

var refund = await refundService.CreateAsync(
    new RefundCreateOptions {
        PamentIntent = payment.PaymentIntentId.Id, 
        Amount = X,
        Currency      = "gbp"
    });

Expected behavior

I suppose, the Currency property shouldn't exist in the RefundCreateOptions? Or maybe be marked as [Obsolete] if it once was possible (so as not to break existing implementations)?

Code snippets

No response

OS

Win11

.NET version

net7

Library version

stripe-dotnet 43.0.0

API version

2023-10-16

Additional context

No response

@markjerz markjerz added the bug label Oct 26, 2023
@remi-stripe remi-stripe self-assigned this Oct 26, 2023
@remi-stripe
Copy link
Contributor

@markjerz Sorry for the confusion. The currency parameter is only allowed in specific cases and shouldn't be in the library today. We'll look into a fix!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants