#Chris M - Subscription Schedules

1 messages · Page 1 of 1 (latest)

rapid dock
#

Hello! What issue are you running into?

tame gale
#

Not quite sure how I would set up the sort of thing that I mentioned
In the past I've tackled one-time payments and also recurring payments, but I need to be able to have a single payment up front, and then a recurring payment after that for a different amount

#

Do I just add a second price object into the "phases" array of the schedule setup?

rapid dock
#

That will add a one-time Price to the first Invoice for that phase, which is your initial $10.

tame gale
#

So in the phases array, it would be a price object for the upfront cost under "add_invoice_items", and then another price object for the recurring costs under "items"?

rapid dock
#

Yep!

tame gale
#

So something like:

"phases" => [
[
"add_invoice_items" => [
[
"price" => $upfrontStripePrice->id
],
]
],
[
"items" => [
[
"price" => $recurringStripePrice->id
],
]
],
],

#

where the $upfrontStripePrice object does not have any recurring info and $recurringStripePrice does?

#

Not sure if I structured that set of arrays right

rapid dock
#

Yep, you're on the right track assuming the array structure is correct.

tame gale
#

if I have the start_date set to "now", then, it will do that first phase immediately, wait the recurring phase's time, then start charging the recurring amount? It will know to wait between phase 1 and 2?

rapid dock
#

If the recurring Price is in the first phase it will apply to the first phase, but yes the rest of what you said is correct.

tame gale
#

So $upfrontStripePrice is, for example, $10
And $recurringStripePrice is, let's say, $1 every 2 weeks

It would just $10 today
Then in 2 weeks it would charge $1
Then in another 2 weeks it would charge $1, and so on?

rapid dock
#

No, it would be $11 now ($10 once + the first $1 bi-weekly payment).

tame gale
#

Hmm, okay, how can I push back that second phase to start 2 weeks after the first one?

rapid dock
#

Let's back up a bit... can you describe the payment schedule you want?

tame gale
#

The way we describe it is "Upfront cost w/ recurring payments". The client can choose a schedule, an upfront cost, and a recurring cost

The client's customer pays the initial cost, then one iteration of the schedule later they start pay the recurring amount, and it continues to charge the recurring amount on the recurring schedule (for example every 2 weeks)

#

So ideally I'd like $10 now, wait 2 weeks, $1, wait 2 weeks, $1, etc

rapid dock
#

Okay, so I don't think you actually need Subscription Schedules for this. You can create a Subscription with a $10 one-time Price in add_invoice_items, the $1 recurring Price in items, and a two-week trial period.

tame gale
#

Seems similar to a schedule... If I took the one-time payment, re-added the recurring values, and then change 'type" to "one_time" would it then charge it, wait, then continue to the next phase?

rapid dock
#

Sorry, not sure I understand. What does "re-added the recurring values" mean? And change type where?

tame gale
#

My understanding with a schedule was that it sort of book-ended a number of subscriptions one after the other - once one subscription/phase ended, the next began - is that not the case?

rapid dock
#

That is the case, but I'm saying you don't need a Subscription Schedule at all.

#

You can get the one-time payment followed by recurring payments behavior with just a Subscription.

tame gale
#

Might make my implementation details a little easier, as some of our other payment scheduling options operate off schedules rather than subscriptions.
I acknowledge that I don't need a schedule, but if it fits out models better would it do the job equally well?

rapid dock
#

Yeah, you can use whichever you want. Most people avoid Subscription Schedules if they don't need them due to their complexity.

#

So with the Subscription Schedule you need to have a recurring Price in each phase's items, which means you can deal with the first phase having no recurring payment due in one of two ways: use a trial, or use a zero-amount recurring Price.

#

Either should work, it's up to you which best suits your needs.

#

That way you get $0 recurring, $10 once in the first phase, then in later phases you can have just the $1 recurring.

tame gale
#

So first phase charges $10 once, waits two weeks, then second phase kicks in infinitely?

rapid dock
#

Yep, you can configure it to do that.

tame gale
#

Would it also work if I just added an end_date to my first phase and kept the price under "add_invoice_items"?

rapid dock
#

Can you show me an example of the API parameters you mean?

tame gale
#

'start_date' => $now,
"phases" => [
[
"add_invoice_items" => [
[
"price" => $upfrontStripePrice->id
],
],
"end_date" => $nowPlusintervalAmount,
],
[
"items" => [
[
"price" => $recurringStripePrice->id
],
]
],
],

rapid dock
#

That won't work. items is required in each Phase.

tame gale
#

Ah, I see

rapid dock
#

I mentioned this above:

#

So with the Subscription Schedule you need to have a recurring Price in each phase's items, which means you can deal with the first phase having no recurring payment due in one of two ways: use a trial, or use a zero-amount recurring Price.

tame gale
#

How do I do the latter: having a zero recurring price (separate from "unit_amount")?

rapid dock
#

You create a recurring Price for $0.

#

Does that make sense?

#

You would create it the same way you created your $1 recurring price, except it would be for $0 instead.

tame gale
#

I was confused and going to ask "But won't it then just charge $0 instead of $10", but am I also adding a separate, third price object under "add_invoice_items" for the $10?

rapid dock
#

There will be two Prices used in the first phase: $10 one-time, $0 recurring. There will be a single Price used in the next phase(s): $1 recurring.

tame gale
#

So:

         "phases" => [
            [
                "add_invoice_items" => [
                    [
                        "price" => $upfrontStripePrice->id
                    ],
                ],
                "items" => [
                    [
                        "price" => $emptyStripePrice->id
                    ],
                ],
            ],
            [
                "items" => [
                    [
                        "price" => $recurringStripePrice->id
                    ],
                ]
            ],
        ],
rapid dock
#

Yep.

tame gale
#

$empty and $recurring need "recurring" data, while $upfront does not, right?

rapid dock
#

Yep.

tame gale
#

Ah, great!

#

Thanks so much, and sorry the miscommunications and weird ruts I placed myself in :P