#johann-muller_api

1 messages ยท Page 1 of 1 (latest)

prisma bridgeBOT
wintry minnowBOT
#

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.

prisma bridgeBOT
#

๐Ÿ‘‹ 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/1248183243115859979

๐Ÿ“ Have more to share? Add details, code, screenshots, videos, etc. below.

cursive rivet
sharp raft
#

Hi
You can start a Subscirption in the future using Subscription Scheduler

cursive rivet
#

Currently I do this if it's an immediate start
So start trial today until 19 July, then pro-rate from 20.7 to billing anchor 15.8

$subscription = $this->stripe->subscriptions->create([
'customer' => 'cus_QF4fffIQ7uDq5M',
'trial_end' => 1721374371, // 2024.07.19
'billing_cycle_anchor' => 1721114268, // 2024.08.15
'description' => 'Monthly Fixed with Trial',
'items' => [
[
'price' => 'price_1PL73iQeTVnMyqsf7VZ3cfU0' // Subscription full price โ‚ฌ90
]
],
'add_invoice_items' => [
[
'price' => 'price_1PMXO5QeTVnMyqsf8sLUBH0Q', // Trial charge for โ‚ฌ45
'quantity' => 1,
],
],
], ['stripe_account' => $siteData->StripeAccountId]);

So I understand the schedule but not sure how I do schedule and achieve the other items thats contained in the "subscription-create" - like the invoice items?

sharp raft
#

You can achieve that using Subscirption scheduler APIs

cursive rivet
#

๐Ÿ˜Ž Wow thanks I didn't see the add invoice in the schedule part - wow great thanks let me code that and test !! thanks again