Transaction Management - Create and manage transactions in the HG.Cash system. All transaction endpoints require authentication.
HG.Cash API (1.0.0)
Modern REST API for users to create outbound transactions from their accounts.
This API uses Bearer Token authentication. Include your user API token in the Authorization header:
Authorization: Bearer cash_your_token_here- Generate your API token in the account settings page
- Test endpoints using the interactive documentation below
- Implement in your backend services (never expose tokens in frontend)
- Monitor your integration and handle errors appropriately
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/
Request
Create a new transaction request from one of your accounts. This does not perform an on-chain/bank transfer. An admin will process it. You may provide a webhookUrl to receive status updates.
accountId: Your account ID to debit fromtoCBUortoCVU: Recipient bank CBU/CVU (22 digits)amount: Positive decimal number- Optional
webhookUrl: URL to receive status updates
- Account must belong to the authenticated user
- CBU must be a valid 22-digit number
- Optional
externalIDmust be unique per account if provided
Security
bearerAuth
ID of the user's account to send funds from
Example: "550e8400-e29b-41d4-a716-446655440123"
Recipient CBU (22 digits). Provide either toCBU or toCVU.
Example: "1100015400000000000021"
Recipient CVU (22 digits). Provide either toCBU or toCVU.
Example: "0000003100012345678901"
Transaction date in your system (ISO 8601 format)
Example: "2024-06-19T10:30:00Z"
Additional JSON data for the transaction
Example: {"reference":"REF-001","category":"services","metadata":{"source":"mobile_app","version":"1.2.3"}}
- Mock serverhttps://docs.hg.cash/_mock/openapi/transactions
- Production serverhttps://hg.cash/api/v1/transactions
- Development serverhttp://dev.hg.cash/api/v1/transactions
- curl
- JavaScript
- Node.js
- Python
- Java
- C#
- PHP
- Go
- Ruby
- R
- Payload
curl -i -X POST \
https://docs.hg.cash/_mock/openapi/transactions \
-H 'Authorization: Bearer <YOUR_JWT_HERE>' \
-H 'Content-Type: application/json' \
-d '{
"accountId": "550e8400-e29b-41d4-a716-446655440123",
"toCBU": "1100015400000000000021",
"amount": 15000.5
}'Response
application/json
{ "id": "789e0123-e89b-12d3-a456-426614174999", "externalID": "REQ-2024-001234", "createdAt": "2024-06-19T10:30:00Z", "status": "PENDING" }
- Mock serverhttps://docs.hg.cash/_mock/openapi/transaction/{id}/status
- Production serverhttps://hg.cash/api/v1/transaction/{id}/status
- Development serverhttp://dev.hg.cash/api/v1/transaction/{id}/status
- curl
- JavaScript
- Node.js
- Python
- Java
- C#
- PHP
- Go
- Ruby
- R
- Payload
curl -i -X GET \
'https://docs.hg.cash/_mock/openapi/transaction/{id}/status' \
-H 'Authorization: Bearer <YOUR_JWT_HERE>'Response
application/json
{ "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08", "externalID": "string", "status": "PENDING", "errorMessage": "string", "errorCode": "INSUFFICIENT_BALANCE", "createdAt": "2019-08-24T14:15:22Z", "updatedAt": "2019-08-24T14:15:22Z" }
- Mock serverhttps://docs.hg.cash/_mock/openapi/accounts
- Production serverhttps://hg.cash/api/v1/accounts
- Development serverhttp://dev.hg.cash/api/v1/accounts
- curl
- JavaScript
- Node.js
- Python
- Java
- C#
- PHP
- Go
- Ruby
- R
- Payload
curl -i -X GET \
https://docs.hg.cash/_mock/openapi/accounts \
-H 'Authorization: Bearer <YOUR_JWT_HERE>'Response
application/json
{ "data": [ { … } ], "count": 0 }
- Mock serverhttps://docs.hg.cash/_mock/openapi/account/{id}/balance
- Production serverhttps://hg.cash/api/v1/account/{id}/balance
- Development serverhttp://dev.hg.cash/api/v1/account/{id}/balance
- curl
- JavaScript
- Node.js
- Python
- Java
- C#
- PHP
- Go
- Ruby
- R
- Payload
curl -i -X GET \
'https://docs.hg.cash/_mock/openapi/account/{id}/balance' \
-H 'Authorization: Bearer <YOUR_JWT_HERE>'Response
application/json
{ "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08", "balance": 0, "currency": "string" }