Help Center
VCCHUB How-to
  1. API Reference
  • Guides
    • Welcome
    • Interface
  • API Reference
    • Introduction
    • Endpoints
    • Data Types
    • Signing
    • 3-D Secure Verification
    • Subscription
    • Errors
    • Webhooks
    • Items Information
    • Changelog
    • Acquiring
      • Create a direct payment
        POST
      • Create a APM payment
        POST
      • Create a redirect (iFrame) payment
        POST
      • Query a transaction
        POST
      • Capture a transaction
        POST
      • Review a transaction
        POST
      • Cancel a transaction
        POST
      • Cancel a subscription
        POST
      • Refund a transaction
        POST
      • Search a refund transaction
        POST
      • Create a payout
        POST
      • Optimise payment methods
        POST
      • Batch Upload Logistics Information
        POST
      • Query a payout transaction
        POST
      • Query Merchant Payout Balance
        POST
      • Query Merchant Unsettled Amount
        POST
    • Issuing
      • Webhook Signature Verification
      • Cardholder
        • Create cardholder
        • Update Cardholder
        • Delete cardholder
        • Query cardholder
      • Group
        • Create group
        • Query group details
        • Delete group
        • Group Card Withdrawal
        • Update group status
        • Recharge group
        • Query rule
      • Card
        • Create a card
        • Query card details
        • Query card transaction
        • Cancel a card
        • Withdraw from a card
        • Update card status
        • Recharge card
        • Update shared card limit
        • Query for card operation
        • Query card BIN
      • Account
        • Query Account Balance
  • Appendix
    • Test Cards
    • Bank Code
    • Country Code
    • Currency Code
    • Payment Methods
  1. API Reference

Signing

Acquiring Integration#

The request body (payload) must be signed to ensure the integrity and authenticity of the message. To generate a signature hash, Star SaaS provides each merchant with a Signature Key.
Every Merchant Account is assigned at least one Signature Key, which is used for signing API requests and receiving signed notifications from Star SaaS. Each Signature Key has a unique Key ID, and only one default Key ID can be active at a time for the Merchant Account. This allows Star SaaS to identify which key to use when sending notifications.
The Signature Key is uniquely generated and shared between the Merchant and Star SaaS. The signature itself is computed as a SHA256 (32-byte) hash and returned as a 64-character hexadecimal string.

Keys#

The Star SaaS API uses API keys for secure request encryption. To obtain your API key pairs, please reach out to your account manager.
Star SaaS provides separate API keys for test and live environments. Ensure you switch to the appropriate keys and endpoint URL when transitioning from the test environment to the live environment to avoid processing real transactions during testing.
All API requests must be sent over HTTPS, as calls made via HTTP will fail. Additionally, any API requests lacking proper encryption (using SHA256) will be rejected.
Keep Sign Key confidential!
Since your API keys provide extensive access, it’s crucial to keep them safe! Never share your secret API keys in publicly accessible locations like GitHub, client-side code, or similar areas.

How to encrypt#

JAVA
PHP
$encryption_data=sha256(merchant_id+account_id+order_no+currency+amount+first_name+
last_name+card+expiration_year+expiration_month+security_code+shopper_email+sign_key);
APM:
$encryption_data=sha256(merchant_id+account_id+order_no+currency+amount+
first_name+last_name+shopper_email+sign_key);
Alternatively, you can use this online tool to generate encryption data for testing purposes
https://tools.keycdn.com/sha256-online-generator
image.png
SHA256 Generator Example

Issuing Integration#

1. Issuing API Authentication#

All Issuing API requests must be authenticated using the VCC-HMAC-SHA256 signature mechanism.
Unlike the legacy mechanism, which required a sign field in the request body and used SHA256(sorted JSON + signKey), the new mechanism transmits the signature through the HTTP Authorization header and includes timestamp validation and replay protection.
The legacy request-body sign mechanism will be disabled after the migration deadline communicated directly to each merchant.

2. Obtain and Manage API Credentials#

Generate API Credentials#

Log in to the Star SaaS dashboard and navigate to:
Settings → Developer Options
Click Regenerate to generate a new set of API credentials, including the APP ID and API Key.
Important: Regenerating credentials immediately disables the previous credentials. Any integration still using the previous credentials will no longer be able to authenticate API requests. Ensure that your integration is ready to use the new credentials before regenerating them to avoid service interruption.

Sandbox and Production Credentials#

Sandbox and Production credentials are generated and managed separately.
Sandbox: Use the credentials generated for the Sandbox environment.
Production: Use the credentials generated for the Production environment.
Credentials from one environment must not be used to access the other environment.

API Key Security#

The API Key is displayed in plaintext only once when generated. Copy and store it securely immediately.
The APP ID identifies the credential and may appear in logs. The API Key is used to calculate signatures and must never be exposed in frontend code, request bodies, URLs, or public code repositories.
If an API Key is lost or compromised, regenerate the credentials in the corresponding environment. The previous credentials will be disabled immediately, and integrations using them must be updated.
The API Key is a 64-character hexadecimal string. For HMAC calculation, use the UTF-8 bytes of the original 64-character string directly as the key. Do not decode the hexadecimal string into 32 binary bytes.
Source IP allowlisting may be configured for a merchant. Requests from IP addresses not included in the allowlist will be rejected. Contact your Star SaaS integration contact if IP allowlisting is required.

3. Required Request Headers#

