4. 3D Secure

3D Secure is a method of shifting the liability to the issuing bank, thus ensuring a worry-free transaction flow and no chargebacks. It also means lower conversion rate, so use it wisely. Note that some issuing banks do not have the 3D interface implemented, so an error will be returned.
The process may seem complicated, but it's quite simple:

1. The user  calls your system to charge their card
2. Your system calls Slokly with the "SecureAuthentication" node set to "required"
<SecureAuthentication mode="required">
  <CallbackURL><![CDATA[https://www.example.com/processing/redirect/173324]]></CallbackURL>
</SecureAuthentication>
Set the "mode" attribute to "required", and provide a callback URL  to "catch" the user back after their journey to their issuing bank.
3. Slokly responds with a redirect URL:
<SloklyResponse status="REDIRECT">
  <TXID>eb2e9460431511e2329f404027366ac9</TXID>
  <Time>2015-11-11 11:52:09</Time>
  <Interface>
    <ID>1</ID>
    <Name>Example</Name>
    <Commission>0.02</Commission>
    <Processor>example</Processor>
  </Interface>
  <Redirect>https://www.example.com/3ds/authenticate-example/txid/eb2e9460431511e2329f404027366ac9</Redirect>
</SloklyResponse>
You get the selected Interface with the commission that will be taken for the transaction, as well as a redirect URL.
4. You need to redirect the user to the URL returned in step #3
5. The user is redirected to Slokly
6. Slokly sends the user to their issuing bank
7. The user does their business on the issuing bank's site
8. The bank reports to Slokly whether the user completed the transaction successfully
9. The user is sent back to the "CallbackURL" provided in the initial request, Then you send another request to complete the flow and verify that the transaction was completed successfully:
<SloklyRequest version="1.1" mode="live">
  <Account>
    <Username>example</Username>
    <Password>example</Password>
  </Account>
  <Transaction type="payment">
    <UsageLabel />
    <InterfaceID />
    <MerchantID>12345</MerchantID>
    <Payment>
      <SecureAuthentication mode="complete"/>
      <Details>
        <Amount>11300</Amount>
        <Currency>EUR</Currency>
        <MaxCommission />
      </Details>
      <ReferenceToken>eb2e9460431511e2329f404027366ac9</ReferenceToken>
    </Payment>
  </Transaction>
</SloklyRequest>
The mode attribute on the SecureAuthentication node is set to "complete", the amount (x100) and the currency are sent, and the ReferenceToken is the transaction id you received in the previous responses.
10. Slokly responds with success or failure of the transaction
Comments