Create MIT Transaction API

Last changes: 01-18-2024

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, unless dealReference is provided.
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 No for Checkout, Yes for Create MIT transaction, unless dealReference is provided.
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 Mandatory if "businessConsumer" object is not provided.Consumer's personal information. consumer Object Conditional
businessConsumer Mandatory if "consumer" object is not provided. Business/Company information. businessConsumer Object Conditional
orderDetails Order details for the payment transaction. Order details Object No
partnerReference Merchant internal transaction reference. If provided, enables SmartPay to block cases of double processing. String 64 No
criteria List of custom key-value pairs that the merchant can submit. the names "callBackUrl" and "redirectUrl" will be disregarded. Array Object No
deal Details of the deal. Used only for 3RI payments (Partial/split shipment and Delayed shipment use cases). Deal Object No

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
{
"partnerReference": "5436543345876",
"description": "SMP-UAT-02*k2t3gn",
"reconcialationReferenceId": "FJ9wbkRjJZsRYCrjgaGGY",
"modificationId": "mod-id-000002",
"paymentStatus": "AUTHORIZATION COMPLETED",
"creationDate": "2020-12-15T14:35:44.532Z",
"lastStatusDate": "2020-12-15T14:36:45.031Z",
"transactionOverview": {
    "mit":true;
    "amount": 35.99,
    "currencyCode": "EUR",
    "transactionId": "8b52a0f0-471b-4721-8677-cf2005ae195f",
    "paymentMethod": "VISA",
    "customerAccountId": "Test-123"
    }
}

Response on failure

Status Code:

400 (Bad Request)

Header:

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

{
"description": "SMP-UAT-02*k2t3gn",
"reconcialationReferenceId": "FJ9wbkRjJZsRYCrjgaGGY",
"modificationId": "mod-id-000002",
"paymentStatus": "FAILED",
"creationDate": "2020-12-15T14:35:44.532Z",
"lastStatusDate": "2020-12-15T14:36:45.031Z",
"error":"Payment provider failed.",
"transactionOverview": {
    "mit":true;
    "amount": 35.99,
    "currencyCode": "EUR",
    "transactionId": "8b52a0f0-471b-4721-8677-cf2005ae195f",
    "paymentMethod": "VISA",
    "customerAccountId": "Test-123"
    }
}