/api/v1/customer/credit-spend

API endpoint documentation

post
Tags:customer
Operation ID: postApiV1CustomerCredit-spend
Query Parameters
apiKeystring
required

Your BizKitHub API key (passed as GET parameter)

Body
identityIdstring
required

Logged user identity (from your frontend cookies).

Example: "Z9CPkS2o3UV163VQn5OUv0T8BQi8Fvdg"
amountnumber
required
Example: 100
descriptionstring
optional

App internal description.

Example: "video.rewrite:15m"
customerRealIpstring
optional
Example: "1.1.1.1"
Responses
200

No description

Base URL:
https://bizkithub.com

Example Request

fetch('https://bizkithub.com/api/v1/customer/credit-spend?apiKey=YOUR_API_KEY', {
  method: 'POST',
  headers: {
    'Content-Type': 'application/json'
  },
  body: JSON.stringify({
        "identityId": "Z9CPkS2o3UV163VQn5OUv0T8BQi8Fvdg",
        "amount": 100,
        "description": "video.rewrite:15m",
        "customerRealIp": "1.1.1.1"
    })
})

Example Response

HTTP 200Success Response
{
  "success": false,
  "transactionId": "HxanU4a1n4El61zx",
  "oldCreditBalance": 510,
  "newCreditBalance": 410
}

🔑 API Key Required

All BizKitHub API endpoints require authentication using an API key. The API key must be passed as a GET parameter in the URL for all requests.

Back to API Documentation
Last updated: August 6, 2025