#Malte-subscriptions

1 messages ยท Page 1 of 1 (latest)

versed heart
#

hi!

  1. see https://stripe.com/docs/receipts and yes it's disabled in test mode

  2. the receipt has a link to the invoice if that helps. And yes you should use webhooks to listen for the payment success and provision the service in your system https://stripe.com/docs/billing/subscriptions/build-subscriptions?ui=elements#provision-access

  3. hard to say say without seeing the exact code you use. The PaymentElement never prefills with existing card data or anything like that, that's not a thing. You can pass the subscription.latest_invoice.payment_intent.client_secret to the Element and let the customer enter their payment information there, paying there activates the subscription

inland fog
#

Thanks for the prompt reply ๐Ÿ™‚ I will try it and come back to you

inland fog
#

@versed heart

Concerning 3.)

I use the approach of "storing_subscription.png" to store the subscription.

When I retrieve a found subscription, the object does not contain the object "latest_invoice" anymore. This is only contained when I create a new subscription.

Do you have an idea? ๐Ÿ™‚

versed heart
#

it would definitely still have a latest_invoice

#

what do you see instead?

#

it's probably just the ID in_xxxxx because you didn't expand it on the subscription retrieve API call

#

await stripe.subscriptions.retrieve(subscription.id, {expand : ["latest_invoice.payment_intent"]})

inland fog
#

Retrieved like this to the frontend if retrieve it ๐Ÿ™‚ When I create a new subscription, "latest_invoice" is contained.

#

Ahh ok! I will try it