Service API

Introduction

The Telr Payments API makes it easy to integrate your applications with the merchant administration system. Important data, such as transaction details, can be retrieved as required. The API responds with XML formatted data.

API configuration

Access to the API is controlled using an API Key. This key control what services can be used, and from what location they can be accessed.

To add a new key you need to use the Merchant Administration System, select the ‘API’ menu, and click on the ‘Add new entry’ option.

You can now configure which services will be available using this key, and can limit where this key can be used from by setting one or more approved IP addresses.

Whilst a key can be configured to allow access from any location, we strongly advise that you set IP address limits. The IP details provided would, for example, be the IP details of your servers that require access to the API. You can supply multiple IP addresses by separating each one with a comma. As requests are made over the internet, the IP details given must be the publically routable IP details and not internal/private IP space.

service-api-new-entry

 

Authentication

Each request made to the API must include authentication details. The API uses the HTTP Basic Access Authentication method.

Basic access authentication

Basic access authentication is a method for a HTTP user agent to provide a user name and password when making a request.

HTTP Basic authentication implementation is one of the easiest methods to use as it doesn’t require cookies, session handling, or a login sequence. HTTP Basic authentication simply uses static headers.

The user agent sends the authentication credentials by using the Authorization header. The header is constructed as follows:

  • Username and password are combined into a string “username:password”
  • The resulting string is then encoded using Base64
  • The authorization method and a space i.e. “Basic ” is then put before the encoded string.

For example, if the user agent uses ‘Aladdin’ as the username and ‘open sesame’ as the password then the header is formed as follows:

Authorization: Basic QWxhZGRpbjpvcGVuIHNlc2FtZQ==

API username and password

When accessing the Innovate Payments API, the username part of the authentication string is your merchant ID, and the password is the API key.

Requests

Requests should be made using the GET method unless otherwise stated for the given service, and must include the Authorization header.

If the Authorization header is not present, or is not valid, then a ‘403 Forbidden’ response will be generated.

Responses

Response data is provided in XML format. All data is encoded using the UTF-8 character set.

Requesting an unknown service will return a ‘404 Not Found’ response. If the service requested is a known service, but the supplied Authentication details do not have access to that service then the response will be ‘403 Forbidden’

Common data elements

Many of the responses contain common data elements; these are described in the following pages.

Transaction type

This contains details of the transaction type. It includes both a text based name for the type, and a numeric type code.

Data:

<type>
    <name>Transaction type name</name>
     <code>Transaction type code</code>
</type>

The transaction types are as follows:

TypeCodeDetails
Sale1A standard online transaction. If authorised the relevant amount will be debited
from the customers’ card.
Void2A method used to cancel a sale transaction. This can only be done within a short
time after the sale transaction was processed. The void amount is always the
same as the original sale amount.
Refund3Used to credit an amount back to the customer. The refund amount may be the
same as or less than the original Sale amount.
Refund Reversal4This can be used to cancel a refund, and can only be done within a short time
after the refund was processed. Not all acquirers support this transaction type.
Auth5A pre-authorisation transaction. This is similar to a sale, but the amount is not
immediately debited from the customers’ card. Instead the amount is reserved
on that card, and can then be debited at a later date using a capture transaction.
Until the capture transaction is processed, no funds will be debited.
Release6Used to release any funds that have previously been reserved by an auth
transaction. No funds are debited from the card, and the capture option can no
longer be used.
Capture7Used to debit funds that have been previously reserved using an auth
transaction. This completes the transaction processing.
Capture Reversal8This can be used to cancel a capture transaction, and can only be done within a
short time after the capture was processed. Not all acquirers support this
transaction type.

Transaction class

This contains details of the transaction class. It includes both a text based name and a numeric code.

Data:

<class>
    <name>Transaction class name</name>
    <code>Transaction class code</code>
</class>

The transaction classes are as follows:

NameCode
Mail Order/Telephone Order1
E-Commerce2
Continuous Authority4

Authorisation results

Details of the transaction status. If the transaction was authorised, then the status will be ‘A’. If it has been authorised but placed on hold, the status will be ‘H’. Other status codes indicate that the transaction could not be processed. A list of transaction status codes can be found at the end of this document.

Data:

<auth>
    <status>Authorisation status</status>
    <code>Authorisation code</code>
    <message>Authorisation message</message>
