Create Subscription Checkout API

Last changes: 02-04-2022

The API method Create Subscription Checkout initiates the subscription creation request.

API Parameters

Field Mandatory Description Type Length
merchantKey Yes The Merchant Key is the unique identifier for your integration, keep this credential secure, do not store client side. GUID 36
customerAccountId Yes 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
selectedStoredPaymentOption No Consumer's stored payment option reference. When provided, SmartPay Widget will pre-select stored option with given reference in the list of options when it gets rendered. Suppresses the 'Default' payment option highlighting and 'Set default' functionality. String 36
payment Yes Includes currency, average payment amount of the later MIT transactions and description. Use "0" as amount, in case an average amount can not be determined. Payment Object
billingAddress Yes Billing address of the consumer. Address Object
consumer Yes Consumer's personal information. Person Object

Example

Request

Path:

POST {Base URL}/payment/mit/subscription/creation

Header:

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

{
    "merchantKey": "73afeb44-432e-4b91-be37-a6b3d2fb7447",
    "customerAccountId": "Test-123",
    "payment": {
        "amount": 0.00,
        "currencyCode": "EUR",
        "description": "SMP*SUBSCR*MIT"
    },
    "billingAddress": {
        "addressLine1": "Leopoldstrasse",
        "city": "München",
        "countryCode": "DE",
        "number": "244",
        "postCode": "80807",
        "homePhone": "333444555"
    },
    "consumer": {
        "dateOfBirth": "1980-01-01",
        "title": "Mr",
        "mobilePhone": "333444555",
        "culture": "en-US",
        "firstName": "Hells",
        "lastName": "Butcher",
        "emailAddress": "hells.butcher_001@mail.com"
  }
}

Response

{
    "subscriptionId": "b42f3a65-2cfe-4589-b5e6-0b8533098916",
    "requestTime": "2021-03-10T15:59:47.954Z"
}

Response on failure

Status Code:

400 (Bad Request)

Header:

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

{
    "message": {
        "message": [
            {
                "consumer": [
                    "Invalid date of birth"
                ]
            }
        ]
    }
}

Document version 1.0 - 2021-03-10 - initial version