---
updatedAt: 2026-04-28T16:08:28.000Z
agentTools:
  projectIndex: https://developers.intandem.tech/llms.txt
---

# Use Client Package Credit [Alpha]

## Overview
Redeem a credit from the authenticated client's active package to pay for an appointment or service session. This marks the associated payment status as paid (price set to $0) and decrements one credit from the client's package. If multiple packages qualify, the **soonest-expiring package** is used first.

## Authentication
**Available for Client Tokens only.**

## Required Parameters
- `payment_status_id` (string) — The ID of the payment status record to pay using a package credit. Must reference a pending/unpaid payment status linked to an appointment.

## Notes
- Returns 422 "There is no package to use" if no active client packages with available credits exist for the relevant service.
- Returns 422 if the payment status is already paid.
- There is also a Staff-facing version at `POST /platform/v1/payment/client_packages/update_usage` that accepts **Staff tokens** (and **Directory/App tokens** with the `X-On-Behalf-Of` header).
- This endpoint is in Alpha and may change.

# OpenAPI definition

```json
{
  "openapi": "3.1.0",
  "info": {
    "title": "Clients",
    "description": "Unified OpenAPI specification for clients domain",
    "version": "3.0",
    "x-generated": {
      "sourceFiles": [
        "activity_sources.json",
        "legacy_v1_platform_clients.json",
        "search.json",
        "legacy_v1_clients.json",
        "manage_clients.json",
        "client_settings.json",
        "notes.json",
        "clients_payments.json",
        "client_messaging.json",
        "crm_views.json"
      ],
      "pathNormalizations": [
        {
          "file": "legacy_v1_platform_clients.json",
          "basePath": "/platform/v1",
          "transformations": [
            {
              "original": "/fields",
              "normalized": "/platform/v1/fields",
              "basePath": "/platform/v1"
            },
            {
              "original": "/fields/{field_id}",
              "normalized": "/platform/v1/fields/{field_id}",
              "basePath": "/platform/v1"
            }
          ]
        },
        {
          "file": "legacy_v1_clients.json",
          "basePath": "/platform/v1",
          "transformations": [
            {
              "original": "/clients",
              "normalized": "/platform/v1/clients",
              "basePath": "/platform/v1"
            },
            {
              "original": "/clients/bulk",
              "normalized": "/platform/v1/clients/bulk",
              "basePath": "/platform/v1"
            },
            {
              "original": "/clients/merges/merge_clients",
              "normalized": "/platform/v1/clients/merges/merge_clients",
              "basePath": "/platform/v1"
            },
            {
              "original": "/clients/merges/possible_merge_master",
              "normalized": "/platform/v1/clients/merges/possible_merge_master",
              "basePath": "/platform/v1"
            },
            {
              "original": "/clients/payment/client_packages/update_usage",
              "normalized": "/platform/v1/clients/payment/client_packages/update_usage",
              "basePath": "/platform/v1"
            },
            {
              "original": "/clients/payment/client_packages/validate",
              "normalized": "/platform/v1/clients/payment/client_packages/validate",
              "basePath": "/platform/v1"
            },
            {
              "original": "/clients/{client_id}",
              "normalized": "/platform/v1/clients/{client_id}",
              "basePath": "/platform/v1"
            },
            {
              "original": "/clients/{client_id}/estimates",
              "normalized": "/platform/v1/clients/{client_id}/estimates",
              "basePath": "/platform/v1"
            },
            {
              "original": "/clients/{client_id}/invoices",
              "normalized": "/platform/v1/clients/{client_id}/invoices",
              "basePath": "/platform/v1"
            },
            {
              "original": "/clients/{client_id}/payments",
              "normalized": "/platform/v1/clients/{client_id}/payments",
              "basePath": "/platform/v1"
            }
          ]
        },
        {
          "file": "manage_clients.json",
          "basePath": "/business/clients",
          "transformations": [
            {
              "original": "/v1/apps/{app_code_name}/import",
              "normalized": "/business/clients/v1/apps/{app_code_name}/import",
              "basePath": "/business/clients"
            },
            {
              "original": "/v1/contacts/{client_uid}/matters",
              "normalized": "/business/clients/v1/contacts/{client_uid}/matters",
              "basePath": "/business/clients"
            },
            {
              "original": "/v1/matters",
              "normalized": "/business/clients/v1/matters",
              "basePath": "/business/clients"
            },
            {
              "original": "/v1/matters/{matter_uid}/collaborators",
              "normalized": "/business/clients/v1/matters/{matter_uid}/collaborators",
              "basePath": "/business/clients"
            },
            {
              "original": "/v1/matters/{matter_uid}/collaborators/{staff_uid}",
              "normalized": "/business/clients/v1/matters/{matter_uid}/collaborators/{staff_uid}",
              "basePath": "/business/clients"
            },
            {
              "original": "/v1/matters/{matter_uid}/nest",
              "normalized": "/business/clients/v1/matters/{matter_uid}/nest",
              "basePath": "/business/clients"
            },
            {
              "original": "/v1/matters/{matter_uid}/notes",
              "normalized": "/business/clients/v1/matters/{matter_uid}/notes",
              "basePath": "/business/clients"
            },
            {
              "original": "/v1/matters/{matter_uid}/notes/{note_uid}",
              "normalized": "/business/clients/v1/matters/{matter_uid}/notes/{note_uid}",
              "basePath": "/business/clients"
            },
            {
              "original": "/v1/matters/{matter_uid}/reassign",
              "normalized": "/business/clients/v1/matters/{matter_uid}/reassign",
              "basePath": "/business/clients"
            },
            {
              "original": "/v1/tags",
              "normalized": "/business/clients/v1/tags",
              "basePath": "/business/clients"
            },
            {
              "original": "/v1/matters/{matter_uid}/tags",
              "normalized": "/business/clients/v1/matters/{matter_uid}/tags",
              "basePath": "/business/clients"
            },
            {
              "original": "/v1/matters/{uid}",
              "normalized": "/business/clients/v1/matters/{uid}",
              "basePath": "/business/clients"
            },
            {
              "original": "/v1/settings",
              "normalized": "/business/clients/v1/settings",
              "basePath": "/business/clients"
            }
          ]
        },
        {
          "file": "clients_payments.json",
          "basePath": "/client/payments",
          "transformations": [
            {
              "original": "/v1/apps/primary_provider_connected_application",
              "normalized": "/client/payments/v1/apps/primary_provider_connected_application",
              "basePath": "/client/payments"
            },
            {
              "original": "/v1/cards",
              "normalized": "/client/payments/v1/cards",
              "basePath": "/client/payments"
            },
            {
              "original": "/v1/cards/get_new_card",
              "normalized": "/client/payments/v1/cards/get_new_card",
              "basePath": "/client/payments"
            },
            {
              "original": "/v1/cards/save_card_session",
              "normalized": "/client/payments/v1/cards/save_card_session",
              "basePath": "/client/payments"
            },
            {
              "original": "/v1/carts",
              "normalized": "/client/payments/v1/carts",
              "basePath": "/client/payments"
            },
            {
              "original": "/v1/carts/{cart_uid}",
              "normalized": "/client/payments/v1/carts/{cart_uid}",
              "basePath": "/client/payments"
            },
            {
              "original": "/v1/client_packages",
              "normalized": "/client/payments/v1/client_packages",
              "basePath": "/client/payments"
            },
            {
              "original": "/v1/deposits",
              "normalized": "/client/payments/v1/deposits",
              "basePath": "/client/payments"
            },
            {
              "original": "/v1/deposits/{deposit_uid}",
              "normalized": "/client/payments/v1/deposits/{deposit_uid}",
              "basePath": "/client/payments"
            },
            {
              "original": "/v1/invoices",
              "normalized": "/client/payments/v1/invoices",
              "basePath": "/client/payments"
            },
            {
              "original": "/v1/packages",
              "normalized": "/client/payments/v1/packages",
              "basePath": "/client/payments"
            },
            {
              "original": "/v1/packages/{package_id}",
              "normalized": "/client/payments/v1/packages/{package_id}",
              "basePath": "/client/payments"
            },
            {
              "original": "/v1/payment_requests",
              "normalized": "/client/payments/v1/payment_requests",
              "basePath": "/client/payments"
            },
            {
              "original": "/v1/payment_requests/{payment_request_uid}/checkout",
              "normalized": "/client/payments/v1/payment_requests/{payment_request_uid}/checkout",
              "basePath": "/client/payments"
            },
            {
              "original": "/v1/payments",
              "normalized": "/client/payments/v1/payments",
              "basePath": "/client/payments"
            },
            {
              "original": "/v1/product_orders",
              "normalized": "/client/payments/v1/product_orders",
              "basePath": "/client/payments"
            }
          ]
        },
        {
          "file": "client_messaging.json",
          "basePath": "/client/messaging",
          "transformations": [
            {
              "original": "/v1/messages",
              "normalized": "/client/messaging/v1/messages",
              "basePath": "/client/messaging"
            }
          ]
        },
        {
          "file": "crm_views.json",
          "basePath": "/business/search/v1",
          "transformations": [
            {
              "original": "/views",
              "normalized": "/business/search/v1/views",
              "basePath": "/business/search/v1"
            },
            {
              "original": "/views/{uid}",
              "normalized": "/business/search/v1/views/{uid}",
              "basePath": "/business/search/v1"
            },
            {
              "original": "/views/bulk",
              "normalized": "/business/search/v1/views/bulk",
              "basePath": "/business/search/v1"
            },
            {
              "original": "/views_columns",
              "normalized": "/business/search/v1/views_columns",
              "basePath": "/business/search/v1"
            },
            {
              "original": "/view_filters",
              "normalized": "/business/search/v1/view_filters",
              "basePath": "/business/search/v1"
            }
          ]
        }
      ],
      "pathConflicts": [],
      "componentConflicts": [
        {
          "type": "schema",
          "name": "ErrorResponse",
          "resolution": "Renamed to ErrorResponse_search",
          "files": [
            "merged",
            "search.json"
          ]
        },
        {
          "type": "schema",
          "name": "ErrorResponse",
          "resolution": "Renamed to ErrorResponse_notes",
          "files": [
            "merged",
            "notes.json"
          ]
        }
      ],
      "totalPaths": 54,
      "totalComponents": 27
    }
  },
  "servers": [
    {
      "url": "https://api.vcita.biz",
      "description": "Unified API Gateway server"
    }
  ],
  "paths": {
    "/platform/v1/clients/payment/client_packages/update_usage": {
      "post": {
        "description": "## Overview\nRedeem a credit from the authenticated client's active package to pay for an appointment or service session. This marks the associated payment status as paid (price set to $0) and decrements one credit from the client's package. If multiple packages qualify, the **soonest-expiring package** is used first.\n\n## Authentication\n**Available for Client Tokens only.**\n\n## Required Parameters\n- `payment_status_id` (string) — The ID of the payment status record to pay using a package credit. Must reference a pending/unpaid payment status linked to an appointment.\n\n## Notes\n- Returns 422 \"There is no package to use\" if no active client packages with available credits exist for the relevant service.\n- Returns 422 if the payment status is already paid.\n- There is also a Staff-facing version at `POST /platform/v1/payment/client_packages/update_usage` that accepts **Staff tokens** (and **Directory/App tokens** with the `X-On-Behalf-Of` header).\n- This endpoint is in Alpha and may change.",
        "parameters": [],
        "responses": {
          "200": {
            "description": "Package credit successfully applied to the payment status. The payment status is marked as paid with price 0, and a booking credit redemption record is created.",
            "content": {
              "application/json": {
                "example": {
                  "data": {
                    "package_name": "Package Name"
                  },
                  "status": "OK"
                }
              }
            }
          },
          "422": {
            "description": "Validation error - The request was valid but could not be processed. Common reasons include: no suitable package exists for the service, the payment status is already paid, or the client has no active packages with available credits for this service.",
            "content": {
              "application/json": {
                "example": {
                  "error": "There is no package to use",
                  "status": "Error"
                }
              }
            }
          },
          "500": {
            "description": "Internal Server Error - May occur due to a known bug when the payment_status_id references a virtual booking that fails to be retrieved. The error message will contain 'undefined local variable or method `exception''. To avoid this, ensure the payment_status_id references a regular payment status that exists in the client's payment history.",
            "content": {
              "application/json": {
                "example": {
                  "error": "undefined local variable or method `exception' for Components::Payments::ClientPackagesAPI:Module",
                  "status": "Error"
                }
              }
            }
          }
        },
        "summary": "Use Client Package Credit [Alpha]",
        "tags": [
          "Client Packages"
        ],
        "x-amazon-apigateway-auth": {
          "type": "NONE"
        },
        "x-amazon-apigateway-integration": {
          "httpMethod": "POST",
          "responses": {
            "default": {
              "statusCode": "200"
            }
          },
          "type": "http_proxy",
          "uri": "https:///platform/v1/clients/payment/client_packages/update_usage"
        },
        "x-auth-type": "Application & Application User",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "properties": {
                  "payment_status_id": {
                    "description": "Payment status ID - Must reference a pending/unpaid payment status. Already paid statuses will return 422 error 'Payment status is already paid'.",
                    "type": "string",
                    "x-reference-to": "payment_status"
                  }
                },
                "required": [
                  "payment_status_id"
                ],
                "type": "object"
              }
            }
          }
        },
        "security": [
          {
            "Bearer": []
          }
        ]
      }
    }
  },
  "components": {
    "securitySchemes": {
      "Bearer": {
        "type": "http",
        "scheme": "bearer",
        "bearerFormat": "JWT",
        "description": "Provide a valid bearer token in the Authorization header. Example: 'Authorization: Bearer {app_token}'"
      }
    }
  }
}
```