#_greggles_

1 messages · Page 1 of 1 (latest)

dawn sinewBOT
#

Hello! We'll be with you shortly. 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.

tiny basin
#

Hello! Do you see any errors or information in the web developer console when this happens?

zinc sable
#

No I don't.

#

cus_PW1JrJgpks1AWQ

tiny basin
#

Can you share the code you're using to confirm the Intent?

zinc sable
#
const {error, paymentIntent} = await confirmIntent({
        elements,
        clientSecret,
        confirmParams: {
          return_url: '<?= base_url(); ?>account/',
        },
        redirect: 'if_required'
      })
#

It's also a bit more complicated. We're in the process of implementing Anrok as our payment processor and they want us to send the tax over using the add_invoice_items when we create the subscription. On the first invoice, the tax is charged then a credit is issued.

tiny basin
#

So when this runs both error and paymentIntent are empty?

zinc sable
#

Yes

tiny basin
#

Is this in React Native?

zinc sable
#

Vanilla JavaScript

#

and PHP as my back end

tiny basin
#

Where is confirmIntent coming from? That's not a Stripe function.

zinc sable
#

I'm looking for the documentation I was using. One minute

#

I'm such an idiot.
const confirmIntent = type === "setup" ? stripe.confirmSetup : stripe.confirmPayment;

This is the line before the code block I posted above.

tiny basin
#

Ah, so is it for a Setup Intent and you're not extracting the setupIntent?

zinc sable
#

Actually it is a payment I'm trying to confirm, not a setup

tiny basin
#

Can you try it with stripe.confirmPayment directly instead of using confirmIntent?

zinc sable
#

Sure, just a second

#

That definitely worked, thank you.

#

in_1OhEpUGxG8m2870UokYaYJBb

#

Related to this is the tax item. Can the trial period also be applied to that?

tiny basin
#

Not sure I understand. Can you provide more details?

zinc sable
#

Sure, if you take a look at that invoice, a tax item for $2.59 is applied during the creation of the subscription using the add_invoice_items property. That tax item has a Stripe product ID. Anrok requires that for the first invoice and it is added automatically on subscription renewal. Can that amount be deferred in the same way a subscription price can be deferred by applying a trial period?

tiny basin
#

Sorry for the delay...

#

Normally if you apply a trial period the initial Invoice should be for $0, since the trial period is free and there's nothing to tax.

#

The line item you're asking about, though, was explicitly added to the Invoice by creating a Credit Note.

#

It's not calculated based on any existing amount or anything, so the trial period doesn't matter.