#blacknight-payment-error

1 messages · Page 1 of 1 (latest)

tawny chasm
thin anchor
#

"status":400,"message":"This PaymentIntent could not be captured because it has a status of requires_payment_method. Only a PaymentIntent with one of the following statuses may be captured: requires_capture.

#

I'm not sure what this error means

tawny chasm
#

That means that you either (a) haven't attached a payment method to the payment intent or (b) the customer attached to the payment intent doesn't have a payment method

thin anchor
#

Let me show the code for which I'm making the intent

#

params := &stripe.PaymentIntentParams{
Amount: stripe.Int64(int64(amount)),
Currency: stripe.String(string(stripe.CurrencyCAD)),
Description: &desc,
Customer: &customer.ID,
}
charge, err := paymentintent.New(params)

#

Is there anything I should add for this. thanks

tawny chasm
#

You need to make sure the customer has a valid payment method attached before this step

thin anchor
#

yes he does that's how we capture the payment intent through their credit cards.

tawny chasm
#

Okay, but the error indicates that they do not.

#

Can you share the Payment Intent ID and the Customer ID?

thin anchor
#

this is a test account of the stripe for developers.

#

sort of like our staging server were we do our testing

tawny chasm
#

Sure thing. There should still be test Customer and test Payment Intent IDs though, so do you have access to those?

thin anchor
#

Yes I gotta look through our database for those!

tawny chasm
#

You should be able to view that through the Stripe Dashboard as well, if that's easier. Just let me know when you find them