Terminating authorisation

Authorisation can be terminated by invalidating the charging token. This can be triggered via the following API or by Fortumo for example when customer or operator requests to block any new charges.

In order to initiate charging token invalidation POST request towards Fortumo API must be made.

Endpoint URL:

https://api-jwt.fortumo.io/authorisations/{charging_token}/invalidate/

Request parameters
Parameter Type Required Description
merchant String Mandatory Merchant account id, provided by Fortumo, Example: 27f883a72g93a62b916957df48a1ef52
reason String Optional Reason why the charging token was is manually invalidated. Example: Manual suspension of subscription
callbacks String Mandatory A HTTPS URL for delivering message status and delivery callbacks. Example: https://your-callback-url-here.com
1
2
3
4
5
6
7
8
9
POST 3ee1b907-d7f7-4839-be2a-720cb84b0a61:785e927f/invalidate HTTP/1.1
Content-Type: application/json
Authorization: Bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJSUzI1NiJ9....CgVKRghGWI6-QjMv8JpJi1GarWaQ06CG9d0c1PDFek

{
    "merchant": "cacfc6252d6ff34ce4904eck78ec876c",
    "reason": "Manual suspension of subscription",
    "callbacks": ["https://your-callback-url-here.com"]
}
Callback triggered on status change

After a successful unsubscribe a callback is sent to merchant notifying the relevant status change.

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
{
  "flow": {
    "he": {
      "url": "http:\/\/cellcard-d08474e04f10-he.fortumo.io\/he?s=2ZBjMN9kbA-OoJOir9dO2_RBN",
      "request_type": "GET"
    }
  },
  "charging_token": "3ee1b907-d7f7-4839-be2a-720cb84b0a61:785e927f",
  "authorisation_state": "invalidated",
  "merchant": "cacfc6252d6ff34ce4904eck78ec876c",
  "operation_reference": "6702125",
  "consumer_identity": "1b496eca-e657-3ce6-a003-9e49844cc31a",
  "channel": {
    "code": "cellcard-kh",
    "country": "KH"
  },
  "error": {
    
  },
  "timestamp": "2018-06-05T06:39:36.311Z",
  "metadata": {
    
  }
}

Any new charging attempt with the invalidated token will receive error ERR_752 and this user should not be charged by merchant and any recurring subscriptions should be terminated.

Help us improve our Merchants Portal. Was this article helpful?