ELANLINK
  1. Acquiring
ELANLINK
  • 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 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
  • Appendix
    • Test Cards
    • Bank Code
    • Country Code
    • Currency Code
    • Payment Methods
  1. Acquiring

Cancel a subscription

POST
/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 Request Example
Shell
JavaScript
Java
Swift
curl --location --request POST 'https://test.your-api-server.com/v1/cancelsubscription' \
--header 'Content-Type: application/xml' \
--data-raw '{
	"merchant_id": "1018001",
	"account_id": "1018001003",
    "recurring_id": "Recurring_123456778",
    "contract_name": "Recurring Order",
	"encryption_data": "dd7272885fd236dfb8962292b70cfa89e4f17cd509dc822d87de60bdc4e385f7"
}'
Response Response Example
{
  "merchant_id": "1018001",
  "account_id": "1018001003",
  "recurring_id": "Recurring_123456778",
  "contract_name": "Recurring Order",
  "cancel_status": "1",
  "error_message": "",
  "encryption_data": "dd7272885fd236dfb8962292b70cfa89e4f17cd509dc822d87de60bdc4e385f7"
}

Request

Body Params application/xml
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
Examples

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
Previous
Cancel a transaction
Next
Query a transaction