#ahmedmohamed24-subscriptins

1 messages · Page 1 of 1 (latest)

tawdry trench
#

hi! didn't I answer this earlier today?

wary sparrow
#

No, i was using stripe subscriptions, and you advised me to use scheduled subscriptions

tawdry trench
#

yep, since that is how you can implement installments.

wary sparrow
#

@tawdry trench I managed to handle it
but I want to process the first installment immediatly

tawdry trench
#

sounds good, what have you tried?

#

it's completely possible to implement things that way, you can create a subscription and start it as normal(to charge the first installment, and then migrate the subscription to a schedule after creation, as covered in the docs. You can also use a Schedule to create a Subscription immediately, that works too

wary sparrow
#

this example of my request

#
          "customer": "cus_ME1KvtGg3coCRn",
            "start_date": "now",
            "end_behavior": "cancel",
            "default_settings": {
                "application_fee_percent": 1,
                "default_payment_method": "card_1LVZO0FGAxI4c6sWSevbx11A",
                "transfer_data": {
                    "destination": "acct_1LS0e52UGjmIOYYZ"
                },
                "billing_cycle_anchor": "automatic"
            },
            "phases": [
                {
                    "items": [
                        {
                            "price_data": {
                                "unit_amount": 53200,
                                "currency": "cad",
                                "recurring": {
                                    "interval": "month"
                                },
                                "product": "prod_ME1glIEqHEzZsG"
                            }
                        }
                    ],
                    "iterations": 2
                }
            ]```
#

You can also use a Schedule to create a Subscription immediately, that works too
I want to accomplish this
any advice?

tawdry trench
#

you can create a schedule where the start_date of the first phase is 'now', which starts a subscription immediately.

wary sparrow
#

I've sent start_date:now and this didn't make it start

tawdry trench
#

what's the ID of the subscription schedule you created?

#

sub_sched_xxx I think is the format.

wary sparrow
#

sub_sched_1LVZiiFGAxI4c6sWayh2xMdl

tawdry trench
#

that did create a subscription, sub_1LVZiiFGAxI4c6sWqi1TScLS .

wary sparrow
#

I noticed that from the dashboard, but i don't know what does this mean

tawdry trench
#

do note that when creating a subscription this way, the first payment takes an hour to happen as we leave the first invoice open for an hour in a draft. You can force it to be paid immediately though if desired.

wary sparrow
#

why hadn't the subscription schedule started immediately?

wary sparrow
#

thanks
I got it

#

thanks for your time