#dawid_api
1 messages ยท Page 1 of 1 (latest)
๐ Welcome to your new thread!
โฒ๏ธ We'll be here soon! Typically we respond in a few minutes, but sometimes we might take a bit longer if the server is busy or if you have a particularly tricky question.
โฑ๏ธ We close idle threads, which makes them read-only. Once a thread is closed it won't be reopened, but you can always start a new thread if you have another question.
๐ This thread will always be available, even after it's closed. You can find it again using Discord's search, or you can save this link: https://discord.com/channels/841573134531821608/1215286992691142686
๐ Have more to share? Add more details, code, screenshots, videos, etc. below.
hi! best solution is to set it on the Subscription and then look at https://docs.stripe.com/api/invoices/object#invoice_object-subscription_details-metadata in code
but yeah metadata is not inherited down to the Invoice's PaymentIntent unless you explicitly set it(e.g call PaymentIntent.update when handling an invoice.finalized webhook event or so on)
Oh, not good. So there is no easy way to do it without overall performance downgrade for us (additional call) :/
I tried to think more about it and it seems problematic with radar cooperation.
We use radar for our fraud detection and have some rules that are intended to block risky payments (based on our internal data)
We add some element to stripe lists and based on that list and metadata on payment we block (or not payment)
let me think about it, maybe there's some way to base rules on Invoice object fields
With adding metadata to intent post invoice it will literally too late
there's a magic syntax for having a rule look at metadata on the Customer object, maybe you could add your metadata to that object? https://docs.stripe.com/radar/rules/reference#:~:text=to your payments.-,Metadata on Customer and Destination Objects,-You can also
Looks like it would work:
instead
Review if :risk_score: > 5 and ::shop_id:: in @under_attack_shops
we can have:
Review if :risk_score: > 5 and (::shop_id:: in @under_attack_shops or ::customer:shop_id:: in @under_attack_shops )
sadly
::subscription:shop_id:: in @under_attack_shops
it not working
yeah only the paths mentioned in the docs (customer and destination) exist for this
Ok - so we will try with customer ๐