Redirect authorisation

The redirect authorisation is an on demand type of authorisation. In order to gain access to it, please contact your account manager.

This authorisation type is needed to support specific connections with providers (digital wallets or other payment providers) that require the end-user to complete authorisation on their end. This flow type can be used for USDK and PAPI products. Depending on the provider specifics, authorisation can be started from the MSISDN entry screen or from the redirect to the provider to authorise the payment. The redirection URL (redirect_url callback parameter) is generated by the provider as soon as authorisation is initiated. Merchants need to take a redirect_url from the callback and direct the end-user to this URL to complete the authorisation. After the authorisation is completed the user will be redirected to the forward_url specified in the request. Verified callback will be sent once authorisation is completed. As a result of redirect authorisation, a token is created based on which end-user will be charged.

Possible authorisation states

Authorisation state Description
new A new authorisation object has been created.
pending The external authorisation has been requested. The user is directed to the external provider (wallet/other provider etc) for confirmation. Redirect URL is sent.
confirmed The user has confirmed authorisation and has been directed back to the service.
verified The authorisation has been verified, the consumer can proceed to the charge.
failed The authorisation has failed.

Request to Fortumo Authorisation API - initiating an authorisation session

For starting a redirect authorisation session you will need to make a request to Fortumo API with specifying the flow type redirect_auth that includes channel code channel_code and forward_url parameters. ‘Forward_url’ refers to the page where the end-user will be taken after completion of the authorisation. In some cases providers require MSISDN to be passed in the request.

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
POST /authorisations HTTP/1.1
Content-Type: application/json
Authorization: Bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJSUzI1NiJ9....CgVKRghGWI6-QjMv8JpJi1GarWaQ06CG9d0c1PDFek

{
   "flow":{
      "redirect_auth":
      {"msisdn":"55469408",
         "channel_code":"dana-id",
         "forward_url":"https://your-forward-url-here.com"
      }
   },
   "country":"ID",
   "merchant":"09cfe3106e14991a1079d25b46020abe",
   "callback":"https://your-callback-url-here.com",
   "subscription":{
      "item_description":"Premium Subscription",
      "price":{
         "amount":9,
         "currency":"IDR"
      },
      "duration":1,
      "cycles":3,
      "unit":"days",
      "operation_reference":"youropreserence1",
      "unsubscribe_url":"https://your-unsubscribe-url-here.com",
      "callbacks":[
         "https://your-callback-url-here.com"
      ]
   }
}

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
POST /authorisations HTTP/1.1
Content-Type: application/json
Authorization: Bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJSUzI1NiJ9....CgVKRghGWI6-QjMv8JpJi1GarWaQ06CG9d0c1PDFek

{
   "flow":{
      "redirect_auth":{
         "channel_code":"dana-id",
         "forward_url":"https://your-forward-url-here.com"
      }
   },
   "country":"ID",
   "merchant":"09cfe3106e14991a1079d25b46020abe",
   "callback":"https://your-callback-url-here.com",
   "subscription":{
      "item_description":"Premium Subscription",
      "price":{
         "amount":9,
         "currency":"IDR"
      },
      "duration":1,
      "cycles":3,
      "unit":"days",
      "operation_reference":"youropreserence1",
      "unsubscribe_url":"https://your-unsubscribe-url-here.com",
      "callbacks":[
         "https://your-callback-url-here.com"
      ]
   }
}

Fortumo callback

Callback with authorisation_state new is made to your server providing you a charging token that can be used for identifying the authorisation session.

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
 
{
  "flow": {
    "redirect_auth": {
      "redirect_url": "https://your-redirect-url-here.com"
    }
  },
  "charging_token": "91aa2618-359b-433a-894c-7cac46de2e66:dc085bb3",
  "authorisation_state": "new",
  "merchant": "09cfe3106e14991a1079d25b46020abe",
  "operation_reference": "youropreserence1",
  "channel":{
      "code":"dana-id",
      "country":"ID"
   },
  "error": {},
  "timestamp": "2021-05-13T12:22:21.969Z",
  "metadata": { }
}  
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
 
{
  "flow": {
    "redirect_auth": {
      "redirect_url": "https://your-redirect-url-here.com"
    }
  },
  "charging_token": "91aa2618-359b-433a-894c-7cac46de2e66:dc085bb3",
  "authorisation_state": "verified",
  "merchant": "09cfe3106e14991a1079d25b46020abe",
  "operation_reference": "youropreserence1",
  "channel":{
      "code":"dana-id",
      "country":"ID"
   },
  "error": {},
  "timestamp": "2021-05-13T12:22:21.969Z",
  "metadata": { }
}  

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