# Store customer user credit transaction.

Store customer user credit transaction.

Endpoint: POST /customer-users/{user}/credit-transactions
Version: 1.0.0
Security: Token

## Path parameters:

  - `user` (string, required)
    The ID of a user. UUID Version 4.
    Example: "00000000-0000-4000-8000-000000000000"

## Request fields (application/json):

  - `type` (string, required)
    The type of transaction
    Enum: "credit", "debit"

  - `amount` (integer, required)
    The amount in cents
    Example: 100

  - `description` (string)
    Optional description of the transaction
    Example: "Description of transaction"

  - `date` (string)
    The date for the transaction in UTC (YYYY-MM-DD)
    Example: "2025-01-01"

## Response 201 fields (application/json):

  - `data` (object, required)
    A customer user's credit transaction

  - `data.type` (string, required)
    The type of credit transaction
    Enum: "credit", "debit"

  - `data.amount` (integer, required)
    The amount in cents
    Example: 1

  - `data.description` (string,null)
    Optional description of the transaction
    Example: "Transaction description"

  - `data.user_id` (string, required)
    ID of the user associated with the transaction. UUID Version 4.
    Example: "00000000-0000-4000-8000-000000000000"

  - `data.posting_date` (string,null)
    The date the transaction was posted (YYYY-MM-DD)
    Example: "2025-01-01"

  - `data.created_at` (string, required)
    The date and time the transaction was created (ISO 8601)
    Example: "2025-11-07T18:48:47+00:00"

  - `data.updated_at` (string, required)
    The date and time the transaction was updated (ISO 8601)
    Example: "2025-11-07T18:48:47+00:00"

## Response 422 fields (application/json):

  - `status` (string, required)
    What was the state of the request?
    Example: "fail"

## Response 500 fields (application/json):

  - `status` (string, required)
    What was the state of the request?
    Example: "error"

  - `message` (string, required)
    The error message.
    Example: "{ApiError message.}"

  - `code` (integer,null)
    A numeric code corresponding to the error.
    Example: 500


