Create MIT Transaction API
The API method Create MIT transaction authorizes (and optionally auto-captures) a MIT transaction.
API Parameters
The request must have the following headers:
- Content-Type:
application/json
- Accept-Language:
en-US
- Origin:
{ Origin }
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 |
targetMerchantAccountReference | If provided, the payment is processed in favour of the indicated submerchant account, and the main merchant account number is ignored. | String | 127 | No |
In case of payments to different target merchant accounts in the same marketplace, the target merchant accounts references should be provided by merchant to their dedicated Product Solutions Specialist.
Please refer to our data model for details regarding the referenced objects.
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 handling the payment option selection for you, please always send the full data required.
Payment option | payment | billingAddress | shippingAddress | consumer |
---|---|---|---|---|
Apple Pay | Yes | Optional | Optional | Yes |
Credit cards | Yes | Yes | For physical goods | Yes |
Google Pay | Yes | Optional | Optional | Yes |
IDEAL | Yes | Yes | Optional | Yes |
Pay-by-Bank | Yes | Yes | Optional | Yes |
PayPal | Yes | Yes | For physical goods | Yes |
PayU | Yes | Yes | Optional | Yes |
SEPA DD | Yes | Yes | Optional | Yes |
Minimum data requirements are determined by regualtory and payment provider requirements. Please reach out to your Product Solutions Specialist for further details.
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
}
]
}
}
The Create Checkout response includes the 36-character GUID of the transaction-ID.
Response
Status Code:
200 (OK)
Header:
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": {
"amount": 35.99,
"currencyCode": "EUR",
"mit": true,
"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": {
"amount": 35.99,
"currencyCode": "EUR",
"mit": true,
"transactionId": "8b52a0f0-471b-4721-8677-cf2005ae195f",
"paymentMethod": "VISA",
"customerAccountId": "Test-123"
}
}
If you receive an HTTP status other then 2xx, the request failed. Please try to interpret the response message to correct your request and contact customer support in case of further questions.