Skip to main content

Retrieve a Credit Record

Endpoint​

GET https://api.verifik.co/v2/credits/{id}

Retrieve a specific credit record by its unique identifier. This endpoint returns detailed information about a single credit transaction including its status, amount, and associated client information.

Headers​

Content-Type​

Type: String
Required: Yes

application/json

Authorization​

Type: String
Required: Yes

Bearer <token>

Parameters​

id​

Type: String
Required: Yes

The unique identifier of the credit record you want to retrieve.

populates[]​

Type: Array
Required: No

Optional array of related data to include. Available options: client, superAdmin.

Request​

import axios from 'axios';

const options = {
method: 'GET',
url: 'https://api.verifik.co/v2/credits/credit_123456789',
params: {
"populates[]": ["client", "superAdmin"]
},
headers: {
Accept: 'application/json',
Authorization: 'jwt <tu_token>'
}
};

try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}

Response​

{
"success": true,
"data": {
"_id": "credit_123456789",
"amount": 1000,
"status": "approved",
"category": "purchase",
"client": {
"_id": "client_123456789",
"name": "Example Client",
"email": "client@example.com"
},
"superAdmin": {
"_id": "admin_123456789",
"name": "Admin User",
"email": "admin@verifik.co"
},
"description": "Credit purchase for API usage",
"transactionId": "txn_123456789",
"paymentMethod": "credit_card",
"currency": "USD",
"exchangeRate": 1.0,
"createdAt": "2024-01-15T10:30:00Z",
"updatedAt": "2024-01-15T10:30:00Z"
}
}