#alex_subscription-bundle

1 messages ¡ Page 1 of 1 (latest)

candid jettyBOT
#

👋 Welcome to your new thread!

⏲️ We'll be here soon! We typically respond in a few minutes, but in some cases we might need a bit more time (e.g., server's busy, you've got a complex question, etc.).

⏱️ We close idle threads, which makes them read-only. Once a thread is closed it won't be reopened, but you can start a new thread if you have another question.

🔗 This thread will always be available, even after it's closed. You can find it again using Discord's search, or you can save this link: https://discord.com/channels/841573134531821608/1249751728304296037

📝 Have more to share? Add details, code, screenshots, videos, etc. below.

lament fulcrum
#

@keen steppe Hello! I read your question a few times but I don't really get what that means

#

alex_subscription-bundle

keen steppe
#

))

#

ok, let me explain again

#

$subscription = Subscription::create([
'customer' => $customer_id,
'items' => [
[
'price' => $bundle['sub_plan_id'],
'quantity' => $qty,
],
],
'add_invoice_items' => [
[
'price' => $bundle['bundle_with_subscription_stripe_product_price'],
'quantity' => $qty,
],
],
'payment_behavior' => 'default_incomplete',
'metadata' => $metadata,
'expand' => ['latest_invoice'],
]);
$order->data['subscriptions']['ids'][$subscription->id] = FALSE;
$order->data['subscriptions']['processed'] = FALSE;
$order->data['subscriptions']['bid'] = $order->data['bundle_id'];
watchdog('_seq_commerce_order_payment_intent', '<pre>' . print_r($order, TRUE) . '</pre>');
$payment_intent = PaymentIntent::retrieve($subscription->latest_invoice->payment_intent);

#

but the problem is the next one, after user pays, we are creating ONE Subscription with 1 items inside but with a quantity of 3
i need to create 3 subscriptions, but charge customer for once

#

i can't create a payment intent with 3 equal subscriptions

lament fulcrum
#

That's impossible. Each Subscription has their own Invoice and each Invoice has their own payment. So if you have 3 Subscriptions then each Subscription will charge the customer each month for example

keen steppe
#

is not about recurring payment, is about the initial

lament fulcrum
#

I'm sorry this is still super unclear unfortunately

keen steppe
#

so, by one payment, create 3 different subscriptions

lament fulcrum
#

It's impossible to do this though.

keen steppe
#

ok, thanks