当我调用条带退款 API 时,成功退款后我收到以下数据。我需要将此交易的收据发送给用户。
来自 Stripe 文档:
receipt_number是出现在为此退款发送的电子邮件收据上的交易编号。
我收到receipt_number 为空。
const refund = await stripe.refunds.create({
charge: payment.strip.chargeId,
amount: refundAmount * 100,
});
response:
{
"id": "re_3K0N3qGRxQkYXSuu2S7aM0jl",
"object": "refund",
"amount": 4000,
"balance_transaction": "txn_3K0N3qGRxQkYXSuu2kjkWM1p",
"charge": "ch_3K0N3qGRxQkYXSuu2BqK8PLo",
"created": 1638005716,
"currency": "usd",
"metadata": {},
"payment_intent": "pi_3K0N3qGRxQkYXSuu2t1S1xl5",
"reason": null,
"receipt_number": null,
"source_transfer_reversal": null,
"status": "succeeded",
"transfer_reversal": null
}