List balance entries
Cursor-paginated list of balance entries (the immutable ledger of every credit and debit that affects the caller’s balance). Ordered by occurredAt descending (newest first). Filter by scope, currency, bucket, entry type, status, or a time range.
curl -X GET "https://api.miracle.com/v1/balance-entries"{
"data": [
{
"id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
"tenantId": "f97df110-f4de-492e-8849-4a6af68026b0",
"livemode": true,
"scope": {
"level": "terminal",
"terminalId": "57e69e1b-2c00-4a26-b5e3-44617c6cc659"
},
"currency": "string",
"amount": {
"currency": "string",
"valueMinor": 0
},
"fee": {
"currency": "string",
"valueMinor": 0
},
"net": {
"currency": "string",
"valueMinor": 0
},
"feeDecomposition": {
"providerFee": {
"currency": "string",
"valueMinor": 0
},
"platformFee": {
"currency": "string",
"valueMinor": 0
},
"tenantFee": {
"currency": "string",
"valueMinor": 0
},
"partnerCommission": {
"currency": "string",
"valueMinor": 0
}
},
"direction": "credit",
"type": "payment",
"bucketType": "available",
"status": "pending",
"availableOn": "string",
"occurredAt": "string",
"source": {
"paymentId": "472e651e-5a1e-424d-8098-23858bf03ad7",
"refundId": "3324897f-393a-4bf6-b3af-0b999cbc2521",
"withdrawalRequestId": "cf251954-47d2-4ebf-b484-b27d67ced844",
"payoutId": "c3d65312-6575-43de-b8ae-728d8d0a9371",
"disputeId": "57331f1d-cb7c-4df0-89e4-ba6ba8d5fd8f",
"transferId": "e240f72a-b0bc-4f57-ab86-5b78f1d8ea9b",
"adjustmentId": "ded5406e-cf84-4ac8-a375-839db64ab188",
"providerSettlementId": "4a4691ea-ce21-4410-b5e8-6a262f513b5c",
"fundingAccountId": "2d58f397-b4d9-4f93-90cb-6efb6d145ec8",
"reference": "string"
},
"ledgerEntryIds": [
"497f6eca-6276-4993-bfeb-53cbbbba6f08"
],
"providerReference": "string",
"providerStatus": "string",
"metadata": {
"property1": "string",
"property2": "string"
},
"createdAt": "string",
"updatedAt": "string",
"deletedAt": null
}
],
"pagination": {
"nextCursor": "string",
"prevCursor": "string",
"hasMore": true,
"totalCount": 0
}
}Get current balance
Returns the calling account’s current balance grouped by scope and currency. Each balance has 6 buckets (available, pending, reserved, payable, collateral, operational) representing the lifecycle of funds. Use the optional `scopeLevel` / `scopeEntityId` query params to narrow to a specific entity (e.g. one merchant when called from a tenant-level key).
Create checkout session
Creates a hosted-payment-page (HPP) / widget checkout session. Requires a secret-key (sk_*) authenticated caller. The `Idempotency-Key` header is REQUIRED and is used for request deduplication (not the optional body field of the same name). The response includes a one-time `clientSecret` (cs_secret_*) the merchant must hand to the buyer so the HPP/widget can authenticate against `GET /v1/checkout-sessions/current`.