#amer-paymentintent

1 messages · Page 1 of 1 (latest)

flat sequoia
past fulcrum
#

Exactly that what i thought so i add the api request to
charge = Stripe::PaymentIntent.create({
amount: total_amount,
currency: 'usd',
customer: user.stripe_id,
payment_method: s_payment_source,
description: "Reservation ##{self.id}, Charge for #{item.item_name} reservation"
})
Now im getting this error
The payment_method parameter supplied card_1KcIiXITest belongs to the Customer cus_L2VTrTest. Please include the Customer in the customer parameter on the PaymentIntent.

#

@flat sequoia ^

flat sequoia
#

have you tried following the instructions from the error message? What is the customer id which you're providing in customer and does that match what the error message mentioned i.e. cus_L2VTrTest?

past fulcrum
#

Now it's back to Status Incomplete
The customer has not completed the payment.

This is the api request im sending:
{
"amount": "143",
"currency": "usd",
"customer": "cus_KzVSeBvmTest",
"payment_method": "card_1KJWYVITest",
"description": "Reservation #478, Charge for Feb 1a reservation"
}

#

@flat sequoia ^

flat sequoia
#

i'm guessing that the next step is that you need to confirm the payment

past fulcrum
#

how

#

@flat sequoia can be auto confirmed

flat sequoia
#

if you include confirm=true in your request, the payment would be automatically confirmed