#Hemant-subscription-end-date

1 messages ยท Page 1 of 1 (latest)

pine fog
#

Hello! When you say an "end date" do you mean the date that the subscription will be cancelled?

steel prism
#

yes

pine fog
steel prism
#

Let me check that Karbi. Thanks ๐Ÿ‘

#

This does not work @pine fog . I have create session like this :

        SessionCreateParams params = SessionCreateParams.builder().setMode(SessionCreateParams.Mode.SUBSCRIPTION)
                .setSuccessUrl(successURL).setCancelUrl(cancelURL)
                .addLineItem(SessionCreateParams.LineItem.builder().setQuantity(1L).setPrice(prodPrice).build())
                .build();
        session = Session.create(params);
pine fog
#

Ah sorry about that - I missed the fact you were using Checkout Sessions to create your subscription. In that case, your best option is to update the subscription to set cancel_at AFTER it's been created.

steel prism
#

Let me try that @pine fog . Let me come back to you with success or failure ๐Ÿ™‚

#

Sorry to bother you @pine fog . How can i retrieve subscription for that particular instance ?

pine fog
steel prism
#

How can i get the checkout.session.completed event ?

#

where can i update this ?

pine fog