检索余额交易
返回构成 Stripe 账户余额的交易(例如扣款、转账、款项支付和退款)。Stripe 按时间倒序列出这些交易,最近的条目显示在最前面。
GET https://api.stripe.com/v1/balance_transactions/{id}
示例
cURL 示例:
cURL
curl -X GET https://api.stripe.com/v1/balance_transactions/tr_1234567890 \
-u <YOUR_SECRET_KEY>:
响应
响应返回标准代码。
200: OK
Response
{
"object": "balance_transaction",
"id": "tr_1234567890",
"amount": 1000,
"currency": "usd",
"description": "Payment for invoice",
"fee": 59,
"fee_details": [
{
"amount": 59,
"currency": "usd",
"description": "Stripe processing fees",
"type": "stripe_fee"
}
],
"net": 941,
"status": "available",
"type": "charge"
}
错误响应
400: Bad Request
Response
{
"error": {
"message": "If passing an array with explicit keys (e.g. foo[0]=a&foo[1]=b) instead of as an array (e.g. foo[]=a&foo[]=b), the keys must be numeric and sequential starting from 0. You passed the keys `1`, we expected to have a key with the value `0`.",
"param": "expand",
"request_log_url": "https://dashboard.stripe.com/test/logs/req_kCeAL5FAly5bkh?t=1734734555",
"type": "invalid_request_error"
}
}
401: Unauthorized
Response
{
"error": {
"type": "invalid_request_error",
"message": "Invalid API Key provided: sk_test_********************1234"
}
}
参数
查询参数
| 参数 | 类型 | 说明 |
|---|---|---|
expand[] | 字符串数组 | 用于标识需要进行数据增强并内联返回的嵌套响应对象。 |
路径变量
| 名称 | 类型 | 必填 | 说明 |
|---|---|---|---|
id | 字符串 | 必填 | 路径变量标识符 |