sepa_debit 条纹订阅的付款方式无效
sepa_debit payemnt method with stripe subscriptopn doesn't work
我将 Stripe 与 react-native 一起使用,我想按照 tutorial
中所述将 PaymentIntent 与 Subscription 集成
问题是我无法在 front-end 中将 SEPA
显示为有效的付款选项。
Stripe 在他们的 subscription API docs 中提到您可以像在 payment_intent
中那样传递 payment_method_types
。然而,它似乎不起作用!
让我举例说明
- 第一个场景使用常规 payment_intent
const paymentIntent = await stripe.paymentIntents.create({
amount: 1099,
currency: 'EUR',
customer: customer.id,
payment_method_types: ["card", "sepa_debit"]
});
return res.json({
// @ts-ignore
paymentIntent: paymentIntent.client_secret,
ephemeralKey: ephemeralKey.secret,
customer: customer.id,
});
结果就像您看到的 SEPA 选项一样
- 第二种情况,当我使用订阅时
const subscription = await stripe.subscriptions.create({
customer: customer.id,
items: [{
price: "price_1JwZ4tJyYehXW8ayueOKGDUM",
}],
payment_settings: {
payment_method_types: ["card", "sepa_debit"]
},
payment_behavior: 'default_incomplete',
expand: ['latest_invoice.payment_intent'],
});
return res.json({
// @ts-ignore
paymentIntent: subscription.latest_invoice.payment_intent.client_secret,
ephemeralKey: ephemeralKey.secret,
customer: customer.id,
});
结果就像(没有 SEPA 选项)
知道为什么 sepa_debit
使用 payment_intent 而不是订阅吗?
我将 Stripe 与 react-native 一起使用,我想按照 tutorial
中所述将 PaymentIntent 与 Subscription 集成问题是我无法在 front-end 中将 SEPA
显示为有效的付款选项。
Stripe 在他们的 subscription API docs 中提到您可以像在 payment_intent
中那样传递 payment_method_types
。然而,它似乎不起作用!
让我举例说明
- 第一个场景使用常规 payment_intent
const paymentIntent = await stripe.paymentIntents.create({
amount: 1099,
currency: 'EUR',
customer: customer.id,
payment_method_types: ["card", "sepa_debit"]
});
return res.json({
// @ts-ignore
paymentIntent: paymentIntent.client_secret,
ephemeralKey: ephemeralKey.secret,
customer: customer.id,
});
结果就像您看到的 SEPA 选项一样
- 第二种情况,当我使用订阅时
const subscription = await stripe.subscriptions.create({
customer: customer.id,
items: [{
price: "price_1JwZ4tJyYehXW8ayueOKGDUM",
}],
payment_settings: {
payment_method_types: ["card", "sepa_debit"]
},
payment_behavior: 'default_incomplete',
expand: ['latest_invoice.payment_intent'],
});
return res.json({
// @ts-ignore
paymentIntent: subscription.latest_invoice.payment_intent.client_secret,
ephemeralKey: ephemeralKey.secret,
customer: customer.id,
});
结果就像(没有 SEPA 选项)
知道为什么 sepa_debit
使用 payment_intent 而不是订阅吗?