Quick Start (Backend2Backend)

This quick start demonstrates how to initiate a Visa card deposit using the Backend2Backend Integration Option (via direct API call).

Step 1: Call initiatePayment

Use Google Chrome with Postman for example to POST (over https) the following request to PaymentService:

URL:
https://api.test.kalixa.com/PaymentRedirectionService/PaymentService.svc/pox/initiatePayment

Headers:

  • Authorization = Basic S2FsaXhhQWNjZXB0RGVtb1N5c3RlbVVzZXI6S2FsaXhhQWNjZXB0RGVtb1Bhc3N3b3Jk
    • The long string after "Basic " is simply base64({username}:{password})
    • Username = KalixaAcceptDemoSystemUser
    • Password = KalixaAcceptDemoPassword
    • Username and Password can be set automatically by the Authentication screen in Postman. The below screen of Postman automatically creates the Authorization header.
1071
  • Content-Type = application/xml; charset=utf-8
    • This header can be generated automatically by selecting Raw and then application/xml from the Body screen in Postman

Body:
Choose Raw and then application/xml, which automatically sets the Content-Type header. The headers will finally look like this:

1210

Paste the below in the Body field:

<initiatePaymentRequest xmlns="http://www.cqrpayments.com/PaymentProcessing"
                        xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
                        xmlns:xsd="http://www.w3.org/2001/XMLSchema">
  <merchantID>KalixaAcceptDEMO</merchantID>
  <shopID>KalixaAcceptDEMO</shopID>
  <merchantTransactionID>Order99999</merchantTransactionID>
  <paymentMethodID>2</paymentMethodID>
  <amount currencyCode="EUR">100</amount>
  <userID>u12312312</userID>
  <userData>
    <username>johndoe</username>
    <firstname>John</firstname>
    <lastname>Doe</lastname>
    <currencyCode>EUR</currencyCode>
    <languageCode>EN</languageCode>
    <email>[email protected]</email>
    <address>
      <street>Marxergasse</street>
      <houseNumber>1b</houseNumber>
      <postalCode>1030</postalCode>
      <city>Vienna</city>
      <countryCode2>AT</countryCode2>
      <telephoneNumber>00437778889999</telephoneNumber>
    </address>
    <dateOfBirth>1980-10-10T00:00:00</dateOfBirth>
    <gender>Male</gender>
  </userData>

  <userIP>127.0.0.1</userIP>
  <userSessionID>123</userSessionID>
  <creationTypeID>1</creationTypeID>

  <specificPaymentData>
    <data xsi:type="keyStringValuePair">
      <key>PaymentDescription</key>
      <value>some description</value>
    </data>
    <data xsi:type="keyStringValuePair">
      <key>PaymentDescriptionLanguageCode</key>
      <value>en</value>
    </data>
  </specificPaymentData>

  <paymentAccount>
    <specificPaymentAccountData>
      <data xsi:type="keyStringValuePair">
        <key>CardNumber</key>
        <value>4111111111111111</value>
      </data>
      <data xsi:type="keyStringValuePair">
        <key>CardVerificationCode</key>
        <value>111</value>
      </data>
      <data xsi:type="keyStringValuePair">
        <key>HolderName</key>
        <value>John Doe</value>
      </data>
      <data xsi:type="keyIntValuePair">
        <key>ExpiryMonth</key>
        <value>1</value>
      </data>
      <data xsi:type="keyIntValuePair">
        <key>ExpiryYear</key>
        <value>2099</value>
      </data>
    </specificPaymentAccountData>
  </paymentAccount>

</initiatePaymentRequest>

Postman should look like this:

952

So the headers will be:

1210

After pressing the Send button you shold see the following:

640
<initiatePaymentResponse xmlns="http://www.cqrpayments.com/PaymentProcessing"
                         xmlns:xsd="http://www.w3.org/2001/XMLSchema"
                         xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
  <payment xsi:type="paymentWithPaymentAccount">
    <merchantID>KalixaAcceptDEMO</merchantID>
    <shopID>KalixaAcceptDEMO</shopID>
    <paymentMethod>
      <key>2</key>
      <value>VISA Deposit</value>
    </paymentMethod>
    <merchantTransactionID>Order99999</merchantTransactionID>
    <paymentID>86b10ad3-d7f6-43fe-bccf-cfde79689584</paymentID>
    <userID>u12312312</userID>
    <paymentProvider>
      <key>92</key>
      <value>CQRUK</value>
    </paymentProvider>
    <amount currencyCode="EUR">100</amount>
    <creationType>
      <key>1</key>
      <value>User</value>
    </creationType>
    <userIP>127.0.0.1</userIP>
    <state>
      <id>b8c96597-97f7-4ed8-ba63-1d512f8eb62a</id>
      <definition>
        <key>13</key>
        <value>AuthorisedByProvider</value>
      </definition>
      <createdOn>2017-03-29T13:52:03.9956024Z</createdOn>
      <description>Approved or completed successfully</description>
      <paymentStateDetails>
        <detail xsi:type="keyStringValuePair">
          <key>ProviderResponseCode</key>
          <value>0</value>
        </detail>
        <detail xsi:type="keyStringValuePair">
          <key>ApprovalCode</key>
          <value>129560</value>
        </detail>
      </paymentStateDetails>
    </state>
    <isExecuted>true</isExecuted>
    <baseAmount currencyCode="EUR">100</baseAmount>
    <paymentDetails>
      <detail xsi:type="keyStringValuePair">
        <key>ProviderExternalID</key>
        <value>471762</value>
      </detail>
    </paymentDetails>
    <paymentAccount>
      <paymentAccountID>7d3d1fce-3b15-438f-a63d-db92ce576f57</paymentAccountID>
    </paymentAccount>
  </payment>
</initiatePaymentResponse>

The value of initiatePaymentResponse.payment.isExecuted is true which indicates that the payment has been processed successfully.
Alternatively, the combination of initiatePaymentResponse.payment.paymentMethod.key = 2 (Visa Deposit) and initiatePaymentResponse.payment.state.definition.key = 13 (AuthorisedByProvider) indicates the same as per Payment Methods ].