Search code examples
phpstripe-paymentsrecurring-billingstripe-connect

Stripe API PHP. Get all payments of subscription by subscription_id


I receive a hook from Clickfunnels that contains a "subscription_id": "sub_AnDOcr3inf0Qfx". How can I get all payments of this subscription using this data? Will be very appreciated for any help.


Solution

  • You can list all Invoices for the given Customer and Subscription and each of those will have a charge property that you can then retrieve (or you could just expand it for your 'list Invoices' API call).