Every Issuing API request must include the following headers:
HeaderRequiredDescription
Content-TypeYesMust be application/json and must match the value used during signing.
X-Vcc-DateYesUTC timestamp in ISO-8601 format: yyyy-MM-dd'T'HH:mm:ss'Z', e.g. 2026-08-24T02:00:00Z. The timestamp must be within ±5 minutes of server time.
X-Vcc-NonceYesA one-time random value. A UUID is recommended. Maximum length: 128 characters. Reuse of the same nonce with the same credential within 10 minutes will be rejected.
X-Vcc-Content-Sha256YesLowercase hexadecimal SHA-256 hash of the exact request body. For a request without a body, use the SHA-256 hash of an empty string.
AuthorizationYesContains the signature algorithm, credential ID, signed headers, and signature.
Timestamp format note: For inbound API requests (Merchant → VCC), X-Vcc-Date uses ISO-8601 UTC format. For outbound Issuing webhooks (VCC → Merchant), the same header uses a Unix timestamp in seconds. See Issuing Webhook Signature Verification for webhook verification details.

4. Signature Generation#

Step 1: Calculate the Request Body Hash#

Calculate the lowercase hexadecimal SHA-256 hash of the exact request body:
X-Vcc-Content-Sha256 = hexLower(SHA256(body))
For a request without a body, calculate the SHA-256 hash of an empty string.

Step 2: Construct the Canonical Request#

Construct the canonical request using the following components in the specified order:
1.
HTTP method in uppercase.
2.
Canonical URI, such as /api/card/create.
3.
Canonical query string.
4.
Canonical headers.
5.
Signed headers.
6.
X-Vcc-Content-Sha256.
Separate the components with newline characters (\n).
Query parameters must be sorted by key in ascending order. Percent-encode each key and value, combine them as key=value, and join the pairs with &. If there are no query parameters, use an empty string.
Canonical headers must include host, content-type, and all x-vcc-* headers. Convert header names to lowercase and sort them alphabetically. Each canonical header must end with a newline character.
Signed headers must contain the corresponding lowercase header names in alphabetical order, separated by semicolons.
The host value must match the actual request host, including a non-default port if present. Any additional x-vcc-* headers must also be included in the canonical headers and signed headers.
The request body must be finalized before calculating its hash and signature. The body sent to the server must match the body used for signing byte for byte. JSON fields do not need to be sorted; however, any change to field order, whitespace, indentation, or content changes the body hash and requires a new signature.

Step 3: Construct the String to Sign#

stringToSign = "VCC-HMAC-SHA256" + "\n" + hexLower(SHA256(canonicalRequest))

Step 4: Calculate the Signature#

signature = hexLower(HMAC-SHA256(API Key, stringToSign))
Use the UTF-8 bytes of the original API Key string as the HMAC key. Do not decode the hexadecimal string into binary bytes.

Step 5: Set the Authorization Header#

Do not include the legacy sign field in the request body.

5. Java Code Example#

The following Java utility generates the signature headers required for one request. It does not depend on third-party libraries.

6. Complete Signature Example#

The following example illustrates a complete signing process. The credentials below are example values for integration testing only and must not be used in production. This is a deterministic calculation example, not a reusable live request. Its timestamp is historical; generate a fresh timestamp and nonce and recalculate the body hash and signature before sending an actual request.
APP ID: AK52ocpltkcg6dCMmSFk
API Key: 70fac8e5725fff1b9412220e40a960ab3a83574c3082bf8c1adaa1b3662689ec
Request: POST https://open-api-sandbox.vcc.top/api/card/create
X-Vcc-Date: 2026-08-24T02:00:00Z
X-Vcc-Nonce: 550e8400-e29b-41d4-a716-446655440000
Request body (the body sent must match this string byte for byte):
{"card_bin_id":5001,"card_type":"1","cardholder_id":"2075448274735685633","company_id":"65601","enable_multi_use":true,"end_date":"2028-07-20","recharge_amount":1,"request_id":"rk-20260824-0001","start_date":"2026-06-26"}
Request body hash:
X-Vcc-Content-Sha256 = 963a131f171eab32da3e24c5ad856acb0b83a777ba3c742a24c9dd615e482e2e
String to sign:
VCC-HMAC-SHA256\n45ca9c81c57e7a66bf5c1b96f54836b26a2d4b044f78e9e82a7510273acd0a86
Signature:
2b3e7eadb7088ae9f774dbad05ce840968c38a1d69db2d9290eedc4d497ac6c5
Authorization header:

7. Response Format#

A successful response follows this general structure:
{
  "code": "0000",
  "message": "Success",
  "result": {}
}
code = 0000 indicates success. Other codes indicate failure.

8. Retry and Idempotency#

X-Vcc-Date must be within ±5 minutes of server time. Synchronize the client clock using NTP.
X-Vcc-Nonce is a one-time value. Reuse of the same nonce with the same credential within 10 minutes will be rejected.
For retries, generate a new timestamp, nonce, and signature. Do not resend the original signed request unchanged.
Finalize the request body before signing. Do not reformat, compress, or otherwise modify the body after calculating its hash.
The actual Content-Type value must match the value used during signing and must be application/json.
For create and recharge operations, provide a globally unique request_id. Reuse the same request_id when retrying the same business operation to help prevent duplicate operations.
Previous
Data Types
Next
3-D Secure Verification