I have got the same error:
const paymentMethod = await stripe.paymentMethods.create({
type: 'card',
card: { token: paymentToken },
});
const paymentIntent = await stripe.paymentIntents.create({
amount: amount * 100, // Convert to cents
currency: currency,
payment_method: paymentMethod.id,
confirm: true, // Auto-confirm the payment
transfer_data: {
destination: stripeAccountId, // Route payment to the connected account
},
});
But my token come from google pay and look valid can u help ?
ERROR Error: PaymentIntent creation failed: Invalid token id: {
"id": "tok_...",
"object": "token",
"card": {
"id": "card_...",
"object": "card",
"address_city": "City",
"address_country": "FR",
"address_line1": "address",
"address_line1_check": "unchecked",
"address_line2": null,
"address_state": null,
"address_zip": "zip",
"address_zip_check": "unchecked",
"brand": "MasterCard",
"country": "FR",
"cvc_check": null,
"dynamic_last4": "0000",
"exp_month": 12,
"exp_year": 2030,
"funding": "debit",
"last4": "0000",
"metadata": {},
"name": "First Last",
"networks": {
"preferred": null
},
"regulated_status": "unregulated",
"tokenization_method": "android_pay",
"wallet": null
},
"client_ip": "ip...",
"created": 1741786387,
"livemode": true,
"type": "card",
"used": false
}