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

[subscriptions] Find way to attach metadata to donations made with subscription #495

Open
igoychev opened this issue May 4, 2023 · 3 comments
Labels
type: bug Something isn't working

Comments

@igoychev
Copy link
Contributor

igoychev commented May 4, 2023

Which area(s) of Podkrepi.bg are affected? (leave empty if unsure)

No response

Describe the Bug

The stripe invoice payment events are correctly attributing the donations with subscription,

However in Stripe Admin UI the regular subscription payments don't display the metadata and it is very difficult to find to which campaign they were made when doing cross-check audits.

Now that we migrated to latest version of API, we should find a way to include the metadata in the subscription creation so that it is sent with the payment.

To Reproduce

make a subscription donation and observe the payment intent does not contain the metadata.

Expected Behavior

A subscription donation payment to contain the campaign-id like the one-time donations.

Which browser are you using? (if relevant)

No response

@igoychev igoychev added the type: bug Something isn't working label May 4, 2023
@slavcho
Copy link
Contributor

slavcho commented May 5, 2023

I've send an inquiry to the stripe support.
They've responded and asked for some examples... will post updates here.

@slavcho
Copy link
Contributor

slavcho commented May 6, 2023

Basically the answer is - no. We cannot send metadata to the payment intent from the subscription.
This is the answer I got from the support.

"Metadata which has been set on an object generally is not “inherited” by or copied to associated objects which are created at the same time."
"There are some important exceptions..."
"Additionally, the metadata of an Invoice’s Line Items will be copied from the metadata of the Subscription the Invoice belongs to, for Invoice Line Items where type: ‘subscription.’"

https://support.stripe.com/questions/how-metadata-works-with-related-objects

So the invoice metadata is an exception.

I think we should create some export (or tool) internally that allow the accounting team to do match the data from stripe with the data from our db. It should not be that difficult...

@slavcho
Copy link
Contributor

slavcho commented Jul 2, 2023

I believe this helped mitigate the problem. We now have the campaign id in the donations export.
The finance are happy with.
#498

We can probably close this.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type: bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants