#mckeemi_unexpected

1 messages ยท Page 1 of 1 (latest)

lyric quartzBOT
#

๐Ÿ‘‹ Welcome to your new thread!

โฒ๏ธ We'll be here soon! Typically we respond in a few minutes, but sometimes we might take a bit longer if the server is busy or if you have a particularly tricky question.

โฑ๏ธ We close idle threads, which makes them read-only. Once a thread is closed it won't be reopened, but you can always start a new thread if you have another question.

๐Ÿ”— This thread will always be available, even after it's closed. You can find it again using Discord's search, or you can save this link: https://discord.com/channels/841573134531821608/1230440105207136387

๐Ÿ“ Have more to share? Add more details, code, screenshots, videos, etc. below.

quiet emberBOT
#

Below are links to other discussions we've had with you in the past week in case you want to review that information. If your question is related to one of these previous discussions, please provide a comprehensive summary of the current state and what you need help with now. We help many users simultaneously, so a summary allows us to resolve your issue as soon as possible.

limber geyser
#

hi! not sure I follow. If you're creating a Schedule and saying "the first phase starts in a month" for example, there is no Subscription object created right now so there's no ID, that's all expected.

mellow pumice
#

I was thinking that, but what do I pass back to the front end so that I can load the elements and associate the card details entered with the future dated subscription?

limber geyser
#

well you can just directly create a SetupIntent for the Customer in question and then set invoice_setttings[default_payment_method] on the Customer after that SetupIntent completes

mellow pumice
#

Thank you that's great, really appreciate your help, will give that a go ๐Ÿ™‚

#

On the invoice_settings .default_payment_method, it says to enter the id of a payment method .... is that the setup_intent .id?

languid pewter
#

No, that's setup_intent.payment_method

mellow pumice
#

Thankyou

languid pewter
#

Happy to help.

mellow pumice
#

var options = new CustomerCreateOptions
{
Email = order.Email,
Name = $"{order.ContactFirstname} {order.ContactSurname}",
Description = descriptionMessage,
InvoiceSettings = new CustomerInvoiceSettingsOptions() { DefaultPaymentMethod = setupIntent.PaymentMethod.Id}
};

#

but setupIntent.PaymentMehtod came back as null?

#

var setupIntentOptions = new SetupIntentCreateOptions
{
PaymentMethodTypes = new List<string> { "card" },
};
var setupIntentService = new SetupIntentService();
SetupIntent setupIntent = await setupIntentService.CreateAsync(setupIntentOptions, requestOptions);

#

Will the paymentMethod not be created until after the frontend enters their card details and confirms?

mellow pumice
#

Ok I will have to change our flow, we created the subscription first previously which had the setup intent client secret to pass back but we are changing things as we think the schedules have a better fit, with our scenarios, so we'll have to confirm on the front end and call an api after to update the customer with those details. Is that correct?

languid pewter
#

I am not sure what you're trying to achieve on the high level so I can't say if this is a correct approach.

#

You can just create a Subscription and use the Subscription.latest_invoice.payment_intent.client_secret.