#tymm

1 messages · Page 1 of 1 (latest)

subtle gyroBOT
#

Hello! We'll be with you shortly. Below are links to other discussions we've had with you in the past week in case you want to review that information. If your question is related to one of these previous discussions, please provide a comprehensive summary of the current state and what you need help with now. We help many users simultaneously, so a summary allows us to resolve your issue as soon as possible.

  • tymm, 2 hours ago, 26 messages
  • tymm, 4 hours ago, 14 messages
  • tymm, 2 days ago, 5 messages
coral comet
fading raft
#

it is what i was using, this is the snippet
i do this

subscription.update(
                SubscriptionUpdateParams.builder()
                        .setCollectionMethod(SubscriptionUpdateParams.CollectionMethod.SEND_INVOICE)
                        .setDaysUntilDue(1L)
                        .setMetadata(meta)
                        .setCoupon(couponCode == null ? "" : couponCode)
                        .build()
        );

then this

toUpdateItem.update(
    SubscriptionItemUpdateParams.builder()
        .setPrice(newPrice.getId())
        .setProrationBehavior(SubscriptionItemUpdateParams.ProrationBehavior.ALWAYS_INVOICE)
        .setProrationDate(prorationDate)
        .setPaymentBehavior(SubscriptionItemUpdateParams.PaymentBehavior.PENDING_IF_INCOMPLETE)
        .build()
);
#

however it is not letting me to set pending_if_incomplete if the subscription collection method is send_invoice

#

i kinda needed this 2 flags to work together because i want

  • to be able to finalize the invoice of a subscription update manually
  • the update call to not change the existing subscription if the customer did not complete the payment
#

your colleague said i should try to use invoiceitem to do that instead so i tried and am kinda lost here

coral comet
fading raft
#

right now what im experiencing is that if i omit setting send_invoice and only set pending_if_incomplete im getting a invoice.payment_failed callback immediately, followed by invoice.payment_action_required after updating a subscriptionitem.

#

this is when the customer card has 3DS enabled. i am using invoice.payment_failed to check for 3DS next_action for the url. it will mess up the flow if the callback is being called prematurely

#

so the full story is that for example a customer with a 3DS enabled card has an existing subscription with item A priced at 100, then he wants to upgrade to item B priced at 200.
and it seems like with charge_automatically stripe is attempting to charge customer's card immediately after the subscriptionitemupdate api call which leads to invoice.payment_failed being callbacked.
so what im trying to do is manually finalizing the invoice, get the payment intent from the invoice and then pay.

#

if the flags are not possible to be used together, what do u suggest me do to achieve what i want?