#KRS

1 messages · Page 1 of 1 (latest)

tight coyoteBOT
ivory pine
cosmic adder
#

Is there any way that i can do it in the create subscription flow? Our current steps are

  1. Create customer
  2. Create subscription with required price ids
  3. Check if invoice is paid, if not paid, then pay it
  4. Create subscription reference in our system after successful invoice paid
#

all these steps happen in a single API, is it possible to introduced this new item at step 3, before we pay?

#

what i understand is that at the step (3) the invoice status is open, which cannot be modified

ivory pine
#

That's why I suggest you to listen to invoice.created event, the invoice is still in draft mode, and you can still update it.

cosmic adder
#

both event occured at the same time

#

1/18/23, 11:55:39 PM

ivory pine
#

Oh, that's the first invoice that was generated when the subscription is created.

cosmic adder
#

yes,

ivory pine
cosmic adder
#

but that is not accepting negative amounts

#

A positive integer in cents (or 0 for a free price) representing how much to charge.

#

I tried this approach - create an invoice item before creating the subscription associated with customer having negative amount. And then create a subscription, which included the previously created invoice item in to the first invoice. Is this approach valid? Can i use it?

ivory pine
#

Yes, this is definitely a solution. You've found an answer by yourself!

cosmic adder
#

ok. thanks.

cosmic adder
#

If you still around, i have another question regarding one off transfer from connected account to platform account. I see there are 2 options - Transfers and Charges. Any specific differences between them?

ivory pine
cosmic adder
#

I want to understand the difference between stripe.Transfer.create and stripe.Charge.create

ivory pine
#

Can you share with me the doc that you are following?

cosmic adder
#

My requirement it i want to take money from the connect account to platform account on certain scenarios

ivory pine
#

OK. then you should use the account debit (i.e., the charges API)

#

The transfers API is to transfer funds from platform to connected account

cosmic adder
#

ok, got it. thanks.