#lmulvey_subscription-defaultpm

1 messages ยท Page 1 of 1 (latest)

forest garnetBOT
#

๐Ÿ‘‹ 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/1233521309934293032

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

tender prawnBOT
brisk smelt
#

Here's our .subscriptions.create(). call:

stripe.subscriptions.create({
    collection_method: "charge_automatically",
    customer: stripeCustomerId,
    // sets the subscription to incomplete so we can collect payment
    payment_behavior: "default_incomplete",
    payment_settings: {
      // save the payment method to the subscription for future use
      save_default_payment_method: "on_subscription",
      // allow the customer to pay with any of these payment methods
      payment_method_types: ["card", "ach_debit", "us_bank_account"],
    },
    // define the plan and the setup fee line items
    items: [
      {
        price: config.PRICES.PLAN,
        quantity: 1,
      },
    ],
    // send new invoices monthly if charges are incurred
    pending_invoice_item_interval: {
      interval: "month",
      interval_count: 3,
    },
    // do not prorate when adding new vendors
    proration_behavior: "none",
    // apply the promotion code if one was provided
    promotion_code: promotionCode,
    // enable automatic tax calculation
    automatic_tax: { enabled: true },
    // capture metadata for our system to quickly lookup subscriptions
    metadata: {
      companyVendorId: companyVendor.id,
      vendorId: companyVendor.vendorId,
    },
    expand: ["latest_invoice.payment_intent", "pending_setup_intent"],
  });
pure onyx
#

lmulvey_subscription-defaultpm

#

looking!

#

Okay not finding much just yet but trying to reproduce locally

brisk smelt
#

Thanks!

pure onyx
#

Okay I just tried a simple repro and it works fine for me. Now trying to figure out what's different between my requests and yours

brisk smelt
#

Sure! Let me know if you need anything else from me.

#

This is our confirmPayment call, if it helps:

    const { error, paymentIntent } = await stripe.confirmPayment({
        elements,
        redirect: 'if_required',
        confirmParams: {
          // Make sure to change this to your payment completion page
          return_url: window.location.href,
        },
      });
pure onyx
#

thanks! I looked at my code and it's near the same as yours. I'm digging into our own logs to figure out what's happening

#

Okay I think it's a bug on our end, we're investigating. Might take a bit of time though

brisk smelt
#

Understandable! Once the bug is fixed, is there an easy way to retroactively attach the payment from the first invoices in all those subscriptions as the default?

#

I'm expecting no... just hoping there's a quick way to fix that or at the very least mass-send out Payment Update emails.

pure onyx
brisk smelt
#

Is there a ticket # I can use to follow up with them? Or can I follow up with you next week to see what the progress is on fixing the underlying issue? I just want to make sure there's continuity here so I don't need to re-explain everything to Support ๐Ÿ‘€

pure onyx
#

let me know once you have written in and I can find that ticket and make sure the right person looks at it

#

(deleted your message as the server is public and it had your real email)

brisk smelt
#

(Thanks!)

#

I realized that after I sent it ๐Ÿคฆ๐Ÿปโ€โ™‚๏ธ

pure onyx
#

okay found your email and made sure someone on our support team can follow up