Billing
Get Billing Requests
Get all billing requests (replacements and refunds)
curl https://api.ugc.inc/billing/requests \
-H "Authorization: Bearer YOUR_API_KEY"
import { UGCClient } from 'ugcinc';
const client = new UGCClient({ apiKey: 'YOUR_API_KEY' });
const response = await client.billing.getRequests();
if (response.ok) {
response.data.forEach(request => {
console.log(`${request.type} - ${request.status} (${request.id})`);
});
}
{
"ok": true,
"code": 200,
"message": "Success",
"data": [
{
"id": "req_123",
"org_id": "org_123",
"account_id": "acc_123",
"type": "replacement",
"status": "approved",
"reason": "Account was banned",
"created_at": "2025-01-15T10:00:00.000Z",
"resolved_at": "2025-01-15T10:00:00.000Z"
},
{
"id": "req_124",
"org_id": "org_123",
"account_id": "acc_456",
"type": "refund",
"status": "pending",
"reason": "Not satisfied",
"created_at": "2025-01-20T10:00:00.000Z",
"resolved_at": null
}
]
}
⌘I
curl https://api.ugc.inc/billing/requests \
-H "Authorization: Bearer YOUR_API_KEY"
import { UGCClient } from 'ugcinc';
const client = new UGCClient({ apiKey: 'YOUR_API_KEY' });
const response = await client.billing.getRequests();
if (response.ok) {
response.data.forEach(request => {
console.log(`${request.type} - ${request.status} (${request.id})`);
});
}
{
"ok": true,
"code": 200,
"message": "Success",
"data": [
{
"id": "req_123",
"org_id": "org_123",
"account_id": "acc_123",
"type": "replacement",
"status": "approved",
"reason": "Account was banned",
"created_at": "2025-01-15T10:00:00.000Z",
"resolved_at": "2025-01-15T10:00:00.000Z"
},
{
"id": "req_124",
"org_id": "org_123",
"account_id": "acc_456",
"type": "refund",
"status": "pending",
"reason": "Not satisfied",
"created_at": "2025-01-20T10:00:00.000Z",
"resolved_at": null
}
]
}
