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

refund vs. payment_refund #32

Closed
jleclanche opened this issue May 28, 2018 · 5 comments
Closed

refund vs. payment_refund #32

jleclanche opened this issue May 28, 2018 · 5 comments

Comments

@jleclanche
Copy link

Looking through the spec I don't understand why there is both a refund and a payment_refund type of object. They don't seem to have any concrete difference even. What's this about?

@brandur-stripe
Copy link
Contributor

There's a few different ideas here. In general, we use "charge" to refer specifically to a credit card charge and "payment" to refer to a more general form of money movement that may have a different type of source. In practice from a user's perspective however, both are created via /v1/charges, and the API makes an effort to present a "unified" payments interface in places like refunds where either instrument is made to look the same.

I'd love to get this unwound at some point so that there's just a single API resource for refunds, but in practice it's either going to involve waiting longer for some technical debt to be unwound server-side, or a somewhat ugly hack in the OpenAPI generator. For now, I'd prefer to opt for the former, but we can revisit that decision if it looks like it's going to be a very long time before it ever gets done.

@jleclanche
Copy link
Author

Does this make a difference to end-users of the API? I've never noticed those differences you were talking about, so it sounds it's just two types of refund objects internally, which are undistinguishable in the API, correct?

And /v1/refunds lists all of it, yeah?

@brandur-stripe
Copy link
Contributor

Does this make a difference to end-users of the API? I've never noticed those differences you were talking about, so it sounds it's just two types of refund objects internally, which are undistinguishable in the API, correct?

Yeah, there are some differences, but it would be better if we weren't exposing the distinction publicly.

And /v1/refunds lists all of it, yeah?

Yep, both are shaped into the same interface so that they can unified on this endpoint.

@jleclanche
Copy link
Author

Could you explain some of the differences?

@richardm-stripe
Copy link
Contributor

Closing as it looks like as of b9ff093#diff-532f75e4d5235966f11914b18755f9f0709cab7de386fa7318ca94eedbb61323L6524 payment_refund is no more.

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

No branches or pull requests

3 participants