как обновить заказ после завершения оплаты с помощью stripe api? или он автоматически обновляет статус заказа?
const orderRes = await stripe.orders.create({
currency: 'sgd',
email: data.email,
items: [
{type: 'sku', parent: 'sku_HcGEjGO64SyROm'},
{type: 'sku', parent: 'sku_HcI5uItX9vTpeF'},
],
shipping: {
name: 'Jenny Rosen',
address: {
line1: '1234 Main Street',
city: 'San Francisco',
state: 'CA',
country: 'US',
postal_code: '94111',
},
},
}
);
const paymentIntent = await stripe.paymentIntents.create({
amount: orderRes.amount,
currency: 'sgd',
payment_method_types: ['card'],
receipt_email: data.email
});