Skip to main content

Transaction Details

Endpoint

https://api.betatel.com/api/billing/me/transactions/:transactionId

Method: GET

Description: Get detailed information about a specific transaction.

Path Parameters:

  • transactionId: The unique identifier for the transaction

Request Headers

The request must include an Authorization header with a valid API key for authentication:

HeaderValueRequiredDescription
x-api-key{{x-api-key}}YesThe authentication api key to verify the user's identity

Let’s Dive Into the Code!

Choose your preferred programming language and use the provided examples to integrate the get transaction details.

Example - cURL
curl --location 'https://api.betatel.com/api/billing/me/transactions/txn_id' \
--header 'Authorization: Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpZCI6IjY3ZWE2MjJiMDU1MjkzNWZhYzVjZDFhZCIsImVtYWlsIjoicG92aWQ2ODFAbm9rZG90LmNvbSIsInJvbGUiOiJ1c2VyIiwiaWF0IjoxNzQzNDI4Mjk3LCJleHAiOjE3NDM0MzE4OTd9.dS4w_GEw4jVoMm5pvv6uoYnC9TYGO3rAbUeRMxK1iow' \
--header 'x-api-key: ••••••'

Response

JSON Schema:

{
"transactionId": "txn_78901",
"correlationId": "evt_b4f82932",
"userId": "user123",
"serviceId": "svc_mobile_sms",
"type": "service_usage",
"description": "SMS delivery to UK mobile",
"datetime": "2025-03-18T14:32:15Z",
"unitPrice": 0.012,
"quantity": 142,
"value": 1.70,
"currency": "USD",
"metadata": {
"destination": "+4412345678",
"mcc_mnc": "234-15",
"completion_status": "delivered",
"delivery_timestamp": "2025-03-18T14:32:10Z"
},
"events": [
{
"eventId": "evt_auth_b4f82932",
"type": "SERVICE_REQUEST_INITIATED",
"timestamp": "2025-03-18T14:32:05Z"
},
{
"eventId": "evt_usage_b4f82932",
"type": "SERVICE_EXECUTION_COMPLETED",
"timestamp": "2025-03-18T14:32:12Z"
}
]
}
FieldTypeDescription
transactionIdstringA unique identifier for the transaction (e.g., "txn_78901").
correlationIdstringA unique identifier for the authorization request (e.g., "evt_b4f82932").
userIdstringThe unique identifier for the user (e.g., "user123").
serviceIdstringThe identifier for the service associated with the transaction (e.g., "svc_mobile_sms").
typestringThe type of transaction (e.g., "service_usage").
descriptionstringA description of the transaction (e.g., "SMS delivery to UK mobile").
datetimestringThe timestamp of when the transaction occurred (e.g., "2025-03-18T14:32:15Z").
unitPricenumberThe price per unit for the service (e.g., 0.012).
quantitynumberThe quantity of the service used (e.g., 142).
valuenumberThe total value of the transaction (e.g., 1.70).
currencystringThe currency in which the transaction is represented (e.g., "USD").
metadataobjectAdditional information about the transaction, including:
- destinationstringThe destination number for the service (e.g., "+4412345678").
- mcc_mncstringThe mobile country code and mobile network code (e.g., "234-15").
- completion_statusstringThe status of the transaction (e.g., "delivered").
- delivery_timestampstringThe timestamp of when the service was delivered (e.g., "2025-03-18T14:32:10Z").
eventsarrayA list of events associated with the transaction, including:
- eventIdstringA unique identifier for the event (e.g., "evt_auth_b4f82932").
- typestringThe type of event (e.g., "SERVICE_REQUEST_INITIATED").
- timestampstringThe timestamp of when the event occurred (e.g., "2025-03-18T14:32:05Z").