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 '7'
channel No
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
mobilenumber No
smsmessage No
acquirer No
cardtypelock No
splitpayment No
cardhash No
testmode No
fraud_remote_addr No
fraud_http_accept No
fraud_http_accept_language No
fraud_http_accept_encoding No
fraud_http_accept_charset No
fraud_http_referer No
fraud_http_user_agent No
apikey No
md5check Yes
CUSTOM_* No

MD5 checksum calculation

The concatenation order of fields for message type authorize is:

cstr = concatenate(
    protocol,
    channel,
    msgtype,
    merchant,
    ordernumber,
    amount,
    currency,
    autocapture,
    cardnumber,
    expirationdate,
    cvd,
    mobilenumber,
    smsmessage,
    acquirer,
    cardtypelock,
    transaction,
    splitpayment,
    finalize,
    cardhash,
    testmode,
    fraud_remote_addr,
    fraud_http_accept,
    fraud_http_accept_language,
    fraud_http_accept_encoding,
    fraud_http_accept_charset,
    fraud_http_referer,
    fraud_http_user_agent,
    apikey,
    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.

Warning

Warning

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

Note

Note

Subscription payments might require additional agreements

Available data fields

Name Required Note
protocol Yes Must be set to '7'
msgtype Yes Must be set to 'subscribe'
merchant Yes
ordernumber Yes
amout Yes
currency Yes
cardnumber Yes
expirationdate Yes
cvd Yes
mobilenumber No
smsmessage No
acquirer No
cardtypelock No
description Yes
cardhash No
testmode No
fraud_remote_addr No
fraud_http_accept No
fraud_http_accept_language No
fraud_http_accept_encoding No
fraud_http_accept_charset No
fraud_http_referer No
fraud_http_user_agent No
apikey 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,
    cardnumber,
    expirationdate,
    cvd,
    mobilenumber,
    smsmessage,
    acquirer,
    cardtypelock,
    description,
    cardhash,
    testmode,
    fraud_remote_addr,
    fraud_http_accept,
    fraud_http_accept_language,
    fraud_http_accept_encoding,
    fraud_http_accept_charset,
    fraud_http_referer,
    fraud_http_user_agent,
    apikey,
    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 '7'
msgtype Yes Must be set to 'recurring'
merchant Yes
ordernumber Yes
amount Yes
currency Yes
autocapture Yes
transaction Yes Must point to the transaction id of a transaction of type subscribe.
apikey No
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,
    apikey,
    secret
)

cancel

Description

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

Cancel is also used for cancellation of a subscription.

Available data fields

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

MD5 checksum calculation

The concatenation order of fields for message type cancel is:

cstr = concatenate(
    protocol,
    msgtype,
    merchant,
    transaction,
    apikey,
    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 '7'
msgtype Yes Must be set to 'renew'
merchant Yes
transaction Yes Must point to the transaction id of a transaction of type authorize.
apikey No
md5check Yes

MD5 checksum calculation

The concatenation order of fields for message type renew is:

cstr = concatenate(
    protocol,
    msgtype,
    merchant,
    transaction,
    apikey,
    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 '7'
msgtype Yes Must be set to 'capture'
merchant Yes
amount Yes
finalize No
transaction Yes Must point to the transaction id of a transaction of type authorize or recurring.
apikey No
md5check Yes

MD5 checksum calculation

The concatenation order of fields for message type capture is:

cstr = concatenate(
    protocol,
    msgtype,
    merchant,
    amount,
    finalize,
    transaction,
    apikey,
    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 '7'
msgtype Yes Must be set to 'refund'
merchant Yes
amount Yes
transaction Yes Must point to the transaction id of a transaction of type capture.
apikey No
md5check Yes

MD5 checksum calculation

The concatenation order of fields for message type refund is:

cstr = concatenate(
    protocol,
    msgtype,
    merchant,
    amount,
    transaction,
    apikey,
    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>
    <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 '7'
msgtype Yes Must be set to 'status'
merchant Yes
transaction Yes (see warning below) Must point to the transaction id of a transaction.
ordernumber Yes (see warning below) Must point to the ordernumber of a transaction.
apikey No
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,
    transaction or ordernumber,
    apikey,
    secret
)