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

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

Operations

Request

Retrieve all available transaction statuses.

Use the returned IDs for informational purposes.

📋 Common Statuses

  • processing: Transaction is being processed
  • done: Transaction completed successfully
  • failed: Transaction processing failed
Security
bearerAuth
curl -i -X GET \
  https://docs.hg.cash/_mock/openapi/transaction-statuses \
  -H 'Authorization: Bearer <YOUR_JWT_HERE>'

Responses

List of transaction statuses

Bodyapplication/json
successboolean
Example: true
dataArray of objects(TransactionStatus)
Response
application/json
{ "success": true, "data": [ {}, {}, {} ] }

Request

Retrieve all available transaction types.

Use the returned IDs in the typeID field when creating transactions.

📋 Common Types

  • transfer: Bank transfer
  • payment: Payment transaction
  • deposit: Money deposit
  • withdrawal: Money withdrawal
Security
bearerAuth
curl -i -X GET \
  https://docs.hg.cash/_mock/openapi/transaction-types \
  -H 'Authorization: Bearer <YOUR_JWT_HERE>'

Responses

List of transaction types

Bodyapplication/json
successboolean
Example: true
dataArray of objects(TransactionType)
Response
application/json
{ "success": true, "data": [ {}, {}, {} ] }

Webhooks - Event notifications sent to your HTTP endpoint.

Webhooks