</auth>

Customer information

This contains the name and address details of the customer.

Data:

<billing>
  <title>Customer title</title>
  <fname>Customer forename(s)</fname>
  <sname>Customer surname</sname>
  <addr1>Address line 1</addr1>
  <addr2>Address line 1</addr2>
  <addr3>Address line 1</addr3>
  <city>City</city>
  <region>Region</region>
  <country>Country – full name</country>
  <country_iso>Country – 2 character ISO code</country_iso>
  <zip>Post/Area code</zip>
  <tel>Telephone number</tel>
  <email>Email address</email>
</billing>

Transaction information

Individual transaction details.

Data:

<transaction>
  <id>Transaction reference</id>
  <prev_id>Transaction reference of the previous transaction</prev_id>
  <init_id>Transaction reference of the initial transaction</init_id>
  <type>CDE: Transaction type</type>
  <class>CDE: Transaction class</class>
  <auth>CDE: Authorisation results</auth>
  <amount>Transaction amount</amount>
  <currency>Transaction currency</currency>
  <description>Transaction description</description>
  <cartid>Cart ID</cartid>
  <test>Test mode. 0=Live, 1=Test</test>
  <date>Transaction time and date, GMT</date>
  <store>
    <id>Store ID</id>
    <name>Store name</name>
  </store>
  <billing>CDE: Customer information</billing>
  <card>
    <number>Card number. Only the first and last 4 digits are shown</number>
    <type>Card type, if known</type>
    <country_iso>Card issue country, if known</country_iso>
  </card>
  <notecount>Number of notes attached to this transaction</notecount>
  <notes>
    <note>
    -- repeated for each note attached to this transaction
    <text>Note text</text>
    <ref>Additional transaction related to this note, if any</ref>
    </note>
  </notes>
</transaction>

For transactions which are a follow-up transaction, such as a void, the <prev_id> contains the transaction reference of the transaction being voided. For an initial transaction, such as a sale or auth, if it is set then it will be the same as the main transaction ID.

In a multi-transaction sequence, such as a refund being performed on a capture transaction, the <init_id> will contain the reference to the initial auth transaction.

Repeat billing agreement

Details of an individual repeat billing agreement

Data:

<agreement>
  <id>Agreement ID </id>
  <store>
    <id>Store ID</id>
    <name>Store name</name>
  </store>
  <created>Time and date the agreement was created, GMT</created
  <status>Agreement status, numeric version</status>
  <statustxt>Agreement status, text version</statustxt>
  <currency>Agreement currency</currency>
  <initial>Initial transaction amount. 0 if no initial transaction.</initial>
  <recurring>
    <period>Repeat billing period – weekly or monthly</period>
    <interval>Number of repeat billing periods between each transaction</interval>
    <day>Which day of the week or day of the month each transaction is on</day>
    <count>Maximum number of repeat transaction. 0 for no limit</count>
    <amount>Recurring transaction amount.</amount>
  </recurring>
  <final>Final transaction amount for agreements with repeat limit.</final>
  <description>Agreement description</description>
  <transaction>
    <description>Description to use for each transaction.</description>
    <cartid>Cart ID to use for each transaction</cartid>
    <test>Test mode. 0=Live, 1=Test</test>
  </transaction>
  <custid>Customer ID</custid>
  <billing>CDE: Customer information (Optional, depends on service used)</billing> 
</agreement>

The agreement status codes are as follows:

NameCodeNotes
Pending0Agreement is being setup and has not yet started
Running1Agreement is running normally
Completed2Agreement has completed (where a limit is set on the number of payments)
Failed3Agreement stopped due to multiple payment errors.
Overdue4Payment overdue. Only for agreements where payment is by invoice.
Cancelled5Agreement has been cancelled.

Services

The following pages detail each of the services available. For each service, the required URL will be shown, and an example of the data provided by that service. Unless specified otherwise, the request method for each service must be GET

Where the response data includes any of the common data elements, refer to the relevant section above for the details of that element. These will be marked in the response examples by the prefix CDE followed by the element title.

Recent transaction list

https://secure.innovatepayments.com/tools/api/xml/transaction

This will provide a list of the most recent transactions processed within the last 48 hours. A maximum of 30 transactions will be included.

Data provided:

