#ebellotpu6
1 messages · Page 1 of 1 (latest)
Sure, what are they looking to build?
The client is asking me to automate a process that is carried out manually from the dashboard.
The process is as follows:
1)In the dashboard, go to payments. Once in payments, select the failed payments filter, and export.
Sure, should be possible. Important to note that 'failed' isn't a status that maps directly to a status on the corresponding API object: https://docs.stripe.com/api/payment_intents/object#payment_intent_object-status
Complete reference documentation for the Stripe API. Includes code snippets and examples for our Python, Java, PHP, Node.js, Go, Ruby, and .NET libraries.
'Failed' in the Dashboard can be any of of a few of those, including requires_payment_method and requires_action
- Now foreach customer that has a payment failed, we need to get the link on the invoice failed, like this: https://invoice.stripe.com/i/acct_1MBekFAd02IkV8oW/live_YWNjdF8xTUJla0ZBZDAySWtWOG9XLF9QVGxndk13Q0U2MndQaE9XWkkzZ0FXUWZySUpzdGpGLDk4OTAwMjk00200R8cpQA7E?s=db
Sure, you can just 'expand' the invoice field via the API when the list the objects and it'll be included in the API response: https://docs.stripe.com/api/payment_intents/object#payment_intent_object-invoice
Complete reference documentation for the Stripe API. Includes code snippets and examples for our Python, Java, PHP, Node.js, Go, Ruby, and .NET libraries.
so, I first I have to filter the paymentintents for status != succeeded. Then I can find the link in the invoice field?
Yes, if you 'expand' it in your API request to list: https://docs.stripe.com/api/expanding_objects
Complete reference documentation for the Stripe API. Includes code snippets and examples for our Python, Java, PHP, Node.js, Go, Ruby, and .NET libraries.
okey
And then there'll be a hosted_invoice_url field: https://docs.stripe.com/api/invoices/object#invoice_object-hosted_invoice_url
Complete reference documentation for the Stripe API. Includes code snippets and examples for our Python, Java, PHP, Node.js, Go, Ruby, and .NET libraries.
thank you