#tymm
1 messages · Page 1 of 1 (latest)
im updating a subscription, adding new items into it
SubscriptionItemCreateParams params = SubscriptionItemCreateParams.builder()
.setProrationBehavior(SubscriptionItemCreateParams.ProrationBehavior.NONE)
.setPaymentBehavior(SubscriptionItemCreateParams.PaymentBehavior.DEFAULT_INCOMPLETE)
.setSubscription(subscription.getId())
.setPrice(createItem.getKey())
.setQuantity(Long.valueOf(createItem.getValue().toString()))
.build();
SubscriptionItem.create(params);
this is the snippet
i dont think the price price_1N5gcnLouXJU4FDJTOBVAcS7 that im adding into the subscription sub_1NdqFOLouXJU4FDJsDHB0QSZ already exist prior to this request req_KGZuTXLDZX0Ly7
can u please help me check.
If you want to update a Subscription, please use the subscription.update method: https://stripe.com/docs/api/subscriptions/update
why is the subscriptionitemcreateparams way not recommended
The Subscription already has Prices price_1NWCsULouXJU4FDJrCAKbnpe and price_1N5gcnLouXJU4FDJTOBVAcS7
It probably could work, but it doesn't give you a good visibility into the overall state of the Subscription object.
But in any case, the Subscription already has the Price you're trying to add.
please let me know which request adds price_1N5gcnLouXJU4FDJTOBVAcS7 to the subscriprion
The same one as you're trying to make, the first one was successful, apparently: https://dashboard.stripe.com/test/logs/req_mXnuFMpYySwuJw