<?xml version="1.0" encoding="UTF-8"?>
<transactions>
   <trancount>Count of transactions in the results</trancount>
    <transaction>CDE: Transaction information</transaction>
</transactions>

The <transaction>…</transaction> section will be repeated for each transaction in the list.

Transaction details

https://secure.innovatepayments.com/tools/api/xml/transaction/{tranref}

This will provide the details for a given transaction reference. The transaction reference must be included within the URL, where it shows {tranref} above.

For example, the details for transaction reference 011287290362 would be obtained from : https://secure.innovatepayments.com/tools/api/xml/transaction/011287290362

Data provided:

<?xml version="1.0" encoding="UTF-8"?>
<transaction>CDE: Transaction information</transaction>

Linked transactions

https://secure.innovatepayments.com/tools/api/xml/transaction/{tranref}/linked

This will provide the details for all transaction linked to the given reference. The transaction reference must be included within the URL, where it shows {tranref} above.

For example, the details for transactions linked to reference 011287290362 would be obtained from : https://secure.innovatepayments.com/tools/api/xml/transaction/011287290362/linked

This allows you to find the complete list of events for any given transaction including the initial auth or sale, and any subsequent capture, refund or void transactions. The initial transaction reference for the specified transaction is obtained, and then all transactions which have the same initial transaction reference are returned. A maximum of 30 transactions will be included.

Data provided:

<?xml version="1.0" encoding="UTF-8"?>
<transactions>
    <trancount>Count of transactions in the results</trancount>
    <transaction>CDE: Transaction information</transaction>
</transactions>

The <transaction>…</transaction> section will be repeated for each transaction in the list.

Transactions search – Cart ID 

https://secure.innovatepayments.com/tools/api/xml/transaction/{ref}/cart

This will provide the details for all transaction that have the given reference as their cart ID. The reference must be included within the URL, where it shows {ref} above.

For example, the details for transactions with cart ID ABC123 would be obtained from : https://secure.innovatepayments.com/tools/api/xml/transaction/ABC123/cart

This will return all matching transactions, including the initial auth or sale, and any subsequent capture, refund or void transactions. This is most effective if the cart ID used in the initial transaction request is a unique ID for the transaction. A maximum of 30 transactions will be included.

Data provided:

<?xml version="1.0" encoding="UTF-8"?>
<transactions>
    <trancount>Count of transactions in the results</trancount>
    <transaction>CDE: Transaction information</transaction>
</transactions>

The <transaction>…</transaction> section will be repeated for each transaction in the list.

Transactions search – Email

https://secure.innovatepayments.com/tools/api/xml/transaction/{addr}/email

This will provide the details for all transaction that have the given address as their billing email address. The address must be included within the URL, where it shows {addr} above.

For example, the details for transactions with email user@domain.com would be obtained from : https://secure.innovatepayments.com/tools/api/xml/transaction/user@domain.com/email

This will return all matching transactions, including the initial auth or sale, and any subsequent capture, refund or void transactions. A maximum of 30 transactions will be included.

Data provided:

<?xml version="1.0" encoding="UTF-8"?>
<transactions>
    <trancount>Count of transactions in the results</trancount>
    <transaction>CDE: Transaction information</transaction>
</transactions>

The <transaction>…</transaction> section will be repeated for each transaction in the list.

Transactions search – Card number

https://secure.innovatepayments.com/tools/api/xml/transaction/{num}/card

This will provide the details for all transaction that where made with the given card number. The number must be included within the URL, where it shows {num} above.

The card number can be provided in two ways, as either an 8 digit value (containing the first 4 and last 4 digits of the card number) or as a 12 digit transaction reference.

Examples:

Details for transactions with card starting 4000 and ending 0002:

https://secure.innovatepayments.com/tools/api/xml/transaction/40000002/card

Details for transactions made use the same card as transaction 011287290362:

https://secure.innovatepayments.com/tools/api/xml/transaction/011287290362/card

This will return all matching transactions, including the initial auth or sale, and any subsequent capture, refund or void transactions. A maximum of 30 transactions will be included.

Data provided:

<?xml version="1.0" encoding="UTF-8"?>
<transactions>
    <trancount>Count of transactions in the results</trancount>
    <transaction>CDE: Transaction information</transaction>
</transactions>

The <transaction>…</transaction> section will be repeated for each transaction in the list.

