Skip to content

🚀 HG.Cash Transaction API

Modern REST API for users to create outbound transactions from their accounts.

🧾 How it works

  • We assign accounts to your user in HG.Cash
  • When these accounts have transactions (inbound or outbound), HG.Cash will notify your backend using the webhook URL you configure in the HG.Cash dashboard
  • To create cash-outs (money leaving your accounts), you must call the Cash Out endpoint: Create Transaction Request (Cash Out) (POST /transactions)

📊 Getting Started

  1. Generate your API token in the account settings page
  2. Test endpoints using the interactive documentation below
  3. Implement in your backend services (never expose tokens in frontend)
  4. Monitor your integration and handle errors appropriately

🔐 Authentication

This API uses Bearer Token authentication. Include your user API token in the Authorization header:

Authorization: Bearer cash_your_token_here

⚠️ Important Security Notes

  • Never share or expose your user API authentication token
  • Store tokens securely on your backend servers only
  • All API calls must be made from secure backend services
  • Contact administrators immediately if your token is compromised
Download OpenAPI description
Overview
HG.Cash API Support
License
Languages
Servers
Mock server
https://docs.hg.cash/_mock/openapi
Production server
https://hg.cash/api/v1
Development server
http://dev.hg.cash/api/v1

Transaction Management - Create and manage transactions in the HG.Cash system. All transaction endpoints require authentication.

Operations

Accounts - Retrieve account information and balances for the authenticated user. All account endpoints require authentication.

Operations

Request

Returns the authenticated user's accounts.

Security
bearerAuth
curl -i -X GET \
  https://docs.hg.cash/_mock/openapi/accounts \
  -H 'Authorization: Bearer <YOUR_JWT_HERE>'

Responses

List of accounts

Bodyapplication/json
dataArray of objects
countinteger
Response
application/json
{ "data": [ {} ], "count": 0 }

Request

Returns the balance for the authenticated user's account by ID.

Security
bearerAuth
Path
idstring(uuid)required

Account ID

curl -i -X GET \
  'https://docs.hg.cash/_mock/openapi/account/{id}/balance' \
  -H 'Authorization: Bearer <YOUR_JWT_HERE>'

Responses

Account balance

Bodyapplication/json
idstring(uuid)
balancenumber

Account balance rounded to 2 decimals

currencystring
Response
application/json
{ "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08", "balance": 0, "currency": "string" }

Reference Data - Get reference data like transaction statuses and types. These endpoints require authentication.

Operations

Webhooks - Event notifications sent to your HTTP endpoint.

Webhooks