#Yashish

1 messages ยท Page 1 of 1 (latest)

gilded skiffBOT
mighty forge
#

Hi ๐Ÿ‘‹ no, setting proration_behavior to always_invoice will always immediately generate an Invoice for the prorations and attempt to collect payment for that Invoice.

What is it that you're trying to build a flow to accomplish?

wispy sail
#

i want that payment statue should be as open or drafted insted of fail

mighty forge
#

Sorry, I'm still not clear, you do want to create prorations and immediately generate an Invoice for them? But not charge the Customer for that Invoice?

wispy sail
#

subscription = subscription.modify(
subscription_id,
items=[subscription_item],
payment_behavior='pending_if_incomplete',
billing_cycle_anchor="now",

    )

in this code is executed the stripe tries to make the payment and the payment fail occur
but if we want the payment status to be open or drafted

mighty forge
#

In that snippet you're resetting the billing_cycle_anchor, which moves the Subscription to a new billing period and generates an Invoice for that. If the Subscription's collection_method is set to charge_automatically, then the the payment for that Invoice will be automatically attempted.

I think you will need to change the collection_method of the Subscription if your desire is to change the fact that the Subscription automatically attempts payments. But doing so will also change the behavior of the renewal payments for the Subscription.

wispy sail
#

`subscription = subscription.modify(
subscription_id,
proration_behavior='always_invoice',
items=[subscription_item],
payment_behavior='pending_if_incomplete',

    )`

in this can there be any way that we can make the payment statue as open or as drafted

mighty forge
#

So you managed to do it?

wispy sail
#

no i am asking how we can do it

mighty forge
wispy sail
#

but this will affect my future plan renuals

mighty forge
#

Yes

#

I'm still not really clear on what you're trying to accomplish