#_greggles_
1 messages · Page 1 of 1 (latest)
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.
- greggles-paymentelement-country, 1 day ago, 22 messages
Hello! Do you see any errors or information in the web developer console when this happens?
Can you share the code you're using to confirm the Intent?
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.
So when this runs both error and paymentIntent are empty?
Yes
Is this in React Native?
Where is confirmIntent coming from? That's not a Stripe function.
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.
Ah, so is it for a Setup Intent and you're not extracting the setupIntent?
Actually it is a payment I'm trying to confirm, not a setup
I'm using this documentation
https://stripe.com/docs/payments/accept-a-payment-deferred?platform=web&type=subscription#confirm-the-subscription
Can you try it with stripe.confirmPayment directly instead of using confirmIntent?
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?
Not sure I understand. Can you provide more details?
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?
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.
It looks like Anrok is adding tax to Invoices using Credit Notes, which is an... interesting approach: https://stripe.com/docs/api/credit_notes