Recent reports

https://secure.innovatepayments.com/tools/api/xml/report

This will provide a list of the most recent reports that have been generated, such as the Daily and Monthly transaction reports. A maximum of 50 reports will be included.

Data provided:

<?xml version="1.0" encoding="UTF-8"?>
<reports>
  <repcount>Count of reports in the results</repcount>
  <report>
    <id>Report ID</id>
    <store>Store ID</store>
    <date>Time and date report was generated, GMT</date>
    <file1>Filename of the first report file</file1>
    <file2>Filename of the second report file, if any</file2>
    <description>Description of the report</description>
    <comments>Additional information about the report</comments>
  </report>
</reports>

The <report>…</report> section will be repeated for each report in the list.

Recent repeat billing agreements list

https://secure.innovatepayments.com/tools/api/xml/agreement

This will provide a list of the most recent repeat billing agreements. A maximum of 30 agreements will be included

Data provided:

<?xml version="1.0" encoding="UTF-8"?>
<agreements>
    <agrcount>Count of agreements in the results</agrcount>
    <agreement>CDE: Repeat billing agreement</agreement> (No billing details)
</agreements>

The <agreement>…</agreement> section will be repeated for each agreement in the list.

Repeat billing agreement details

https://secure.innovatepayments.com/tools/api/xml/agreement/{agreement_id}

This will provide the details for a given agreement ID. The agreement ID must be included within the URL, where it shows {agreement_id} above.

For example, the details for agreement 60100 would be obtained from : https://secure.innovatepayments.com/tools/api/xml/agreement/60100

Data provided:

<?xml version="1.0" encoding="UTF-8"?>
<agreement>CDE: Repeat billing agreement</agreement> (Includes billing details)

Repeat billing agreement history

https://secure.innovatepayments.com/tools/api/xml/agreement/{agreement_id}/history

This will provide the event history for a given agreement ID. The agreement ID must be included within the URL, where it shows {agreement_id} above.

For example, the history for agreement 60100 would be obtained from : https://secure.innovatepayments.com/tools/api/xml/agreement/60100/history

Data provided:

<?xml version="1.0" encoding="UTF-8"?>
<agreement>
<eventcount>Count of events in the results</eventcount>
<event>
  <type>Event type</type>
  <typetxt>Event type, text description</typetxt>
  <date>Time and date of event, GMT</date>
  <note>Event note text</note> (*)
  <paytype>Payment type</paytype> (*)
  <paytypetxt>Payment type, text description</paytypetxt> (*)
  <paycount>Payment number for regular payments</paycount> (*)
  <amount>Transaction amount</amount> (*)
  <tranref>Transaction reference</tranref> (*)
  <invoice>Invoice reference</invoice> (*)
</event>
</agreement>

The <event>…</event> section will be repeated for each event in the list.

Fields marked with (*) are optional, and will only be present if relevant to that event.

Event typeEvent type
1Agreement created
2Agreement completed
3Agreement failed (to many declined transactions)
4Invoice late for payment
5Agreement cancelled
6Invoice sent
7Payment authorised
8Payment declined
9Card verified
10Credit authorised
11Credit declined
12Text note added
Payment typeDescription
1Initial payment
2Regular payment
3Final payment
4Manual adjustment (e.g. additional payment or a refund)

Cancel repeat billing agreement

https://secure.innovatepayments.com/tools/api/xml/agreement/{agreement_id}

A request sent using the DELETE method will cancel the agreement. The agreement ID must be included within the URL, where it shows {agreement_id} above.

For example, the to cancel agreement 60100 send a DELETE method request to https://secure.innovatepayments.com/tools/api/xml/agreement/60100

This option will provide the same format response as for the agreement details request, showing the updated agreement status.

<?xml version="1.0" encoding="UTF-8"?>
<agreement>CDE: Repeat billing agreement</agreement> (Includes billing details)

Request method types

