#litterboks_subscription-one-time-item

1 messages · Page 1 of 1 (latest)

lament hareBOT
molten swallowBOT
#

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.

lament hareBOT
#

👋 Welcome to your new thread!

⏲️ We'll be here soon! Typically we respond in a few minutes, but sometimes we might take a bit longer if the server is busy or if you have a particularly tricky question.

⏱️ We close idle threads, which makes them read-only. Once a thread is closed it won't be reopened, but you can always 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/1240241336666423350

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

plucky patio
#

Yeah you only want the one-time item on the initial invoice, right?

burnt peak
#

yes

plucky patio
#

And then the recurring items are still pased to items

burnt peak
#

ok, ill try that out real quick

lament hareBOT
#

litterboks_subscription-one-time-item

burnt peak
#

hmm i cant seem to get it to work with cashier, can you help with this or is it outside of your service

plucky patio
#

I can try to help sure. What specifically do you mean by 'can't get it to work'?

burnt peak
#
    /**
     * @throws IncompletePayment
     */
    public function createSubscriptionWithInvoice(string $title, Collection $priceIds, Collection $oneTimePriceIds, Order $order, ?string $voucher = null): void
    {
        $order->user->newSubscription($title, $priceIds->toArray())
            ->withPromotionCode($voucher)
            ->withMetadata(['order_id' => $order->id])
            ->createAndSendInvoice();
    }```

This is the code i am currently using.
The priceIds are the ones for the subscriptions, they are passed in the newSubscription function. this is the one where i cannot use one time prices.
However i don't know how i can add the 'add_invoice_items' to this
plucky patio
#

Otherwise you might need to speak to Laravel directly cc @neat obsidian

burnt peak
#

Thanks i got it

#

it was what you said! great help!