#j-webhook-signature
1 messages ยท Page 1 of 1 (latest)
Hi ๐
Hello!
treasury.received_credit.created
Looking at the API Reference for the object you are working with
https://stripe.com/docs/api/treasury/received_credits/object#received_credit_object-linked_flows
We can see that this is only set if the network is stripe
Set if network is stripe and the source flow is visible to the user
What's the big difference with source_flow?
What do you mean by that?
compared to what would happen on a live event trigger compared to a test local environment trigger
because on our live environment its not null when a user pays via payment link
Do you have an example Received Credt object ID I can look at?
Where the source_flow is not null?
yeah one moment
this is how it looks when running on our dev environment and a payment is received via a payment link, here source_flow is populated. Is that just a payment link thing?
{'id': 'rc_1NgDrb4Ja87CD0ut5MyNXr3z', 'object': 'treasury.received_credit', 'amount': 9680, 'created': 1692308179, 'currency': 'usd', 'description': 'payment', 'failure_code': None, 'financial_account': 'fa_1MgHIK4Ja87CD0utuoXXAd79', 'hosted_regulatory_receipt_url': 'https://payments.stripe.com/regulatory-receipt/CBQaFwoVYWNjdF8xTWRmbTY0SmE4N0NEMHV0KNSl-qYGMgZe3Klavnc6NZMPNhRgiTcJt5pfMNSLsJiTq1Bqz_BTUI6vRC9ie9wGYmnfIEUCEtDAm-WMcqdGI9Ll308B', 'initiating_payment_method_details': {'billing_details': {'address': {'city': None, 'country': None, 'line1': None, 'line2': None, 'postal_code': None, 'state': None}, 'email': None, 'name': None}, 'financial_account': {'id': 'fa_1KGyEuKmW9tOWppXARzm8eeP', 'network': 'stripe'}, 'type': 'financial_account'}, 'linked_flows': {'credit_reversal': None, 'issuing_authorization': None, 'issuing_transaction': None, 'source_flow': 'obp_1NgDrXKmW9tOWppXuwei9UC8', 'source_flow_type': 'outbound_payment'}, 'livemode': False, 'network': 'stripe', 'reversal_details': {'deadline': None, 'restricted_reason': None}, 'status': 'succeeded', 'transaction': 'trxn_1NgDrb4Ja87CD0utBHpLNsAn'}
Just the ID is fine
we can retrieve an outbound payment with that using stripe.treasury.OutboundPayment.retrieve(ob['id')
No, in this case it is because the network is stripe
Which is what our docs say
source_flow will be null if the network ins not stripe or the source flow object is not one you can access from the API
In your test code you are setting the network to ach
i see! I got it now! So one more questions lets say the user did receive credit via ach or something out of stripe network is there's no way to retrieve the outbound payment with stripe.treasury.OutboundPayment.retrieve()? You just have to handle the data you get from the response?
That is correct AFAIk.
sorry what's AFAIk ๐ญ ?
and my last question would be if its off stripe network would it then not come with a Stripe signature and would cause this error?
stripe.error.SignatureVerificationError: No signatures
found matching the expected signature for payload
okay for some reason I get that error when I try to validate and construct the webhook
If you are having new issues related to your webhook receiver function, I would start to fix it by reviewing this doc: https://stripe.com/docs/webhooks#debugging
thank you!
Yeah that is where it will fail if the signature verification process does not match