- Guides
- API Reference
- Introduction
- Endpoints
- Data Types
- Signing
- 3-D Secure Verification
- Subscription
- Errors
- Webhooks
- Items Information
- Changelog
- Acquiring
- Create a direct paymentPOST
- Create a redirect (iFrame) paymentPOST
- Capture a transactionPOST
- Review a transactionPOST
- Cancel a transactionPOST
- Cancel a subscriptionPOST
- Query a transactionPOST
- Refund a transactionPOST
- Search a refund transactionPOST
- Create a payoutPOST
- Optimise payment methodsPOST
- Update an orderPOST
- Issuing
- Appendix
Cancel a subscription
POST
https://test-api.star-saas.com/v1/cancelsubscription
The contract that you've created are still charged at the end of the period, unless manually canceled.
Request
Body Params application/json
merchant_id
string
required
<= 7 characters
account_id
string
required
<= 10 characters
recurring_id
string
required
<= 50 characters
contract_name
string
required
<= 200 characters
encryption_data
string
required
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
<= 7 characters
account_id
string
optional
<= 10 characters
recurring_id
string
optional
<= 50 characters
cancel_status
string
optional
<= 5 characters
error_message
string
optional
<= 500 characters
encryption_data
string
optional
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"
}