Payment Menu v2

MOTO

Mail Order / Telephone Order transactions.

Edit "MOTO" on GitHub

MOTO

warning

This feature is only available for merchants who have a specific agreement with Swedbank Pay.

MOTO (Mail Order / Telephone Order) is a purchase where you, as a merchant, enter the payer’s card details in order to make a payment. The payer provides the card details to the sales representative by telephone or in writing. The sales representative will then enter the details into the payment interface.

Common use cases are travel or hotel bookings, where the payer calls the sales representative to make a booking. This feature is only supported with the Purchase operation. See the abbreviated example below on how to implement MOTO by setting the generateMotoPayment to true.

MOTO Request

Request

1
2
3
4
POST /psp/paymentorders/payments HTTP/1.1
Host: api.externalintegration.payex.com
Authorization: Bearer <AccessToken>
Content-Type: application/json
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
{
    "paymentorder": {
        "operation": "Purchase",
        "intent": "Authorization",
        "generateMotoPayment": true,
        "currency": "NOK",
        "prices": [{
                "type": "CreditCard",
                "amount": 1500,
                "vatAmount": 0
            }
        ],
        "description": "Test Moto",
        "userAgent": "Mozilla/5.0...",
        "language": "nb-NO",
        "urls": {
            "hostUrls": ["https://example.com"],
            "completeUrl": "https://example.com/payment-completed",
            "cancelUrl": "https://example.com/payment-cancelled",
            "callbackUrl": "https://example.com/payment-callback"
        },
        "payeeInfo": {
            "payeeId": "5cabf558-5283-482f-b252-4d58e06f6f3b",
            "payeeReference": "CD1234",
            "payeeName": "Merchant1",
            "productCategory": "A123",
            "orderReference": "or-12456",
            "subsite": "MySubsite"
        }
    }
}

MOTO Response

To authorize the payment, find the operation with rel equal to redirect-paymentorder in the response, and redirect the merchant employee to the provided href to fill out the payer’s card details. You will find an abbreviated example of the response provided below.

Response

1
2
HTTP/1.1 200 OK
Content-Type: application/json
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
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
{
  "paymentorder": {
        "id": "/psp/creditcard/payments/a205c77e-2f0a-4564-3e60-08d8d3ed4699",
        "number": 40106480687,
        "created": "2021-02-24T12:51:51.0932275Z",
        "updated": "2021-02-24T12:51:51.2935307Z",
        "instrument": "CreditCard",
        "operation": "Purchase",
        "intent": "Authorization",
        "state": "Ready",
        "currency": "NOK",
        "prices": {
            "id": "/psp/creditcard/payments/a205c77e-2f0a-4564-3e60-08d8d3ed4699/prices"
        },
        "amount": 0,
        "description": "Test Moto",
        "initiatingSystemUserAgent": "swedbankpay-sdk-dotnet/3.0.1",
        "userAgent": "Mozilla/5.0...",
        "language": "nb-NO",
        "urls": {
            "id": "/psp/paymentorders/payments/a205c77e-2f0a-4564-3e60-08d8d3ed4699/urls"
        },
        "payeeInfo": {
            "id": "id": "/psp/paymentorders/payments/a205c77e-2f0a-4564-3e60-08d8d3ed4699/payeeInfo"
        },
        "metadata": {
            "id": "/psp/paymentorders/payments/a205c77e-2f0a-4564-3e60-08d8d3ed4699/metadata"
        }
    },
       "operations": [
        {
            "method": "PATCH",
            "href": "https://api.externalintegration.payex.com/psp/creditcard/payments/a205c77e-2f0a-4564-3e60-08d8d3ed4699",
            "rel": "update-payment-abort",
            "contentType": "application/json"
        },
        {
            "method": "GET",
            "href": "https://ecom.externalintegration.payex.com/creditcardv3/core/js/px.creditcard.client.js?token=a0a2da77fe9582387d384b77cc0d7d04fb861d10ba13fc46d3abca00f4a1368f&operation=authorize",
            "rel": "view-authorization",
            "contentType": "application/javascript"
        },
        {
            "method": "GET",
            "href": "https://ecom.externalintegration.payex.com/creditcardv3/payments/authorize/a0a2da77fe9582387d384b77cc0d7d04fb861d10ba13fc46d3abca00f4a1368f",
            "rel": "redirect-authorization",
            "contentType": "text/html"
        },
        {
            "method": "GET",
            "href": "https://ecom.externalintegration.payex.com/creditcardv3/core/js/px.creditcard.client.js?token=a0a2da77fe9582387d384b77cc0d7d04fb861d10ba13fc46d3abca00f4a1368f",
            "rel": "view-payment",
            "contentType": "application/javascript"
        }
    ]
}