#Hugues

1 messages · Page 1 of 1 (latest)

sleek impBOT
rose egret
#

Hi 👋

#

So when you made the update request did you explicitly include the subscription.latest_invoice.payment_intent.client_secret in the Expand parameter?

next jetty
#

My intent was to use the following:

String subscriptionId = subscriptionSchedule.getSubscription();
String latestInvoiceId = Subscription.retrieve(subscriptionId).getLatestInvoice();
Invoice.retrieve(latestInvoiceId).getPaymentIntent().getClientSecret();
And btw, this is not an update but the creation of a SubscriptionSchedule containing two phases.

rose egret
#

Okay so when you are retrieving the Latest Invoice it is only returning the Payment Intent ID, not the full object

#

You can request it return the full object by using the Expand parameter

next jetty
#

Can you show me how (in java)?

rose egret
#

The doc I linked has Java code snippets