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.
- 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)
- 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
This API uses Bearer Token authentication. Include your user API token in the Authorization header:
Authorization: Bearer cash_your_token_hereDownload 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. 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
- basic_request_cbu
- basic_request_cvu
- complete_request
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/transactions/{id}/receipt
- Production serverhttps://hg.cash/api/v1/transactions/{id}/receipt
- Development serverhttp://dev.hg.cash/api/v1/transactions/{id}/receipt
- curl
- JavaScript
- Node.js
- Python
- Java
- C#
- PHP
- Go
- Ruby
- R
- Payload
curl -i -X GET \
'https://docs.hg.cash/_mock/openapi/transactions/{id}/receipt' \
-H 'Authorization: Bearer <YOUR_JWT_HERE>'Response
application/json
{ "signedUrl": "http://example.com" }
- Mock serverhttps://docs.hg.cash/_mock/openapi/transaction-requests/{id}/transaction-id
- Production serverhttps://hg.cash/api/v1/transaction-requests/{id}/transaction-id
- Development serverhttp://dev.hg.cash/api/v1/transaction-requests/{id}/transaction-id
- curl
- JavaScript
- Node.js
- Python
- Java
- C#
- PHP
- Go
- Ruby
- R
- Payload
curl -i -X GET \
'https://docs.hg.cash/_mock/openapi/transaction-requests/{id}/transaction-id' \
-H 'Authorization: Bearer <YOUR_JWT_HERE>'Response
application/json
{ "transactionId": "75906707-8c31-479c-b354-aa805c4cefbc" }