2. Fetch identification form

The identification form is a standard HTML form (in an <iframe>) that you display in your shop. seQura uses it to request additional information from the shopper beyond what was in the original solicitation. The form is dynamic:

  • seQura may ask different questions based on who the shopper is and what's in their basket.
  • The form may grow or shrink based on the shopper's responses.

For these reasons, the form is mandatory and can't be cached.

To fetch the form, make a GET request to the form_v2 resource of the order URL from the previous step. Optional parameters:

  • product: Defaults to i1. For the "pp3" part-payment product, use product=pp3.
  • campaign: Defaults to the first active campaign. Not needed for most products.
  • ajax: Defaults to false. Set to true if delivering the form via AJAX.

Use the Payment Methods API to get available products and campaigns.

Request Example (cURL)

$ curl -i -X GET -u $SQPASS -k \
  -H 'Accept: text/html' \
  https://sandbox.sequrapi.com/orders/1dc26b35-06f6-41d6-b6f5-d0eb6c66aad1/form_v2

Response Example

HTTP/1.1 200 OK
Cache-Control: max-age=0, private, must-revalidate
Content-Type: text/html; charset=utf-8
Date: Mon, 06 Feb 2017 17:33:41 GMT
ETag: "4eb32f668768650a9f66f9233a111406"
Server: nginx
X-Content-Type-Options: nosniff
X-Frame-Options: SAMEORIGIN
X-Request-Id: 373cec11-9cff-4f0d-86c1-1fa69d7dd3d0
X-Runtime: 0.008903
X-XSS-Protection: 1; mode=block
Content-Length: 645
Connection: keep-alive

<iframe
  id='sq-identification-i1'
  name='sq-identification-i1'
  class="sq-identification-iframe"
  src="https://sandbox.sequrapi.com/orders/1dc26b35-06f6-41d6-b6f5-d0eb6c66aad1/pumbaa_form?debug=true&amp;product_code=i1&amp;secret=95ac28f9-60a5-458d-92c0-cd9e57269a89&amp;uuid=1dc26b35-06f6-41d6-b6f5-d0eb6c66aad1"
  frameborder="0"
  style="display:none;position:fixed;top:0;left:0;width:100%;height:100%;z-index:999999;">
</iframe>

<script type="text/javascript">
  window.SequraFormElement = 'sq-identification-i1';
</script>

<script src='https://sandbox.sequrapi.com/assets/sequra_form-426feaf2ac0bc998c048bb3c6dff5348.js'></script>

Once you have the form, load it on your site:

<script type="text/javascript">
    (function(){
      window.SequraFormInstance.show();
    })();
</script>

To run code when the form is closed:

<script type="text/javascript">
    (function(){
      var sequraCallbackFunction = function() {
        //your code here....
      }
      window.SequraFormInstance.setCloseCallback(sequraCallbackFunction);
      window.SequraFormInstance.show();
    })();
</script>

About the form

The form fields vary based on several factors: data from step 1, cart contents, time of day, etc. Typical fields include birthdate and mobile number.

Additional fields may appear dynamically based on the shopper's answers—for example, to enter a PIN code sent to their mobile.

Once seQura accepts the credit risk, the shopper is redirected to a custom action URL in your shop (include this URL in step 1 data).

You might be tempted to send data directly to the API since you already have it, but the form is fully dynamic. It's a negotiation between seQura and the shopper that can't be simulated.

The form shows the shopper's personal information so they know who they're providing data for. If this info appears elsewhere on your page, you can hide it before showing the form.

Form errors

Errors the shopper may encounter:

  • Shopper too young: Shows a warning and removes the submit button.
  • Incorrect mobile number: Shows a warning.
  • Other reasons: Asks the shopper to use another payment method. In sandbox, the credit limit is 400 €. In production, there's no general limit—orders are assessed case by case.