残高取引の取得
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 | 文字列 | 必須 | パス変数識別子 |