Unable to purchase credits: Stripe checkout fails before payment page opens
What issue are you seeing?
I am unable to purchase credits because the checkout/payment page does not open.
When I try to proceed to payment, the app returns the following Stripe-related error:
{
"detail": "Error communicating with Stripe: {
\"error\": {
\"message\": \"`To allow a payment method to be redisplayed, the payment method must be saved to the Customer. Use `payment_intent_data.setup_future_usage` or use setup or subscription mode to save the payment method to a Customer.`\",
\"request_log_url\": \"[REDACTED_STRIPE_REQUEST_LOG_URL]\",
\"type\": \"invalid_request_error\"
}
}"
}
It looks like the Stripe Checkout/PaymentIntent configuration may be trying to redisplay a payment method that has not been saved to a Customer.
What steps can reproduce the bug?
- Open Codex Web Panel.
- Go to the credits / billing / purchase credits flow.
- Select an option to buy credits.
- Click the button to continue to payment.
- Instead of being redirected to the Stripe payment page, the request fails with the Stripe error shown above.
I cannot complete the purchase because the checkout page never opens.
What is the expected behavior?
I expected to be redirected to the Stripe checkout/payment page and be able to complete the credit purchase.
The payment flow should either:
- create a valid checkout/payment session, or
- save the payment method to the Customer when redisplay is required, for example via
payment_intent_data.setup_future_usage, setup mode, or subscription mode.
Additional information
This appears to be a billing/payment integration issue rather than a local environment issue.
The error comes from Stripe and says:
To allow a payment method to be redisplayed, the payment method must be saved to the Customer.
I have redacted the Stripe request log URL because it may contain account/request-specific information.
This issue has 2 comments on GitHub. Read the full discussion on GitHub ↗