Quickstart - Malformed request

This example shows validation errors against the JSON schema.

Such type of errors will be responded with code = SchemaValidationError.

The below request contains the following errors:

  • mandatory element legalName of the merchant not provided
  • incorporationDate of relatedCompanies has the wrong format (08-08-2010)
  • baseCurrencyCode is not ISO-3
  • mandatory collection of shops is missing

Paste the below JSON sample request in the Postman Body field.

Example POST /merchants malformed request:

{
   "name":"BS-28122017_Scenario_1_1",
   "legalForm":"PrivateCompany",
   "merchantCategoryCode":"0742",
   "incorporationDate":"08-08-2010",
   "incorporationNumber":"Test",
   "taxNumber":"Test",
   "baseCurrencyCode":"Dollar",
   "estimatedMonthlyVolumeInEUR":"5",
   "estimatedNumberOfTransactionsPerMonth":"15",
   "lowestAmountPerTransactionInEUR":"1",
   "highestAmountPerTransactionInEUR":"1",
   "averageAmountPerTransactionInEUR":"1",
   "partnerId":"CAAB26D2-6E46-E911-A82D-000D3AB18D29",
   "companyPhoneNumber":"12345",
   "companyFaxNumber":"789090",
   "licenseNumber":"123456",
   "incorporationAddress":{
      "street":"TestStreet 1",
      "city":"TestCity",
      "postalCode":"1010",
      "country":"AT"
   },
   "operationAddress":{
      "street":"TestStreet 1",
      "city":"TestCity",
      "postalCode":"1010",
      "country":"AT"
   },
   "paymentMethodConfig":{
      "cardDeposit":{
         "cardAcceptanceMode":"POS",
         "useAccountStatusInquiry":"true"
      }
   },
   "relatedPeople":[
      {
         "roles":[
           "Signatory",
           "Owner",
           "TechnicalContact",
           "OperationalContact"
         ],
         "firstname":"TestFirstName",
         "lastname":"TestLastName",
         "dateOfBirth":"2000-08-30",
         "email":"[email protected]",
         "skypeName":"testskypename",
         "phoneNumber":"31231414",
         "shareOrOwnershipPercentage":"5",
         "passportOrGovernmentNumber":"12345",
         "address":{
            "street":"TestStreet 1",
            "city":"TestCity",
            "postalCode":"1010",
            "country":"AT"
         }
      }
   ],
   "relatedCompanies":[
      {
         "roles":[
            "Owner"
         ],
         "incorporationAddress":{
            "street":"Test street 1",
            "city":"TestCity",
            "postalCode":"1010",
            "country":"AT"
         },
         "name":"RelatedCompany",
         "taxnumber":"1234",
         "incorporationDate":"2007-01-01",
         "incorporationNumber":"ABC12345",
         "ShareOrOwnershipPercentage":"3"
      }
   ],
   "questionAnswerPairs":[
      {
         "questionId":"BusinessModelDescription",
         "answer":"Answer to BusinessModelDescription"
      },
      {
         "questionId":"LengthOfAcquirerRelationship",
         "answer":"Answer to LengthOfAcquirerRelationship"
      },
      {
         "questionId":"ReasonForNewAcquirer",
         "answer":"Answer to ReasonForNewAquirer"
      },
      {
         "questionId":"TimeAcceptingCards",
         "answer":"Answer to TimeAcceptingCards"
      },
      {
         "questionId":"CardTypes",
         "answer":"Answer to CardTypes"
      },
      {
         "questionId":"CustomersPhoneAddress",
         "answer":"Answer to CustomersPhoneAddress"
      },
      {
         "questionId":"CVVCompulsory",
         "answer":"Answer to CVVCompulsory"
      },
      {
         "questionId":"Is3DSecureMandatory",
         "answer":"Answer to Is3DSecureMandatory"
      },
      {
         "questionId":"Is3DSEnabled",
         "answer":"Answer to Is3DSEnabled"
      },
      {
         "questionId":"ChargebackFraudProcess",
         "answer":"Answer to ChargebackFraudProcess"
      },
      {
         "questionId":"VerifyCustomer",
         "answer":"Answer to VerifyCustomer"
      },
      {
         "questionId":"CurrentAcquirers",
         "answer":"Answer to CurrentAcquirers"
      },
      {
         "questionId":"NoLicenseOrAuthorizationNumberProvided",
         "answer":"Answer to NoLicenseOrAuthorizationNumberProvided"
      },
      {
         "questionId":"RiskMeasure_RollingReserve",
         "answer":"Answer to RiskMeasure_RollingReserve"
      },
      {
         "questionId":"RiskMeasure_SecurityDeposit",
         "answer":"Answer to RiskMeasure_SecurityDeposit"
      },
      {
         "questionId":"RiskMeasure_Delayed Settlement",
         "answer":"Answer to RiskMeasure_Delayed Settlement"
      }
   ]
}

The following response will be returned with HTTP status code 400 - Bad Request.

Example POST /merchants response with list of errors:

{
    "code": "MultipleErrors",
    "message": "Request validation failed.",
    "moreInfo": "https://developer.kalixa.com/v1.0/reference#payment-service-v6-overview",
    "details": [
        {
            "code": "SchemaValidationError",
            "message": "A validation error occurred while processing the request.",
            "moreInfo": "https://developer.kalixa.com/v1.0/reference#payment-service-v6-overview",
            "details": {
                "fieldName": "newMerchant.legalName",
                "fieldValue": "The field 'legalName' is required."
            }
        },
        {
            "code": "SchemaValidationError",
            "message": "A validation error occurred while processing the request.",
            "moreInfo": "https://developer.kalixa.com/v1.0/reference#payment-service-v6-overview",
            "details": {
                "fieldName": "newMerchant.incorporationDate",
                "fieldValue": "The field 'incorporationDate' must match the regular expression '^\\d{4}-\\d{1,2}-\\d{1,2}$'."
            }
        },
        {
            "code": "SchemaValidationError",
            "message": "A validation error occurred while processing the request.",
            "moreInfo": "https://developer.kalixa.com/v1.0/reference#payment-service-v6-overview",
            "details": {
                "fieldName": "newMerchant.baseCurrencyCode",
                "fieldValue": "The field 'baseCurrencyCode' must match the regular expression '^[A-Z]{3}$'."
            }
        },
        {
            "code": "SchemaValidationError",
            "message": "A validation error occurred while processing the request.",
            "moreInfo": "https://developer.kalixa.com/v1.0/reference#payment-service-v6-overview",
            "details": {
                "fieldName": "newMerchant.shops",
                "fieldValue": "The field 'shops' is required."
            }
        }
    ]
}