Secure-eBook

Secure-eBook Documentation

Secure-eBook SDK : request

The request command initiates a Secure-eBook SDK transaction and describes the order that you would like to see fulfilled.

The command will identify the publisher account (vendor) as well as the products for which activation keys should be generated.

A token or error message will be returned.

<request>

This is the root element of this XML message. At least one product sub element will be required. Optionnally, you can also specify a orderinfo sub element.

Parameters:

NameTypeDescription
vendorcodetextThe publisher's vendor code. This code can be found in your Secure-eBook account information. This code identifies your account.
secureebookproductcode true, false( Optional, default=true) If set to “true”, the specified product codes will be Secure-eBook product codes. If set to “false”, product codes will be shopping cart product codes.
userdatatext. maximum size: 64(Optional) You can put any information you like here. For example, you can specify your own transaction ID. This information will be passed back to you in your responses for this transaction.
testmodetrue,false(Optional). If specified and set to “true”, the transaction will be considered a test transaction. It will be recorded in Secure-eBook as a test transaction, but no activation key will be generated or debited from your account.

<product>

This element describes a product for which you would like an activation key to be generated. You can add as many product elements as you want under the request element.

Parameters:

NameTypeDescription
codetextThe product code. This code can be found in your Secure-eBook product information page. This code identifies your eBook. Depending of your configuration, can be the Secure-eBook product's code or the shopping cart product's code
qtynumeric(Optional) Determines how many activation keys, links or both must be generated for this product. If not specified, only one activation key and/or link will be generated

<orderinfo>

Describes your client and other order information. If this element is included in your product, all specified client information will be stored in your Secure-eBook transaction.

Parameters:

NameTypeDescription
nametext. Max 128.(Optional) Client name
emailtext. Max 128.(Optional) Client email. NB Please note that Secure-eBook will not sent emails to your client. This data is for information purpose only.
countrytext. Max 128.(Optional) Client's country code.
stateprovtext. Max 128.(Optional) Client's state or province
notetext. Max 255.(Optional) Small private note to add to transaction
totalnumeric. Max 15 chars.(Optional) Total amount of the transaction (incl. taxes, if any)
taxesnumeric. Max 15 chars.(Optional) Total amount of taxes paid
currencycurrency code. Max 3.(Optional) Currency code. As of this date, Secure-eBook recognises USD, CAD, GBP and AUD
descriptiontext. Max 255.(Optional) Order description

Message Template

<?xml version="1.0"?>
<request vendorcode="[text]" secureebookproductcode="[true|false]" userdata="[text]" testmode="[true|false]">
  <product code="[text]" qty="[number]" />
  <orderinfo name="[text]" email="[text]" country="[text]" stateprov="[text]" note="[text]" total="[numeric]" taxes="[numeric]" />
</request>