Skip to content

Commit f985f8c

Browse files
authored
Retrieve price using the correct Stripe account. Closes #1188 (#1189)
1 parent 252db2a commit f985f8c

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

lib/pay/stripe/webhooks/subscription_renewing.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ def call(event)
1515
return unless pay_subscription
1616

1717
# Stripe subscription items all have the same interval
18-
price = ::Stripe::Price.retrieve(invoice.lines.first.pricing.price_details.price)
18+
price = ::Stripe::Price.retrieve({id: invoice.lines.first.pricing.price_details.price}, {stripe_account: event.try(:account)}.compact)
1919

2020
# For collection_method=send_invoice, Stripe will send an email and next_payment_attempt will be null
2121
# https://docs.stripe.com/api/invoices/object#invoice_object-collection_method

0 commit comments

Comments
 (0)