Magento 2 + Stripe Payments (Official Module): Order Placement Fails After Successful 3DS Payment

I’m using the official stripe/stripe-payments module in a Magento 2 store (GraphQL frontend integration). Stripe 3D Secure payments are working correctly on the frontend but Magento’s placeOrder mutation fails, even though the payment is shown as successful in the Stripe dashboard.
No saved cards — just a one-time payment.

Steps I Followed

  1. Selected Stripe as the payment method:
mutation SetPaymentMethodOnCart($cartId: String!, $code: String!) {
  setPaymentMethodOnCart(
    input: {
      cart_id: $cartId
      payment_method: { code: "stripe_payments" }
    }
  ) {
    cart {
      selected_payment_method {
        code
      }
    }
  }
}
  1. On the frontend, called:
const result = await stripe.confirmCardPayment(clientSecret, {
  payment_method: {
    card: cardElement,
    billing_details: {
      name: 'John Doe',
      email: 'john@example.com'
    }
  }
});
✅ This succeeds. The payment is shown as status: "succeeded" in Stripe Dashboard.
✅ I obtain a paymentIntent.id = pi_3RdXYZ...
  1. Then I updated the payment method with the PaymentIntent ID:
mutation SetPaymentMethodOnCart(
  $cartId: String!
  $code: String!
  $stripe_payments: StripePaymentsInput
) {
  setPaymentMethodOnCart(
    input: {
      cart_id: $cartId
      payment_method: {
        code: $code
        stripe_payments: {
          payment_method: "pi_3RdXYZ..."
        }
      }
    }
  ) {
    cart {
      selected_payment_method {
        code
      }
    }
  }
}

(Note: Using payment_method field because payment_intent_id is not available in the GraphQL schema.)

  1. Then I call mutation { placeOrder(cartId: "...") }

❌ Problem
The placeOrder mutation fails with the following error:

{
  "message": "Unable to place order: No such PaymentMethod: 'pi_3RdXYZ...'",
  "extensions": {
    "category": "graphql-input"
  }
}

I also tried with payment_method_id:

mutation SetPaymentMethodOnCart(
  $cartId: String!
  $code: String!
  $stripe_payments: StripePaymentsInput
) {
  setPaymentMethodOnCart(
    input: {
      cart_id: $cartId
      payment_method: {
        code: $code
        stripe_payments: {
          payment_method: "pm_3RdXYZ..."
        }
      }
    }
  ) {
    cart {
      selected_payment_method {
        code
      }
    }
  }
}

this time I got below error

"message": "Unable to place order: The provided PaymentMethod was previously used with a PaymentIntent without Customer attachment, shared with a connected account without Customer attachment, or was detached from a Customer. It may not be used again. To use a PaymentMethod multiple times, you must attach it to a Customer first.",