#Reyansh Sharma

1 messages · Page 1 of 1 (latest)

cunning vortexBOT
merry maple
#

Though while calling collectPaymentMethod with the invoice.ClientSecret (From the invoice paymentIntent.ClientSecret ) getting the exception [The PaymentMethod provided (card_present) is not allowed for this PaymentIntent]

bitter coral
#

HI 👋 taking a look, what I'm seeing so far is that you're trying to provide a card_present payment method in the confirmation request, but that the Payment Intent only has card and acss_debit listed as payment_method_types that it is expecting to receive.

merry maple
#

Yes so doing something wrong while creating SetupIntent (Setup PaymentMethodTypes as "card", "card_present", "acss_debit"

bitter coral
#

Can you share the ID of the Setup Intent that you're referring to?

merry maple
#

Let me create a new one on test

bitter coral
#

Sorry, I thought you already had one. I'm not sure I understand the flow that you're trying to build, could you help clarify what the overall goal that you're trying to achieve is?

merry maple
#

seti_1M9UGfIXPl35VUO6PbHYqZ46

#

& client_secret seti_1M9UGfIXPl35VUO6PbHYqZ46_secret_MtGosTZoc8RTIHdmia97Xuos7tDPpqM

#

So goal is to create a subscription & chanrge the customer with first invoice.

#

Using backend approach + Terminal JS to swipe the card on device.

bitter coral
#

Gotcha, I'm not sure off-hand if you can use terminal to directly process a payment for an Invoice, and will need to take some time to look into that.

merry maple
#
  1. Create a customer + a subscription (Don't know the payment method at the moment)
  2. Creating a setupIntent for the newly created customer so can create a payment method & attach it to the customer.
  3. Passing setupintent .client secret to terminalJS & using [collectSetupIntentPaymentMethod ] then [confirmSetupIntent] to attach card to customer.
#

After that trying to charge the customer for first invoice.

bitter coral
#

What you described there is the approach I was thinking you would need to use, but that doesn't seem to align with the request that you shared. In that request, it looks like you're trying to confirm the Invoice's Payment Intent directly from your Terminal integration.

merry maple
#

Yes to charge trying to use terminal.processPayment

#

and collectPaymentMethod

bitter coral
#

Sorry, I'm not sure I'm following. Above, where you listed out the steps, in Step 3 you mentioned using terminalJS to complete the Setup Intent. Is that part of this flow?

merry maple
#

Yes

#

After completing the setup intent I am trying to charge the customer for an invoice (Expecting the payment method attached to the customer in last step).

bitter coral
#

Alright, confirming the Setup Intent should have created a new Payment Method attached to the customer that you were using. I believe at that point you're done with the Terminal side of this flow. Then you can interact with the standard Stripe API to find the newly created Payment Method and use it for the Invoice.

merry maple
#

Let me check if I can do that off the terminal. Was doing some stuff through terminal.

bitter coral
#

Sounds good!