2025-03-25
  • 2025-03-25
  • 2025-01-20
  • 2022-03-14
Help Center
VCCHUB How-to
2025-03-25
  • 2025-03-25
  • 2025-01-20
  • 2022-03-14
  1. Acquiring
  • 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
      • Capture a transaction
        POST
      • Review a transaction
        POST
      • Cancel a transaction
        POST
      • Cancel a subscription
        POST
      • Query a transaction
        POST
      • Refund a transaction
        POST
      • Search a refund transaction
        POST
      • Create a payout
        POST
      • Optimise payment methods
        POST
      • Update an order
        POST
    • Issuing
      • Cardholder
        • Create cardholder
          POST
        • Delete cardholder
          POST
        • Query cardholder
          POST
      • Card
        • Query card BIN
        • Create a card
        • Query card details
        • Recharge card
        • Withdraw from a card
        • Cancel a card
        • Update card status
        • Update card limit
  • Appendix
    • Test Cards
    • Bank Code
    • Country Code
    • Currency Code
    • Payment Methods
  1. Acquiring

Cancel a subscription

POST
https://test-api.star-saas.com/v1/cancelsubscription
Cancels a customer's subscription immediately. The customer won't be charged again for the subscription.
The contract that you've created are still charged at the end of the period, unless manually canceled.
The canceled Subscription object. Its subscription status will be set to Inactived.

Request

Body Params application/json
merchant_id
string 
required
Merchant Code or Merchant lD or Merchant Number
<= 7 characters
account_id
string 
required
Subaccount lD or Gateway Number
<= 10 characters
recurring_id
string 
required
The recurring lD is a unique identifier assigned to each subscription.
<= 50 characters
contract_name
string 
required
A descriptive name for this contract.
<= 200 characters
encryption_data
string 
required
Digital signature information: encryption_data=sha256(merchant_id + account_id + recurring_id + sign_key);
All encryption parameters need to remove spaces before encryption.
<= 64 characters
Example
{
	"merchant_id": "1018001",
	"account_id": "1018001003",
    "recurring_id": "Recurring_123456778",
    "contract_name": "Recurring Order",
	"encryption_data": "dd7272885fd236dfb8962292b70cfa89e4f17cd509dc822d87de60bdc4e385f7"
}

Request samples

Shell
JavaScript
Java
Swift
Go
PHP
Python
HTTP
C
C#
Objective-C
Ruby
OCaml
Dart
R
Request Request Example
Shell
JavaScript
Java
Swift
curl --location --request POST 'https://test-api.star-saas.com/v1/cancelsubscription' \
--header 'Content-Type: application/json' \
--data-raw '{
	"merchant_id": "1018001",
	"account_id": "1018001003",
    "recurring_id": "Recurring_123456778",
    "contract_name": "Recurring Order",
	"encryption_data": "dd7272885fd236dfb8962292b70cfa89e4f17cd509dc822d87de60bdc4e385f7"
}'

Responses

🟢200Success
application/json
Body
merchant_id
string 
optional
Merchant Code or Merchant iD or Merchant Number
<= 7 characters
account_id
string 
optional
Subaccount iD or Gateway Number
<= 10 characters
recurring_id
string 
optional
The recurring lD is a unique identifier assigned to each subscription.
<= 50 characters
cancel_status
string 
optional
Cancel Status 0: Failed 1: Success
<= 5 characters
error_message
string 
optional
Error Message in the form of "Code + Details", Please refer to Error Code
<= 500 characters
encryption_data
string 
optional
Digital signatures information
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);
All encryption parameters need to remove spaces before encryption.
<= 64 characters
Example
{
    "merchant_id": "1018001",
    "account_id": "1018001003",
    "recurring_id": "Recurring_123456778",
    "contract_name": "Recurring Order",
    "cancel_status": "1",
    "error_message": "",
    "encryption_data": "dd7272885fd236dfb8962292b70cfa89e4f17cd509dc822d87de60bdc4e385f7"
}
Previous
Cancel a transaction
Next
Query a transaction