Next you can find the complete list of fields you may use in the payload. If you prefer, you can directly Go to the JSON examples.

Field Mandatory? Description
merchant Yes Fields describing the merchant.
.id Yes Merchant identifier. Also called merchant_ref. Example: "s1". (string or int)
statistics Yes Data about orders completed during the last seven days.
.orders Yes Per-order data. (list)
.orders.0.completed_at Yes When the shopper completed the order. Example: "2013-12-24T13:14:15+0100". (string)
.orders.0.amount No Total amount paid or due to pay. Example: 9957. (int)
.orders.0.currency Yes Currency of the amount. Example: "EUR". (string)
.orders.0.merchant_reference No Order id(s) used by the merchant. Please include at least for all orders where the shopper selected SeQura.
.orders.0.merchant_reference.order_ref_1 Yes Merchant reference 1. Example: "ZXCV1234". (string or int)
.orders.0.merchant_reference.order_ref_2 No Merchant reference 2. Example: "0080-1234-4343-5353". (string or int)
.orders.0.merchant_reference.subscription_ref_1 No Subscription reference 1. Example: "SUBS00001". (string or int)
.orders.0.payment_method No Name or type of payment method. Use the strings CC for credit/debit cards, COD for cash on delivery, PP for PayPal, TR for bank transfer, and SQ for SeQura. For other methods, use O/ plus a name, e.g. 'O/postal_giro' Example: "CC". (string)
.orders.0.country No ISO-3166-1 country code of the delivery address. Example: "ES". (string)
.orders.0.device No Device used in purchase. Accepted values are computer, tablet, phone and other. You can follow the value with something more specific if available. Example: "tablet/ipad4". (string)
.orders.0.status No Status of the order. One of processing, shipped and cancelled. Example: "shipped". (string)
.orders.0.raw_status No Your platform's string representation of the order status. Example: "Delivered". (string)
.orders.0.sequra_offered No Was the shopper offered to use SeQura in the checkout? Example: true. (true or false)
platform Yes Fields describing the store platform.
.name Yes Name of the platform. Use your shop name. Plugins for "standard" platforms will use that name. Example: "www.theshop.es". (string)
.version Yes Version of the platform. If you don't use explicit versioning, use a release date instead. Example: "1.1". (string)
.plugin_version No Version of the plugin or platform module. If you don't use explicit versioning, use a release date instead. Example: "1.0.2". (string)
.uname Yes uname of the shop server. In PHP, use php_uname(). Example: "Darwin roatan.local 13.0.0 Darwin Kernel Version 13.0... x86_64". (string)
.db_name Yes DB used. Example: "mysql". (string)
.db_version Yes Version of the DB. Example: "1.2.3". (string)
.php_version No PHP interpreter version. Example: "5.4.1.7". (string)

JSON examples

Some integrations use specific features that depend on the contract between the merchant and SeQura. Use the checkboxes below to see a custom example. You can ask your SeQura’s integration buddy about the contract options that affect your integration.

Contract options

  • Services: The shop sells a service, i.e., it has an ending date (ends_in or ends_on fields) for the service. F.i, a course.
  • Multistore: The shop has a physical store. It may have one or many different stores. This option requires these addtional fields: store_ref, operator_ref and nin_control.
  • Garage: Garages have to inform the vehicle's plaque. They are also multistore. The shop requires to add garage_chain field in case it belongs to an specific chain
  • Shipment_ref: If your shop makes partial shipments and it wants to track them at disbursement, use this option. Read more.

Generate the payload for your contract options

PHP example

This example includes all options and features available.

$order = array();
$order["merchant"] = array();
$order["merchant"]["id"] = "s1";
$order["statistics"] = array();
$order["statistics"]["orders"] = array();
$order["statistics"]["orders"][0] = array();
$order["statistics"]["orders"][0]["completed_at"] = "2013-12-24T13:14:15+0100";
$order["statistics"]["orders"][0]["amount"] = 9957; // optional
$order["statistics"]["orders"][0]["currency"] = "EUR";
$order["statistics"]["orders"][0]["merchant_reference"] = array(); // optional
$order["statistics"]["orders"][0]["merchant_reference"]["order_ref_1"] = "ZXCV1234";
$order["statistics"]["orders"][0]["merchant_reference"]["order_ref_2"] = "0080-1234-4343-5353"; // optional
$order["statistics"]["orders"][0]["merchant_reference"]["subscription_ref_1"] = "SUBS00001"; // optional
$order["statistics"]["orders"][0]["payment_method"] = "CC"; // optional
$order["statistics"]["orders"][0]["country"] = "ES"; // optional
$order["statistics"]["orders"][0]["device"] = "tablet/ipad4"; // optional
$order["statistics"]["orders"][0]["status"] = "shipped"; // optional
$order["statistics"]["orders"][0]["raw_status"] = "Delivered"; // optional
$order["statistics"]["orders"][0]["sequra_offered"] = true; // optional
$order["platform"] = array();
$order["platform"]["name"] = "REPLACE WITH CORRECT VALUE BEFORE QA";
$order["platform"]["version"] = "REPLACE WITH CORRECT VALUE BEFORE QA";
$order["platform"]["plugin_version"] = "REPLACE WITH CORRECT VALUE BEFORE QA"; // optional
$order["platform"]["uname"] = "REPLACE WITH CORRECT VALUE BEFORE QA";
$order["platform"]["db_name"] = "REPLACE WITH CORRECT VALUE BEFORE QA";
$order["platform"]["db_version"] = "REPLACE WITH CORRECT VALUE BEFORE QA";
$order["platform"]["php_version"] = "REPLACE WITH CORRECT VALUE BEFORE QA"; // optional