Cancel subscription

Subscription can be stopped or started.

In order to stop or start previously created subscription, send POST request:

Stop/start subscription

POST /api/subscription

Request parameters

Parameters                        Type Mandatory Description
order_id string(1024) mandatory Order ID which is generated by merchant
merchant_id integer(12) mandatory Merchant unique ID. Generated by Flitt during merchant registration
signature string(40) mandatory Order signature. Required to verify merchant request consistency and authenticity. Signature generation algorithm please see at Signature generation for request and response
action string(10000) mandatory stop or start
Parameters                        Type Description
order_id string(1024) Order ID which is generated by merchant.
merchant_id integer(12) Merchant unique ID. Generated by Flitt during merchant registration.
response_status string(50) Request processing status. If request did not pass validation then failure, else success
signature string(40) Order signature. Required to verify merchant request consistency and authenticity. Signature generation algorithm please see at Signature generation for request and response and response
status string(1024) disabled or active

Example

Request:

curl -L 'https://pay.flitt.com/api/subscription' \
-H 'Content-Type: application/json' \
-d '{
  "request": {
    "order_id": "test_subscription11",
    "merchant_id": 1549901,
    "action": "start",
    "signature": "a7adf395dae783a4676abbafe7f2479b2f6cfbca"
  }
}'

Response:

{
    "response": {
        "response_status": "success",
        "merchant_id": 1549901,
        "order_id": "test_subscription11",
        "status": "active",
        "signature": "a7adf395dae783a4676abbafe7f2479b2f6cfbca"
    }
}

Request:

curl -L 'https://pay.flitt.com/api/subscription' \
-H 'Content-Type: application/json' \
-d '{
  "request": {
    "order_id": "test_subscription11",
    "merchant_id": 1549901,
    "action": "stop",
    "signature": "07736b7a2687b7429af7334f756ddcfb597456f1"
  }
}'

Response:

{
    "response": {
        "response_status": "success",
        "merchant_id": 1549901,
        "order_id": "test_subscription11",
        "status": "disabled",
        "signature": "07736b7a2687b7429af7334f756ddcfb597456f1"
    }
}