#Reyansh Sharma
1 messages · Page 1 of 1 (latest)
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]
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.
Yes so doing something wrong while creating SetupIntent (Setup PaymentMethodTypes as "card", "card_present", "acss_debit"
Can you share the ID of the Setup Intent that you're referring to?
Let me create a new one on test
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?
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.
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.
- Create a customer + a subscription (Don't know the payment method at the moment)
- Creating a setupIntent for the newly created customer so can create a payment method & attach it to the customer.
- 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.
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.
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?
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).
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.
Let me check if I can do that off the terminal. Was doing some stuff through terminal.
Sounds good!