Skip to main content

The Credit Object

Overview

The Credit object represents credit transactions and balances within your Verifik account. This object tracks credit purchases, usage, and administrative operations.

Attributes

amount

Type: Number
Required: No

The number of credits (default: 0).

status

Type: String
Required: No

The status of the credit transaction with possible values:

  • approved - Credit transaction approved
  • pending - Credit transaction pending
  • failed - Credit transaction failed
  • postPaid - Post-paid credit transaction

Default: null.

category

Type: String
Required: No

The category of the credit with possible values:

  • purchase - Credit purchase transaction
  • usage - Credit usage transaction

Default: usage.

client

Type: string (reference id)
Required: No

Reference to the Client model, linking credits to a specific client account. Default: null.

superAdmin

Type: string (reference id)
Required: No

Reference to the SuperAdmin model for administrative oversight. Default: null.

description

Type: String
Required: No

Description of the credit transaction.

transactionId

Type: String
Required: No

Unique identifier for the credit transaction.

paymentMethod

Type: String
Required: No

Payment method used for credit purchase (e.g., "credit_card", "bank_transfer").

currency

Type: String
Required: No

Currency code for the transaction (e.g., "USD", "EUR").

exchangeRate

Type: Number
Required: No

Exchange rate applied to the transaction.

createdAt

Type: Date
Required: Yes

Timestamp when the credit record was created.

updatedAt

Type: Date
Required: Yes

Timestamp when the credit record was last updated.

Example Object

{
"_id": "credit_123456789",
"amount": 1000,
"status": "approved",
"category": "purchase",
"client": "client_123456789",
"superAdmin": "admin_123456789",
"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"
}