You can use an invoice item to charge for the setup fee : https://stripe.com/docs/billing/invoices/subscription#first-invoice-extra and then set a trial period to the 1st of the month in order to delay the plan payment until then. Here's an example in Node :
// create customer and payment method
let customer = await stripe.customers.create({
email: "[email protected]",
});
let pm = await stripe.paymentMethods.attach("pm_card_visa", {customer: customer.id});
// add a floating item for the setup fee, will be charged in the first invoice
let item = await stripe.invoiceItems.create({
customer: customer.id,
amount : 1000,
currency : "usd",
description: "Setup fee"
})
let subscription = await stripe.subscriptions.create({
customer: customer.id,
default_payment_method : pm.id,
//set the subscription plan on trial until start of next month
trial_end : moment().add(1, 'months').startOf('day').unix(),
items: [
{
plan: "plan_GVHFF1ESMXZ7CN", // $10 plan
},
],
expand : ["latest_invoice"]
});
You can see it charges the customer a $10 invoice now, and then the upcoming one in February is the $10 of the pricing plan.
