Create MIT Transaction API

Last changes: 05-31-2023

The API method Create MIT transaction authorizes (and optionally auto-captures) a MIT transaction.

API Parameters

Field Description Type Length Mandatory
merchantKey The Merchant Key is the unique identifier for your integration, keep this credential secure, do not store client side. GUID 36 Yes
modificationId Merchant unique request identifier. String 64 Yes
storedPaymentOptionReference Stored payment option reference. String 36 Yes
customerAccountId Customer Account ID – A unique identifier provided by the integrating merchant by which the user’s account can be identified e.g. customer number. String 255 Yes
payment The payment amount to be charged against the payment option. Payment Object Yes
billingAddress Billing address of the consumer. Address Object Yes
shippingAddress Shipping address of the consumer. Address Object No
consumer Consumer's personal information. Person Object Yes
orderDetails Order details for the payment transaction. Order details Object No
partnerReference No Merchant internal transaction reference. If provided, enables SmartPay to block cases of double processing String 64

Mandatory data per payment option

The table below shows you the minimum data object requirements per payment option to be provided in checkout API. As SmartPay is handeling the payment option selection for you, please always send the full data required.

As an example, if you whish to offer Klarna to your consumers, please always include order details object to your checkout request. If Klarna is not in your payment scope, the oder details object is optional.

Payment option payment billingAddress shippingAddress consumer orderDetails
Credit cards Yes Yes For physical goods Yes Optional
PayPal Yes Yes For physical goods Yes Optional
SEPA DD Yes Yes Optional Yes Optional

Example

Request

Path:

POST {Base URL}/payment/mit

Header:

Content-Type: application/json
Accept-Language: en-US

{
    "merchantKey": "73afeb44-432e-4b91-be37-a6b3d2fb7447",
    "storedPaymentOptionReference": "8ac7a4a1750295aa0175074a2eb366d4"
    "modificationId": "Payment-123"
    "customerAccountId": "Test-123",
    "payment": {
        "currencyCode": "EUR",
        "amount": 50.99,
        "description": "SMP-Transaction-01"
    },
    "billingAddress": {
        "addressLine1": "Leopoldstrasse",
        "number": "244",
        "city": "Munich",
        "postCode": "80807",
        "countryCode": "DE"
    },
    "shippingAddress": {
        "addressLine1": "Leopoldstrasse",
        "number": "244",
        "city": "Munich",
        "postCode": "80807",
         "countryCode": "DE"
    },
    "consumer": {
        "emailAddress": "hells.butcher_001@mail.com",
        "gender": "f",
        "lastName": "Hells",
        "firstName": "Butcher",
        "middleName": "fon",
        "title":"Mrs",
        "culture": "de-de",
        "dateOfBirth": "2000-01-01",
        "mobilePhone": "015xx22-2135466",
        "taxId": "00745948504594"
    },
    "orderDetails": {  
        "externalOrderReference": "Test 123",
        "orderPositions":[{
                "positionNumber": "1",
                "positionType": "Physical",
                "articleId":"321456",
                "articleName":"tire",
                "quantity":4,
                "netAmount":384,
                "taxAmount":16,
                "grossAmount":400,
                "taxRatePercent":4.00,
                "netPrice":1536,
                "taxPrice":64,
                "grossPrice":1600
            },
            {
                "positionNumber": "2",
                "positionType": "Physical",
                "articleId":"321456",
                "articleName":"tire",
                "quantity":4,
                "netAmount":384,
                "taxAmount":16,
                "grossAmount":400,
                "taxRatePercent":4.00,
                "netPrice":1536,
                "taxPrice":64,
                "grossPrice":1600
            }
        ]
    }
}

Response

200 (OK)
Content-Type: application/json
{
"description": "SMP-Transaction-01",
"paymentStatus": "AUTHORIZATION COMPLETED",
"creationDate": "2020-12-15T14:35:44.532Z",
"lastStatusDate": "2020-12-15T14:36:45.031Z",
"transactionOverview": {
    "mit":true;
    "amount": 50.99,
    "currencyCode": "EUR",
    "transactionId": "8b52a0f0-471b-4721-8677-cf2005ae195f",
    "paymentMethod": "VISA",
    "customerAccountId": "Test-123"
    },
 "reconciliationReferenceId": "tbq2L6hO20Xk4vUktm7Ww",
 "modificationId": "2383b1117b-0006-4d14-96d9-57a9af1ffh33"
}

Response on failure

Status Code:

400 (Bad Request)

Header:

Content-Type: application/json
Accept-Language: en-US

Content-Type: application/json
{
  "description": "SMP-Transaction-01",
  "paymentStatus": "FAILED",
  "creationDate": "2020-12-15T14:35:44.532Z",
  "lastStatusDate": "2020-12-15T14:36:45.031Z",
  "transactionOverview": {
    "mit":true;
    "amount": 66.60,
    "currencyCode": "EUR",
    "transactionId": "8b52a0f0-471b-4721-8677-cf2005ae195f",
    "paymentMethod": "VISA",
    "customerAccountId": "Test-123"
  },
  "modificationId": "2381b1117b-0006-4d14-96d9-57a9af1ffh33",
  "error": "gateway_processing"
}