Message Types

Message types defines the which action QuickPay is going to perform. The following section describes each message type and the data fields involved.

authorize

Description

This message type is used when the merchant wants to validate refund card data against the card issuer and authorize a transaction. The transaction amount is only reserved at the card holder's account and not withdrawn from the account - unless the autocapture field is set.

Warning

Warning

You are only allowed to do authorizes through the Quickpay API if your setup has passed the full PCI certification. Please use the Quickpay Payment Window instead.

Available data fields

Name Required Note
protocol Yes Must be set to '4'
msgtype Yes Must be set to 'authorize'
merchant Yes
ordernumber Yes
amount Yes
currency Yes
autocapture Yes Beware that it is not allowed to perform a capture before the goods are shipped.
cardnumber Yes
expirationdate Yes
cvd Yes
cardtypelock No
splitpayment No
ipaddress No
testmode No
md5check Yes
CUSTOM_* No

MD5 checksum calculation

The concatenation order of fields for message type authorize is:

cstr = concatenate(
    protocol,
    msgtype,
    merchant,
    ordernumber,
    amount,
    currency,
    autocapture,
    cardnumber,
    expirationdate,
    cvd,
    cardtypelock,
    splitpayment,
    ipaddress
    testmode,
    secret
)

subscribe

Description

Like the message type authorize, this message type is used when the merchant wants to validate refund card data against the card issuer. When the merchant wants to make a withdrawal from the subscription, the id from this transaction is used as a reference for message type recurring.

Note

Note

Subscription payments might require additional agreements

Available data fields

Name Required Note
protocol Yes Must be set to '4'
msgtype Yes Must be set to 'subscribe'
merchant Yes
ordernumber Yes
cardnumber Yes
expirationdate Yes
cvd Yes
cardtypelock No
description Yes
testmode No
md5check Yes
CUSTOM_* No

MD5 checksum calculation

The concatenation order of fields for message type subscribe is:

cstr = concatenate(
    protocol,
    msgtype,
    merchant,
    ordernumber,
    cardnumber,
    expirationdate,
    cvd,
    cardtypelock,
    description,
    testmode,
    secret
)

recurring

Description

This message type is used when the merchant wants to make a withdrawal from a subscription. The transaction amount is only reserved at the card holder's account and not withdrawn from the account - unless the autocapture field is set.

Warning

Warning

When using the 'autocapture' feature, beware that it is not allowed to perform a capture before the goods is shipped.

Available data fields

Name Required Note
protocol Yes Must be set to '4'
msgtype Yes Must be set to 'recurring'
merchant Yes
ordernumber Yes
amount Yes
currency Yes
autocapture Yes
transaction Yes Must point to the id of a previous transaction of type subscribe.
md5check Yes

MD5 checksum calculation

The concatenation order of fields for message type recurring is:

cstr = concatenate(
    protocol,
    msgtype,
    merchant,
    ordernumber,
    amount,
    currency,
    autocapture,
    transaction,
    secret
)

cancel

Description

This message type is used when the merchant wants to cancel the order. A cancellation will delete the reservation on the cardholders account.

Available data fields

Name Required Note
protocol Yes Must be set to '4'
msgtype Yes Must be set to 'cancel'
merchant Yes
transaction Yes Must point to the id of a previous transaction of type authorize or recurring.
md5check Yes

MD5 checksum calculation

The concatenation order of fields for message type cancel is:

cstr = concatenate(
    protocol,
    msgtype,
    merchant,
    transaction,
    secret
)

renew

Description

This message type is used when the merchant wants to renew an authorized transaction.

Available data fields

Name Required Note
protocol Yes Must be set to '4'
msgtype Yes Must be set to 'renew'
merchant Yes
transaction Yes Must point to the id of a previous transaction of type authorize.
md5check Yes

MD5 checksum calculation

The concatenation order of fields for message type renew is:

cstr = concatenate(
    protocol,
    msgtype,
    merchant,
    transaction,
    secret
)

capture

Description

This message type is used when the merchant wants to transfer part of or the entire transaction amount from the cardholders account.

Available data fields

Name Required Note
protocol Yes Must be set to '4'
msgtype Yes Must be set to 'capture'
merchant Yes
amount Yes
finalize No
transaction Yes Must point to the id of a previous transaction of type authorize or recurring.
md5check Yes

MD5 checksum calculation

The concatenation order of fields for message type subscribe is:

cstr = concatenate(
    protocol,
    msgtype,
    merchant,
    amount,
    finalize,
    transaction,
    secret
)

refund

Description

This message type is used when the merchant wants to transfer part of or the entire transaction amount to the cardholders account.

Available data fields

Name Required Note
protocol Yes Must be set to '4'
msgtype Yes Must be set to 'refund'
merchant Yes
amount Yes
transaction Yes Must point to the id of a previous transaction of type capture.
md5check Yes

MD5 checksum calculation

The concatenation order of fields for message type refund is:

cstr = concatenate(
    protocol,
    msgtype,
    merchant,
    amount,
    transaction,
    secret
)

status

Description

This message type is used when the merchant wants to check the status of a transaction. The response from this message type differs from the others as it contains the history of the transaction as well.

Example 4. XML response for message type status

<?xml version="1.0" encoding="UTF-8"?>
<response>
    <msgtype>status</msgtype>
    <ordernumber>RTEST-120283102676</ordernumber>
    <amount>234</amount>
    <currency>DKK</currency>
    <time>080212164347</time>
    <state>7</state>
    <chstat>000</chstat>
    <qpstat>000</qpstat>
    <qpstatmsg>OK</qpstatmsg>
    <merchant>Pil.dk Test konto</merchant>
    <merchantemail>test1@pil.dk</merchantemail>
    <transaction>968</transaction>
    <cardtype>Dankort</cardtype>
    <cardnumber>XXXXXXXXXXXXXXX4325</cardnumber>
    <cardexpire>1310</cardexpire>
    <splitpayment>1</splitpayment>
    <md5check>8fc148ee35f589f2db420655a6771e1c</md5check>
    <history>
        <msgtype>authorize</msgtype>
        <amount>234</amount>
        <state>1</state>
        <time>080212164346</time>
        <qpstat>000</qpstat>
        <chstat>000</chstat>
    </history>
    <history>
        <msgtype>capture</msgtype>
        <amount>234</amount>
        <state>3</state>
        <time>080212164347</time>
        <qpstat>000</qpstat>
        <chstat>000</chstat>
    </history>
    <history>
        <msgtype>refund</msgtype>
        <amount>234</amount>
        <state>7</state>
        <time>080212164347</time>
        <qpstat>000</qpstat>
        <chstat>000</chstat>
    </history>
</response>

Available data fields

Name Required Note
protocol Yes Must be set to '4'
msgtype Yes Must be set to 'status'
merchant Yes
transaction Yes (see warning below) Must point to the id of a previous transaction.
ordernumber Yes (see warning below) Must point to the ordernumber of a previous transaction.
md5check Yes
Warning

Warning

The fields "transaction" and "ordernumber" are mutual exclusive. If both fields are provided, only the field "transaction" will be used.

MD5 checksum calculation

The concatenation order of fields for message type status when using ordernumber is:

cstr = concatenate(
    protocol,
    msgtype,
    merchant,
    ordernumber,
    splitpayment,
    secret
)