One-time payments

One-time payment is a non-recurring payment where consumer manually authorises you to charge them only once. One time payments could example be used for selling single articles in a digital newspaper, access to a single movie, premium level of a game or anything else.

For every payment you will need to generate a custom JSON Web Token that includes all necessary details for processing the payment. Once the payment is finished, Fortumo sends you a payment notification to the URL you have provided when starting the payment session. Below you will find an option to check out a demo flow and additionally an example payload for a one time payment integration.

One-time Payment

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
{
    "iss": "d3ad608d0a1729727a3eb6bc0892b427", 
    "exp": "1988326400", 
    "sub": "hdcb", 
    "aud": "Fortumo",
    "nbf": "1485256642",
    "iat": "1485256645",
    "jti": "00001",
    "country_code": "EE",
    "channel_code": "sandbox-ee",
    "price": {
        "amount": 4.99,
        "currency": "EUR"
    },
    "item_description": "Premium Joy",
    "urls": {
        "payment_callback": "https://example.com/payments",
        "redirect": "https://example.com/payment-complete/"
    },
    "operation_reference": "session001"
}

One-time payment callbacks

After every completed payment transaction, Fortumo sends your server a payment callback. Based on payment callback and its transaction_state you will deliver your consumer service that they have paid for.

1
2
3
4
5
6
7
8
9
10
11
12
13
{
    "transaction_id": "90ffc21b-8830-467d-b1c6-18e3661cc44a",
    "transaction_state": "charged",
    "merchant": "d3ad608d0a1729727a3eb6bc0892b427",
    "operation_reference": "session001",
    "consumer_identity": "9af92f6e-b83e-3b11-9148-ca60fdeb9115",
    "error": {},
    "timestamp": "2017-01-22T11:57:35.450Z",
    "price": {
        "amount": 4.99,
        "currency": "EUR"
    }
}

Operator specific prices

With one-time payments you can define custom prices for each operator. Once operator has been selected then the defined custom price will be displayed.

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
{
    "iss": "d3ad608d0a1729727a3eb6bc0892b427", 
    "exp": "1988326400", 
    "sub": "hdcb", 
    "aud": "Fortumo",
    "nbf": "1485256642",
    "iat": "1485256645",
    "jti": "00001",
    "country_code": "EE",
    "channel_code": "sandbox-ee",
    "price": {
        "amount": 4.99,
        "custom_prices":{
            "elisa-ee":2.99
        },
        "currency": "EUR"
    },
    "item_description": "Premium Joy",
    "urls": {
        "payment_callback": "https://example.com/payments",
        "redirect": "https://example.com/payment-complete/"
    },
    "operation_reference": "session001"
}

Messaging

In live, after every payment an SMS message is sent to the end-user notifying him whether the payment was successful. There are different types of sms messages that can be sent and it varies depending on operator requirements. For ewallet payments, user receives confirmation message in their digital wallet.

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