#Wik

1 messages · Page 1 of 1 (latest)

tribal mesaBOT
broken rampart
#

Hi there!

#

Can you clarify what you mean by "I'm copying a subscription between two Stripe accounts"?

sly frigate
#

Our comapny has two Stripe accounts: A and B. A customer has a subscription in A, now we want to copy it to B. We need to keep the proration behaviour from the subscription that exists in account A.

broken rampart
#

And what do you mean by "proration behaviour"?

sly frigate
vagrant mesa
#

👋 taking over for my colleague. Let me catch up.

#

just to clarify something, proration behavior is not something that is stored on the subscription object. meaning that if you do a change on the subscription (upgrade/downgrade, change quantity, etc.) and you apply a proration this would only apply to this specific change

sly frigate
#

Ah, got it.

#

One more question if I may

vagrant mesa
#

yes go ahead

sly frigate
#

Let's say there is a monthly subscription that was started on the 1st of November. It has collection_method = send_invoice. On 15th November, I want to copy it to the other account. I want the date when the user will be sent invoice to remain unchanged. I want the new subscription to have the correct start_date = 1st November.

For subscriptions with collection_method = charge_automatically, I do it the following way and it works correctly. But when I do it foe send_invoice, I can see that there was an additional invoice for the time between now and backdate_start_date. I do not want to create any invoice for that period of time. User should only be invoiced for the next period, starting on 1st December. Example subscription that was incorrectly copied over: sub_1LzduLJA8pMPzFjlv4jDGj80

      billing_cycle_anchor: subscription.current_period_end.to_i,
      backdate_start_date: subscription.current_period_start.to_i,
      proration_behavior: "none",
      collection_method: au_stripe_subscription.collection_method,
      days_until_due: au_stripe_subscription.days_until_due,
      trial_end: au_stripe_subscription.trial_end,
      plan: subscription.plan_id,
      coupon: coupon_id,
      cancel_at_period_end: subscription.cancel_at_period_end
    )```
vagrant mesa
#

why not just start the subscription on the next cycle?

#

I'm thinking of a solution here

sly frigate
#

I'm not sure if I understand

#

The users paid for access for the whole cycle

#

Their subscription has to be active in the new stripe account as they have to have access to the app

sly frigate
#

I think I figured it out; I can create the subscription in the new account with auto collection method and then update it to send invoice

vagrant mesa
#

sorry again, I got side-tracked with all the other discord threads

#

I'm terribly sorry,

#

what I meant is that since you already have given access to your customer for your subscription for that cycle you can really start with the next cycle with the new subscription

vagrant mesa
sly frigate
sly frigate
gritty star
#

Hey, taking over here. Let me know if there's any follow-up Qs I can answer!