URLGETPUTPOSTDELETE
transaction[glyphicon type="ok" color="#49af11"]
[glyphicon type="remove" color="#dd3333"]
[glyphicon type="remove" color="#dd3333"]
[glyphicon type="remove" color="#dd3333"]
transaction/{tranref}[glyphicon type="ok" color="#49af11"]
[glyphicon type="remove" color="#dd3333"]
[glyphicon type="remove" color="#dd3333"]
[glyphicon type="remove" color="#dd3333"]
transaction/{tranref}/linked[glyphicon type="ok" color="#49af11"]
[glyphicon type="remove" color="#dd3333"]
[glyphicon type="remove" color="#dd3333"]
[glyphicon type="remove" color="#dd3333"]
transaction/{ref}/cart[glyphicon type="ok" color="#49af11"]
[glyphicon type="remove" color="#dd3333"]
[glyphicon type="remove" color="#dd3333"]
[glyphicon type="remove" color="#dd3333"]
transaction/{addr}/email[glyphicon type="ok" color="#49af11"]
[glyphicon type="remove" color="#dd3333"]
[glyphicon type="remove" color="#dd3333"]
[glyphicon type="remove" color="#dd3333"]
transaction/{num}/card[glyphicon type="ok" color="#49af11"]
[glyphicon type="remove" color="#dd3333"]
[glyphicon type="remove" color="#dd3333"]
[glyphicon type="remove" color="#dd3333"]
report[glyphicon type="ok" color="#49af11"]
[glyphicon type="remove" color="#dd3333"]
[glyphicon type="remove" color="#dd3333"]
[glyphicon type="remove" color="#dd3333"]
agreement[glyphicon type="ok" color="#49af11"]
[glyphicon type="remove" color="#dd3333"]
[glyphicon type="remove" color="#dd3333"]
[glyphicon type="remove" color="#dd3333"]
agreement/{agreement_id}[glyphicon type="ok" color="#49af11"]
[glyphicon type="remove" color="#dd3333"]
[glyphicon type="remove" color="#dd3333"]
[glyphicon type="ok" color="#49af11"]
agreement/{agreement_id}/history[glyphicon type="ok" color="#49af11"]
[glyphicon type="remove" color="#dd3333"]
[glyphicon type="remove" color="#dd3333"]
[glyphicon type="remove" color="#dd3333"]

Transaction status codes

StatusCodeMessage
ASet by issuerAuthorised
HSet by issuerAuthorised, but placed on hold. Manual inspection required
E01Invalid request
E02Transaction cost or currency not supplied
E03Cart ID not set
E04Invalid store ID
E05Transaction cost or currency not valid
E06Invalid transaction mode
E07Card expiry not supplied
E10Card number not supplied
E11Invalid card number
E12Card expired
E14Card type mismatch
E15Invalid card security code (CVV)
E16Card security code (CVV) not supplied
E17Name not valid/not supplied
E18Address not valid/not supplied
E19Country not valid/not supplied
E20IP address not valid/not supplied
E21Card/Currency/Class combination not supported
E22Invalid transaction reference
E23Amount differs from original
E24Currency differs from original
E25Original transaction not authorised
E26Original transaction already voided
E27Original transaction mismatch
E28Invalid start date
E29Amount greater than available balance
E30Card details differ from original
D31Not authorised
D32Original transaction cannot be voided
C33Transaction cancelled
D34No response
E35Unable to refund
E36Previous transaction is on hold
D37Blocked by acquirer
E38Invalid expiry date
E39Invalid expiry date
E40Invalid transaction type
D41Insufficient funds
D42Card security code (CVV) mismatch
E43Email not valid/not supplied
E44Phone number not valid/not supplied
E45Transaction mode differs from original
D463DSecure authentication not available for this card
D473DSecure authentication rejected
E48Description not set
D49Sold out
E50Card is for ATM use only
D51Transaction part 1 not authorised
D52Transaction part 2 not authorised
X53Authorisation expired
E54Transaction part not specified
E55Unable to access transaction part
E56Duplicate transaction
D57Continuous authority not available on referenced transaction
E58Error connecting to service provider
E59Request aborted
E60Verification failed
D61Not authorised
D62Not authorised
D63Address verification (AVS) mismatch
D64Card security code (CVV) and address (AVS) mismatch
D65Card is not enabled for e-commerce
D66Card cancelled
D67Transaction not permitted by issuer
D68No suitable account
D80Not authorised
Card Filter module. Message text can be changed
D90Not authorised
D91Not authorised
D92Not authorised
D93Card limits exceeded
D94Not authorised
D95Not authorised
D96Not authorised
E98Internal system error
E99Unknown error
Updated on October 24, 2016

Related Articles