API
  1. Acquiring
API
  • 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
      • Refund a transaction
        POST
      • Search a refund transaction
        POST
      • Review a transaction
        POST
      • Cancel a transaction
        POST
      • Cancel a subscription
        POST
      • Capture a transaction
        POST
      • Create a payout
        POST
      • Optimise payment methods
        POST
    • Issuing
      • Cardholder
        • Create cardholder
          POST
        • Delete cardholder
          POST
        • Query cardholder
          POST
      • Group
        • Create group
        • Query group details
        • Cancel group
        • Refund group
        • Update group status
        • Recharge group
      • Card
        • Create a card
        • Query card BIN
        • Recharge card
        • Withdraw from a card
        • Cancel a card
        • Update card status
        • Update card limit
        • Query card details
  • 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

Body Params application/xml

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.sufupayment.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"
}'

Responses

🟢200Success
application/json
Body

Example
{
    "merchant_id": "1018001",
    "account_id": "1018001003",
    "recurring_id": "Recurring_123456778",
    "contract_name": "Recurring Order",
    "cancel_status": "1",
    "error_message": "",
    "encryption_data": "dd7272885fd236dfb8962292b70cfa89e4f17cd509dc822d87de60bdc4e385f7"
}
Modified at 2025-07-08 10:16:25
Previous
Cancel a transaction
Next
Capture a transaction