Lấy danh sách tất cả các khoản hoàn tiền liên kết với tài khoản của bạn.
import DodoPayments from 'dodopayments';
const client = new DodoPayments({
bearerToken: process.env['DODO_PAYMENTS_API_KEY'], // This is the default and can be omitted
});
// Automatically fetches more pages as needed.
for await (const refundListResponse of client.refunds.list()) {
console.log(refundListResponse.business_id);
}{
"items": [
{
"business_id": "<string>",
"created_at": "2023-11-07T05:31:56Z",
"is_partial": true,
"payment_id": "<string>",
"refund_id": "<string>",
"status": "succeeded",
"amount": 123,
"currency": "<unknown>",
"reason": "<string>"
}
]
}Bearer authentication header of the form Bearer <token>, where <token> is your auth token.
Get events after this created time
Get events created before this time
Page size default is 10 max is 100
x >= 0Page number default is 0
x >= 0Filter by status
succeeded, failed, pending, review Filter by customer_id
Hiện thuộc tính con
The unique identifier of the business issuing the refund.
The timestamp of when the refund was created in UTC.
If true the refund is a partial refund
The unique identifier of the payment associated with the refund.
The unique identifier of the refund.
The current status of the refund.
succeeded, failed, pending, review The refunded amount.
The currency of the refund, represented as an ISO 4217 currency code.
AED, ALL, AMD, ANG, AOA, ARS, AUD, AWG, AZN, BAM, BBD, BDT, BGN, BHD, BIF, BMD, BND, BOB, BRL, BSD, BWP, BYN, BZD, CAD, CHF, CLP, CNY, COP, CRC, CUP, CVE, CZK, DJF, DKK, DOP, DZD, EGP, ETB, EUR, FJD, FKP, GBP, GEL, GHS, GIP, GMD, GNF, GTQ, GYD, HKD, HNL, HRK, HTG, HUF, IDR, ILS, INR, IQD, JMD, JOD, JPY, KES, KGS, KHR, KMF, KRW, KWD, KYD, KZT, LAK, LBP, LKR, LRD, LSL, LYD, MAD, MDL, MGA, MKD, MMK, MNT, MOP, MRU, MUR, MVR, MWK, MXN, MYR, MZN, NAD, NGN, NIO, NOK, NPR, NZD, OMR, PAB, PEN, PGK, PHP, PKR, PLN, PYG, QAR, RON, RSD, RUB, RWF, SAR, SBD, SCR, SEK, SGD, SHP, SLE, SLL, SOS, SRD, SSP, STN, SVC, SZL, THB, TND, TOP, TRY, TTD, TWD, TZS, UAH, UGX, USD, UYU, UZS, VES, VND, VUV, WST, XAF, XCD, XOF, XPF, YER, ZAR, ZMW The reason provided for the refund, if any. Optional.
Trang này có hữu ích không?
import DodoPayments from 'dodopayments';
const client = new DodoPayments({
bearerToken: process.env['DODO_PAYMENTS_API_KEY'], // This is the default and can be omitted
});
// Automatically fetches more pages as needed.
for await (const refundListResponse of client.refunds.list()) {
console.log(refundListResponse.business_id);
}{
"items": [
{
"business_id": "<string>",
"created_at": "2023-11-07T05:31:56Z",
"is_partial": true,
"payment_id": "<string>",
"refund_id": "<string>",
"status": "succeeded",
"amount": 123,
"currency": "<unknown>",
"reason": "<string>"
}
]
}