The remote authorisation is an on demand type of authorisation. In order to gain access to it, please contact your account manager.
User experience looks as following:
Authorisation state | Description |
---|---|
new | New authorisation object has been created with charging token. |
verified | Authorisation is always verified, charge request can be done only after authorisation is verified |
For starting a remote authorisation session you will need to make a request to Fortumo API with specifying the flow type and channel code.
You can either have operation_reference for each request you make in order to know about which request the callback is in presence to or have one operation_reference per one user authorisation session.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 | POST /authorisations HTTP/1.1 Content-Type: application/json Authorization: Bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJSUzI1NiJ9....CgVKRghGWI6-QjMv8JpJi1GarWaQ06CG9d0c1PDFek { "flow":{ "remote_auth":{ "channel_code":"sandbox-ee", "msisdn":"37256656656" } }, "country":"EE", "merchant":"377b7cdc1716225e7766a7a46e0bbb73", "operation_reference":"remote_authorisation1", "callback":"https://your-callback-url-here.com", "item_description":"Premium Payment", "price":{ "amount":1, "currency":"EUR" } } |
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 | { "charging_token":"314fc61c-4e01-4b29-aa0c-e67f805280ed:f87ab3f6", "authorisation_state":"new", "merchant":"377b7cdc1716225e7766a7a46e0bbb73", "operation_reference":"remote_authorisation1", "consumer_identity":"e4ee1f12-5a07-3bb8-9eec-a4a0dfd23de7", "channel":{ "code":"sandbox-ee", "country":"EE" }, "error":{ }, "timestamp":"2020-07-16T08:27:50.421Z", "metadata":{ } } |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 | { "charging_token":"314fc61c-4e01-4b29-aa0c-e67f805280ed:f87ab3f6", "authorisation_state":"verified", "merchant":"377b7cdc1716225e7766a7a46e0bbb73", "operation_reference":"remote_authorisation1", "consumer_identity":"e4ee1f12-5a07-3bb8-9eec-a4a0dfd23de7", "channel":{ "code":"sandbox-ee", "country":"EE" }, "error":{ }, "timestamp":"2020-07-16T08:35:50.421Z", "metadata":{ } } |