Get Balance Transaction by Resource
GET /balance-transactions/resource
Overview
Retrieves the balance transaction details associated with a specific resource type and ID, such as a payment intent or payout.
Authorization
- Header:
Authorization: Bearer sk_test_907...de66
Request Details
Request
- cURL
curl "https://api-prod.paybytoken.io/balance-transactions/resource?resource_type=payment_intent&resource_id=pay_pdICAC1vp3WkAKof4QkM" \
-X GET \
-H "Authorization: Bearer sk_test_907...de66"
Request Parameters
| Parameter | Type | Description |
|---|---|---|
resource_type | string | Type of the associated resource (e.g., payment_intent, max 30 characters). |
resource_id | string | ID of the associated resource (e.g., pay_pdICAC1vp3WkAKof4QkM, max 45 characters). |
Response Details
Response
The response returns a BalanceTransaction object containing the transaction details linked to the specified resource. See Balance Transactions Overview for the full object definition.
Example Response
- Success
{
"id": "btx_pdMf5r3updqUKflE",
"account_id": "p226968785",
"balance_id": "bal_ofK07A66lSdtbXIa",
"amount": "5.0",
"currency": "USDC",
"chain": "base",
"description": null,
"fee": "0.025",
"net": "4.975",
"fee_details": [
{
"type": "service_fee",
"currency": "USDC",
"description": "Service fee for payment intent",
"amount": "0.025"
},
{
"type": "network_fee",
"currency": "USDC",
"description": "Network fee for payment intent",
"amount": "0.0"
}
],
"type": "credit",
"resource_type": "payment_intent",
"resource_id": "pay_pdICAC1vp3WkAKof4QkM",
"created_at": "2025-09-25T10:35:10.000Z",
"updated_at": "2025-09-25T18:35:10.000Z"
}
Errors
| HTTP Status | Error Code | Description |
|---|---|---|
| 404 | 404 | No transaction found for the resource. |
| 400 | 400 | Invalid resource type or ID. |
| 500 | 500 | Internal server error. |