Api products

XML (direct) model requires PCI DSS certification.

Direct XML 2.1/4.1

Cardlink VPOS is an application that is designed for processing merchant payments in ecommerce environment. The input to VPOS are payment requests originating at the merchant shopping solution. These requests are processed by VPOS and the output (transaction approved or declined) is sent back to the merchant shopping solution.

Cardlink VPOS can process payments in two methods. Direct XML or by Redirection to a specific page. This chapter describes the Direct XLM methodology and it should be noted that the PCI Compliance is a pre-requisite for this one. More information about PCI Compliance can be accessed here.

The payment methods that the merchant solution will use (credit, debit cards, Visa, Mastercard etc.) are decided by the merchant and provided that they are supported by Cardlink VPOS, they can be tested in this tool. Cardlink VPOS core design enables multiple types of merchant interfaces to be implemented.

Merchants can easily attach their look and feel to payment pages by supplying their own custom CSS stylesheet.

This document describes the newest versions (4.1 and 2.1) of interfaces based on RSA SHA256 signature security (4.1) and shared secret based SHA2-256 digest (2.1).

 

XML API Interface

The XML API interface plugin enables merchants using their own payment pages hosted in their system to directly access VPOS by using XML messaging.

XML Messaging is using request real time and response messages in the same request/response cycle. In request message merchant provides payment and order info and in response messages VPOS indicates the result of the action performed. By default the merchant should receive the response message within 30 seconds maximum.

Root element of request and response messages is VPOS

Current version of XML API is 4.1 and 2.1 that is copy of 4.1 only difference is that message security is in 2.1 ensured by a Digest element computed from canonicalized Message element appended with shared sercret.

The request message general structure:

<VPOS>
<Message version=”4.1″messageId=”M12345″timeStamp=”” lang=”en”>
<xxxxxRequest>
<Authentication>… </Authentication>
<OrderInfo>…</OrderInfo>
<PaymentInfo>
<ThreeDSecure>…</ThreeDSecure>
</PaymentInfo>
</xxxxxRequest>
</Message>
<Signature>…</Signature>
</Merchant-VPOS>

The response message general structure:

<VPOS>
<Message version=”4.1″ messageId=”M12345″>
<xxxxxResponse>
<OderId></OrderId/>
<OrderAmount><OrderAmount/>
<PaymentTotal></PaymentTotal>
<Currency></Currency>
<Status></Status>
<TxId></TxId>
<Sequence></Sequence>
<SeqTxId></SeqTxId>
<PaymentRef></PaymentRef>
<RiskScore></PaymentRef>
<ErrorCode></ErrorCode>
<Description></Description>
</xxxxxResponse>
</Message>
<Signature>..</Signature>
</VPOS>

The general error message structure (returned in case request: message was unparseable or
unvalidatable)

<VPOS>
<Message version=”1.0″ messageId=”M12345″>
<ErrorMessage>
<ErrorCode></ErrorCode>
<Description></Description>
<OriginalXML></OriginalXML>
</ErrorMessage>
</Message>
</VPOS>

The exact xml bindings are defined in xsd schema.

https://ecommerce-test.cardlink.gr/vpos/xsd/VPOS41.xsd 

Resource Information
Business partnerVPOS Request Urls (Authorization)MPI Request Urls (Authentication)
Cardlink/Cardlink Onehttps://ecommerce-test.cardlink.gr/vpos/xmlpayvposhttps://ecommerce-test.cardlink.gr/mdpaympi/MerchantServer
Nexihttps://alphaecommerce-test.cardlink.gr/vpos/xmlpayvposhttps://alphaecommerce-test.cardlink.gr/mdpaympi/MerchantServer
Worldlinehttps://eurocommerce-test.cardlink.gr/vpos/xmlpayvposhttps://eurocommerce-test.cardlink.gr/mdpaympi/MerchantServer

Description of request and response message elements and fields and their usage: 

Field/request Type Description
Request
VPOSelementXML root element
Messageelement type MessageMessage contents element
versionattribute, xsi:stringMessage version default value “4.1” Required or 2.1
messageIdattribute, xsi:IDMessage unique identifier (values in request and reply messages this must match, also used for lookup signature reference object when validating signature) (“M1234567”).
Begin with letter.
langattribute, xsi:string(2)Message attribute to specify context language (Optional).
(ISO 639-1 language code en, fi, sv, el, etc..)
timeStampAttribute xsi:dateTimeApproximate time when message was created
Digest (v2.1 only)element xsi:stringRequired if version = 2.1.
The digest of message element if used instead of password to be calculated Base64(SHA2-256((utf8bytes(canonicalize(Message))+utf8bytes(sharedSecret))
Signatureelement ds:SignatureTypeRequired if version = 4.1.
The xml signature as defined https://www.w3.org/TR/xmldsig-core/
Canonicalization http://www.w3.org/TR/2001/REC-xml-c14n-20010315
SignatureMethod Algorithm http://www.w3.org/2001/04/xmldsig-more#rsa-sha256
Digest Method Algorithm http://www.w3.org/2001/04/xmlenc#sha256Requests are signed by merchant private key and validated with merchant Certificate (merchant certificate generation is referred to section 5)
SaleRequest
AuthorisationRequest
CaptureRequest
OriginalCreditRequest
RefundRequest
CancelRequest
RecurringOperationRequest
StatusRequest
TokenizationRequest
PaymentLinkRequest
elementRequest Message element depending on request type
AuthenticationelementAuthentication element of request Message
Midxsi:string (N1..30)Merchant number/identification in VPOS
OrderInfoOrderinfo element of request Message
DeviceCategoryxsi:string (1)Optional
OrderIdxsi:string AN1..50Merchant defined unique order id. Max length 45 for recurring payment.

Alphanumeric (only numbers and letters, without spaces and/or characters).

OrderDescxsi:string AN1..128Order description defined by Merchant
OrderAmountxsi:decimal (max 9+3 or 10+2)Order amount (decimal number >0.0 and max 12 digits + decimal point).
Max decimal digits: 2.
Do not use comma in large amounts, e.g. use 10346.78, not 10,346.78
Amount is set to 0.0 for Tokenization without Authorization
Currencyxsi:string A3ISO4217 alphabetic currency code (EUR)
PayerEmailxsi:string AN1..64Order payer email address (string..64)
PayerPhonexsi:string N1..30Order payer phone number, optional but strongly recommended (string..30)
AddFraudScorexsi:integerIncoming starting risk score (integer)
BlockScorexsi:integerOptional block score parameter that will be used to block the transaction if transaction riskScore reaches this value or above. (Postive Integer number)
Elements Var1.Var9
Var1, Var2, Var3, Var4, Var5, Var6, Var7, Var8, Var9
xsi:string AN1..1024Free variable defined by merchant.
MOTOxsi:integer N1Indicating whether it is a MOTO transaction (1 indicates MOTO)
Weightxsi:decimalOrder shipping weight (kg) if item is shippable and shipping needs to be calculated by VPOS (decimal number >0) and it is supported
Dimensionsxsi:string AN1..25Order shipping dimensions (mm) in format width: height: depth for example a box 200:200:200 (string..25) can be used for shipping calculation if implemented so
BillingAddresselement addressElement of OrderInfo
countryxsi:string AN2Billing address country code (string 2 ISO 3166-1-alpha-2 code (US, FI, GB))
For Kosovo, use Serbia’s country code RS
statexsi:string AN1..50Billing address state (string 2 3166-2 country subdivision code). This value only applies to countries that have states (e.g USA)
zipxsi:string AN1..16Billing address zip code (string..16)
cityxsi:string AN1..50Billing address city (string..50)
addressxsi:string AN1..50Billing address street (string..50)
ShippingAddresselement:addressElement of OrderInfo
countryxsi:string AN2Shipping address country code (string 2 ISO 3166-1-alpha-2 code (US, FI, GB)) Optional, required when  parameter weight or dimensions are present.
statexsi:string AN1..50Shipping address state (string..50) Optional, required when  parameter weight or dimensions are present.
zipxsi:string AN1..16Shipping address zip code (string..16) Optional, required when  parameter weight or dimensions are present. Optional, required when  parameter weight or dimensions are present.
cityxsi:string AN1..50Shipping address city (string..50) Optional, required when  parameter weight or dimensions are present.
addressxsi:string AN1..50Shipping address street (string..50) Optional, required when  parameter weight or dimensions are present.
PaymentInfoPayment info element of request
PayMethodxsi:string AN1..20valid values:
visa for VISA cards
mastercard for MasterCard
maestro for Maestro
amex for American Express
diners for Diners
discover for Discover
CardPanxsi:string N11..19Card number
CardExpDatexsi:string N4Card expiration date in format YYMM
CardCvv2xsi:string N3..4CVV2/CVC2 security code from card.
CardHolderNamexsi:string AN1..24Card holder name
CardEncDataXsi:string ..2048In case on merchant merchant site user browser RSA card data encryption is used  this field contains encrypted card data in form of Base64(RSA(UTF8Bytes(“pn={pan}&ey={exp year}&em={exp month}&c2={cvv2}&cn={cardholdername}”))
Values are url encoded and with utf-8 char encoding (with javascript encodeURIComponent). This all is handled by server supplied component, merchant just need to forward value as returned to this field content.
If this field is present then fields CardPan, CardExpDate, CardHolderName, CardCvv2 must not be sent
RecurringIndicatorxsi:string AN1Value “R” indicates recurring payment
RecurringParameterselementRecurring parameters element
ExtRecurringfrequencyxsi:string N1..3A value indicating the number of days between the recurring payments.
28 is a special value indicating a month.
ExtRecurringenddatexsi:string N8Recurring end date Format yyyymmdd
InstallmentParameterselementInstallments parameters element
ExtInstallmentoffsetxsi:integer N1..2Defines the number of months between the entering of the transaction, in case installment payment.

Currently, should have value 0. 

ExtInstallmentperiodxsi:integer N1..2Defines the number of monthly payments in case installment payment. Valid value must be >1
ThreeDSecureelementElement to support ThreeDSecure in XML api
EnrollmentStatusxsi:string AN1In case of merchant is processing 3D secure prior to sending this xml message this field should contain 3D secure enrollment status (Y, N, U)
AuthenticationStatusxsi:string AN1In case of merchant is processing 3D secure prior to sending this xml message this field should contain 3D secure authentication status (Y, N, U, A)
CAVVelem xsi:string AN28In case of merchant is processing 3D secure prior to sending this xml message this field should contain 3D secure CAVV if authenticated. Base64 encoded value (28 chars) of CAVV  of value of 20 bytes
XIDelem xsi:string AN28In case of merchant is processing 3D secure prior to sending this xml message this field should contain 3D secure XID if authenticated. base64 encoded 28 char value of 20 byte XID
ECIelem xsi:string N2In case of merchant is processing 3D secure prior to sending this xml message this field can optionally contain ECI value
Protocolelem xsi:stringRequired if not 3DS1, value from MPI responses
Attributeelem AttributeType 0..n countsExtra attributes for 3DS2.
Add all attributes with names
TDS2.transStatus
TDS2.transStatusReason
TDS2.threeDSServerTransID
TDS2.dsTransID
TDS2.acsTransID
TDS2.authenticationType
TDS2.challengeCancel
depending if available in MPI response.Attribute named TDS2.dsTransID is currently required if successful 3DS2 authentication, others currently recommended.
ExtXOrderIdxsi:string AN1..50Optional merchant and acquirer agreed extension for recognizing returning customers with submitting previous successful order id of the merchant recognized customer. If functionality is not enabled for merchant this parameter is silently ignored. And if in such case CardPan is missing or is not valid error condition will be generated. Also used in original credit to locate original payment.
ExtTokenOptionsXsi:string N1Optional for merchant and acquirer agreed token extension. Value 1 if request tokenization and PAN is supplied.
ExtTokenXsi:string N12..19Optional merchant and acquirer agreed token extension for recognizing payment tokens from previous successful payments.
TransactionInfoelementTransaction info element (used in recurring cancel operation present in RecurringOperationRequest only)
OrderIdxsi:string AN1..50Merchant defined unique order id (of original payment). Max length 45 for recurring payment.

Alphanumeric (only numbers and letters, without spaces and/or characters).

TxIdXsi:longTxId  applicable in StatusRequest message only
Operationxsi:string AN1..25Predefined String value, Currently supported operation: Cancel (to cancel recurring occurring)
TxTypeelement xsi:stringRequired for PaymentLinkRequest possible values can be PAYMENT_PREAUTH or PAYMENT
LinkValidityDayselement xsi:intOptional for PaymentLinkRequest payment validity in days
MailLinkIfValidMailelement xsi:booleanOptional for PaymentLinkRequest to request payment link mail to be sent by server if payerMail in OrderInfo was present
Responses/ Notification
VPOSelementXML root element
Messageelement type MessageMessage contents element
versionattribute, xsi:stringMessage version default value “1.0” Required
messageIdattribute, xsi:IDMessage unique identifier (values in request and reply messages this must match, no other purpose)
langattribute, xsi:string (2)Message attribute to specify context language (Optional)
(ISO 639-1 language code en, fi, sv, el, etc..)
timeStampAttribute xsi:dateTimeMessage timestamp when approximate time of when message was created. Example 2015-04-30T12:21:02.402+03:00
Digest (v2.1 only)element xsi:stringThe digest of message element if used instead of password to be calculated Base64(SHA2-256((utf8bytes(canonicalize(Message))+utf8bytes(sharedSecret))
Signatureelement ds:SignatureTypeThe xml signature as defined https://www.w3.org/TR/xmldsig-core/
Canonicalization http://www.w3.org/TR/2001/REC-xml-c14n-20010315
SignatureMethod Algorithm http://www.w3.org/2001/04/xmldsig-more#rsa-sha256
DigestMethodAlgorithm http://www.w3.org/2001/04/xmlenc#sha256
Responses are signed by processor private key and validated with Processor certificate (processor certificate is referred to Section 6. page 31)
ResponseelementElement of response type and named as
AuthorisationResponse, CaptureResponse, OriginalCreditResponse, RefundResponse, CancelResponse, RecurringOperationResponse
OrderIdxsi:stringSame value as in request message OrderInfo. For recurring child, sequence is added (/sequence_number).
OrderAmountxsi:decimalSame value as in request message OrderInfo
Currencyxsi:stringSame value as in request message OrderInfo
PaymentTotalxsi:decimalActual payment amount normally equals orderAmount or orderAmount + any fees if applicable.
Statusxsi:stringTransaction status in response or notification messages
AUTHORIZED, CAPTURED – payment was successful (accept order)
REFUSED – payment  failed, payment was denied for card or by bank (deny order)
REFUSEDRISK – payment  failed, payment was denied for card by risk score (deny order)
CANCELED – only in recurring operation response if supsequent requrrings are set to be canceled
ERROR – input, system or network error (deny order)
TxIdXsi:longServer supplied transaction id
SequenceXsi:integerUsed with recurring
PaymentRefXsi:stringRemote payment reference like issue approval code.
RiskScorexsi:integerOptional risk score calculated by risk scoring subsystem if available
ExtTokenXsi:stringOptional payment token if tokenization was requested and performed
ExtTokenPanEndXsi:stringOptional payment token related PAN ending 4 numbers
ExtTokenExpXsi:dateOptional payment token expiration. (YYYY-MM-DDZ)
example 2018-02-01+02:00
ErrorCodeXsi:stringError code
DescriptionXsi:stringError or result description text
PaymentLinkxsi:string elementPayment Link URL
LinkMailedxsi:boolean elementIndicator if payment link mail was sent to mail server.
ReqcurringNotification
AuthenticationelementAuthentication element of request Message
Midxsi:string (N1..8)Merchant number/identification in VPOS
OrderIdxsi:stringSame value as in request message OrderInfo
OrderAmountxsi:decimalSame value as in request message OrderInfo
Currencyxsi:stringSame value as in request message OrderInfo
PaymentTotalxsi:decimalActual payment amount normally equals orderAmount or orderAmount + any fees if applicable.
Statusxsi:stringTransaction status in response or notification messages
AUTHORIZED, CAPTURED – payment was successful (accept order)
REFUSED – payment  failed, payment was denied for card or by bank (deny order)
CANCELED – only in recurring operation response if subsequent recurring are set to be canceled
ERROR – input, system or network error (deny order)
TxIdXsi:longServer supplied transaction id of recurring master that started requiring sequence
SequenceXsi:integerRecurring sequence number
SeqTxIdXsi:longThe recurring sequence transaction server supplied id
PaymentRefXsi:stringRemote payment reference like issue approval code.
ErrorCodeXsi:stringError code
DescriptionXsi:stringError or result description text
AttributeComplex element
many
StatusRequestQuery for transaction status
AuthenticationelementAuthentication element of request Message
Midxsi:stringMerchant number/identification in VPOS
TransactionInfoelement
OrderIdElement Xsi:stringUse either order id or txid to query results if order id used then all transactions referenced are included such as captures, refunds associated

Alphanumeric (only numbers and letters, without spaces and/or characters).

TxIdElement Xsi:longUse txId to query by txId, only single transaction data is returned
StatusResponseResponse of transaction status containing one or many TransactionDetails
TransactionDetailselementOne or many
OrderIdelement
OrderAmountElement xs:decimalMerchant submitted order amount
CurrencyElement xs:stringOrder currency
PaymentTotalElement xs:decimalFinal payment amount (order +/- adjustments, fees etc)
StatusElement xs:stringPayment status
TxIdElement xs:longTransaction identifier
SequenceElement xs:integerIn case of recurring
PaymentRefElement xs:stringPayment reference or approval code if available
RiskScoreElement xs:integerRisk score if available
ErrorCodeElement xs:stringNot used
DescriptionElement xs:stringStatus description
AttributeComplex element
many
Many, rest of the transaction data.
<Attribute name=”MERCHANT NO”>0000001</Attribute>
<Attribute name=”USER IP”>195.222.10.3</Attribute>
<Attribute name=”CHANNEL”>Redirection</Attribute>
<Attribute name=”3D STATUS”>1 – Fully authenticated</Attribute>
<Attribute name=”SETTLEMENT STATUS”>NA</Attribute>
<Attribute name=”BATCH NO”>28</Attribute>
<Attribute name=”ISO response code”>15</Attribute>
<Attribute name=”ORDER DESCRIPTION” />
<Attribute name=”CARD MASK PAN”>4016#####0002</Attribute>
<Attribute name=”ECOM-FLG”>5</Attribute>
<Attribute name=”ECI”>05</Attribute>
<Attribute name=”PAYEREMAIL”>demo@cardlink.gr</Attribute>
<Attribute name=”PAYERPHONE”>+372 123 1234</Attribute>
<Attribute name=”BILLCOUNTRY”>FI</Attribute>
<Attribute name=”BILLZIP”>76543</Attribute>
<Attribute name=”BILLADDRESS”>Billto tn 6-9</Attribute>
<Attribute name=”SHIPCOUNTRY”>FI</Attribute>
<Attribute name=”SHIPSTATE”>Harjumaa</Attribute>
<Attribute name=”SHIPZIP”>12345</Attribute>
<Attribute name=”SHIPADDRESS”>Viru tn 6-9</Attribute>
<Attribute name=”EXTACQUIRERID”>026</Attribute>
TxTypeElement xs:stringTransaction type
TxDateElement xs:dateTimeTransaction execution timestamp
TxStartedElement xs:dateTimeTransaction started timestamp
TxCompletedElement xs:dateTimeTransaction completed timestamp
PaymentMethodElement xs:stringPayment method used.
ErrorMessageelementResponse type of ErrorMessage, normally given if request message validation failed or system error.
ErrorCodeXsi:stringError code
DescriptionXsi:stringError description text
OriginalXMLXsi:stringEncoded original XML received in case the error was in XML parsed
Field element/Request Sale/AuthorizationRequestTokenizationRequestCaptureRequestOriginalCreditRequestRefundRequestCancelRequestRecurringOperationRequestSaleResponseAuthorizationResponseCaptureResponseOriginalCreditResponseRefundResponseCancelResponseRecurringOperationResponseRecurringNotificationPaymentLinkRequestPaymentLinkResponseDescription
Message
versionRRRRRRRRRRRRRRRRR4.1 or 2.1
messageIdRRRRRRRRRRRRRRRRRUnique value of numbers and or chars xsi:ID and matching in request, response messages, max length 128. Begin with letter.
langOOOOOOOOOOOOOOOOOOptional iso language code as el, en, ru, fi, et, sv. This is used to set context language in case emails or any other type actions are triggered with this request.
timeStampRRRRRRRRRRRRRRRRRRequired
Authentication
MidRRRRRRRR
OrderInfoRRRRRR
DeviceCategory
OrderIdRRRRRR
OrderDescOOO
OrderAmountRRRRRRDo not use comma in large amounts, e.g. use 10346.78, not 10,346.78.
Max decimal digits: 2.
CurrencyRRRRRR
PayerEmailOR
PayerPhoneOO
AddFraudScoreOO
BlockScoreOO
var1OOO
var2OOO
var3OOO
var4OOO
var5OOO
var6OOORequired for unscheduled recurring with value rcauto=false to be able to execute recurring child through mass payment file or xml api.
var7OOO
var8OOO
var9OOO
MOTOOO
WeightOO
DimensionsOO
BillingAddressOOBilling address element and sub elements
ShippingAddressOOShipping address element and sub element. Recommended in case of shipping of goods.
PaymentInfoRO1O1O1O
PayMethodR3O1O1O1
CardPanR2O1O1O1Not present if CardEncData present
CardExpDateRNot present if CardEncData present
CardCvv2ORequired if not MOTO and required for card type brand. Not present if CardEncData present.
CardHolderNameCOptional but highly recommended. Not present if CardEncData present.
CardEncDataCUsed if RSA card encryption then CardPan, CardExpDate, CardHolder Name and CardCcc2 shall not be present
RecurringIndicatorCRequired for recurring payment
RecurringParametersCRequired for recurring payment
ExtRecurringfrequencyCRequired for recurring payment. Indicative, dummy value for unscheduled recurring master transaction.
ExtRecurringenddateCRequired for recurring payment. Indicative, dummy value for unscheduled recurring master transaction.
InstallmentParametersCRequired for installment payment
ExtInstallmentoffsetCRequired for installment payment
ExtInstallmentperiodCRequired for installment payment
ThreeDSecureCRequired for 3D transactions
EnrollmentStatusCRequired for 3D transactions
AuthenticationStatusCRequired for 3D transactions
CAVVCRequired for 3D transactions
XIDCRequired for 3D transactions
ECICRequired for 3D transactions
ProtocolCRequired for 3DSv2 transactions
AttributeCTDS2.dsTransID attribute is required for 3DSv2 transactions
ExtXOrderIdO2RO2 – may be present instead of CardPan. Required for original credit to lookup source payment.
ExtTokenOptionsO
ExtTokenO
TransactionInfoR
OrderIdR
OperationR
SignatureRRRRRRRRRRRRRRRRRRequired for all (v4.1)
DigestRRRRRRRRRRRRRRRRRRequired for all (v2.1)
CardRCardInfo
TokenTokenInfo
TxTypeRfor PaymentLInk PAYMENT_PREAUTH, PAYMENT
LinkValidityDaysOOptional days payment link is valid, defaults to merchant or system value
MailLinkIfValidMailOxsi:boolean true/false indicates if service will email link to payer if payeremail in OrderInfo
Responses/Notification
OrderIdRRRRRRRRROrder Id supplied by merchant originally. For recurring child, sequence is added (/sequence_number).
OrderAmountRRRRRRRR
PaymentTotalRRRRRRRR
CurrencyRRRRRRRR
StatusRRRRRRRRRStatus
TxIdCCCCCCRRIn case of transaction processing has started (no rejection due invalid input request), In case of recurring Notification this is master recurring transaction id
SequenceRSequence of recurring in notification.
SeqTxIdRThe executed recurring sequence transaction id
PaymentRefCCCCCCCPayment reference such as approval code if available
RiskScoreOOOptional risk score calculated by risk scoring subsystem if available
ExtTokenOO
ExtTokenPanEndOO
ExtTokenExpOO
ErrorCodeCCCCCCCCCError code in case of Status=ERROR
DescriptionOOOOOOOOOOptional error description
AttributeOOOOOOOOOOptional attributes, may be custom per implementation.
OriginalXMLIn general error message only to copy back the error as content received for merchant debugging.
PaymentLinkRpresent if no error
LinkMailedRpresent if no error
SignatureRRRRRRRRRRRRRRRRRRequired for all (v4.1)
DigestRRRRRRRRRRRRRRRRRRequired for all (v2.1)

Download table here

O1  - if supported feature then fields may not need to be present if not supported then the fields are required. Availability of this option shall confirm with system administrator (Your customer support). If values not sent, then whole PaymentInfo element shall be excluded from message.

R2 and O2 - If system supports and merchant is set tp participate in returning customer recognition extension then if merchant already has a successful order with a card with this customer and the card is still valid and customer chooses to make this next order with same card and the days and amounts between orders are in certain limits then merchant may send ExtXOrderId instead of CardPan. In such case if validations are passed system automatically uses pan from previous specified order. Recommended maximum period between previous order and next returning customer extension order could be 6 months (180 days).

Field element/requestsStatusRequestTokenizationRequestStatusResponseTokenizationResponseDescription
StausRequest
           Authentication
MidRR
         TransactionInfoR
OrderIdCEither OrderId or TxId is required
TxIdCEither OrderId or TxId is required
StatusResponseR
    TransactionDetailsR
OrderIdR
OrderAmountR
CurrencyR
PaymentTotalR
StatusR
TxIdR
SequenceO
PaymentRefO
RiskScoreO
DescriptionO
AttributeOList of attributes depending on what information is available.
Attribute name can be one of the following:
MERCHANT NO – merchant number
REFUNDED AMOUNT – amount refunded if available
USER IP – user IP if available
CHANNEL – channel originated
3D STATUS – status
CAPTURED AMOUNT – captured amount
SETTLEMENT FILE – settlement file name
BATCH NO – batch number
ISO response code – iso response if available
ExtData – additional data from external payment systems if available
ORDER DESCRIPTION – order description
CARD MASK PAN – masked pan 5+3 or 4+4 or 6+2
INSTALLMENT SEQUENCE
INSTALLMENT PERIOD
INSTALLMENT OFFSET
RECURRING SEQUENCE
RECURRING END DAT
RECURRING FREQUENCY
ECOM-FLG – ecom flag in authorization message
ECI – eci from mpi
VAR1..VAR9
PAYEREMAIL
PAYERPHONE
BILLCOUNTRY
BILLSTATE
BILLZIP
BILLADDRESS
SHIPCOUNTRY
CancelRequest
RecurringOperationRequest
StatusRequest
TokenizationRequest
SHIPSTATE
SHIPZIP
SHIPADDRESS
BONUS PARTICIPATION*
BONUS REF*
BONUS ADJUSTMENT*
BONUS STATUS*
BONUS DETAILS*
RETURNING USED**
RETURNING ORDER ID**
*-Only possible if with special bonus loyalty extension.
**-Only possible if with returning customer extension.
TxTypeR
TxDateRTransaction exec date
TxStartedRTransaction started
TxCompletedOMay be missing if transaction did not complete due errors.
PaymentMethodO
CardRRCardInfo type ref required. If CSE, then encData required, else pan, expiration date required
Attribute:refRRunique number request id within merchant scope
Attribute:panCCard pan (required if plain, no encData)
Attribute:expCCard expiry date (required if plain, no encData, xsd:date (YYYY-MM-DD))
Attribute:chnCCardholder name (required if plain, no encData)
Attribute:encDataCCSE (required if encoded card data)
Attribute:statusRStatus of tokenization (OK if no errors occurred)
Attribute:tokenValueOValue of token
Attribute:panEndOLast 4 digits of pan
Attribute:expOExpiration Date
idRRRid attribute of request/response matching
statusRACCEPTED, PENDING, SUCCESS, ERROR
statusMessageOOptional status description
TokenRToken Information element (one or more) included in TokenizationResponse

 

Currently supported operations: 

AuthorisationRequest-make a pre-authorization

CaptureRequest- capture a pre-authorization

RefundRequest- make refund

SaleRequest- make a payment

CancelRequest- make reversal for an unsettled transaction

RecurringOperationRequest- with operation Cancel, cancel recurring master scheduling

RecurringNotification – Optional message posted to merchant if a recurring child is executed on server, merchant does not need to send response XML to this on accept merchant server should respond with http status code 200/OK or in case merchant does not recognize the transaction 406/Not Acceptable or 400/Bad Request if the message format is invalid. Server just acknowledges the response code and performs no additional actions based on merchant response code.

StatusRequest- query transaction status

TokenizationRequest- tokenize a card to token

PaymentLinkRequest- Generate a one time payment link

 

Error code values:

Filled in case status is ERROR  with following values

M1 – Invalid merchant id

M2 – Authentication failed (wrong password or digest or signature)

SE – System error (message contains error id, system or configuration error to be investigated)

XE – Invalid XML request not parseable or does not validate

I0 – Invalid or unsupported request

I1 – Message contains invalid data item or missing required item

I2 – Message contains invalid installment parameters

I3 – Message contains invalid recurring parameters

I4 – Message contains invalid or mismatching card data

I5 – Message contains invalid expiration date card data

I6 – Selected payment method does is not supported or not matching the payment card

O1 – Operation is not allowed because logic is violated or wrong amounts

O2 – Original transaction is not found to perform operation.

May be also filled in case of status is REFUSED with acquirer network supplied ISO response code

Digest calculation with XML API: 2.1 https://developer.cardlink.gr/documentation_categories/integration/#Digest-calculation-with-XML-API-2.1

Signature calculation with XML API V4.1: https://developer.cardlink.gr/documentation_categories/integration/#Signature-calculation-with-XML-API-V4.1

 

Examples how to generate merchant keys 

With openssl

It’s just possible to do all in one line:

openssl req -x509 -newkey rsa:2048 -sha256 -keyout merchantkey.pem -out merchantcert.pem -days 1460 -subj “/C=EE/ST=My State/L=my City/O=Company Name/OU=7711223/CN=www.mysite.com”

The output file merchantcert.pem need to be sent to service provider to install with Your merchant account so Your messages will be validated with public key in Your certificate.

C – is two letter country code

L – locality eg. city where you are located.

OU – is recommended to fill with Your merchant number with service provider.

O – shall be your company full or public name.

CN – is recommended (not required as with server certificates) to be your website name

rsa:keysize is recommended to be 2048 or 3072 bits for foreseeable future and validity days up to 1460 days (4 years), ask service provider if it has specific policy or requirements.

Use necessary measures to protect your private key in generated file merchantkey.pem.

Converting private key to PKCS8 format handleable by  java:

openssl pkcs8 -topk8 -in merchantkey.pem -inform PEM -outform PEM -out merchantkey-p8.pem -nocrypt

With java keytool

With java keytool private key remains in keystore and cannot be extracted unless special software is used. So Your software shall operate directly with this keystore then.

keytool -genkey -keyalg RSA -sigalg SHA256withRSA -dname ”CN=www.mysite.com,OU=7711223,O=Company Name,L=my City,S=My State,C=EE” -keysize 2048 -validity 1460 -alias mykey2017  -storetype JCEKS -keystore mykeystore.jceks -keypass strongPassKey -keystore mycerts.jceks -storepass strongPass

Now export Your certificate to a file that can be sent to service provider:

keytool -exportcert -alias mykey2017 -file merchantcert.pem.cer -storetype JCEKS -keystore mycerts.jceks -storepass strongPass -rfc

 

Processor Certificate

Processor certificate is used by merchant to calculate the signature value for the response messages.

For testing purposes, merchant can use the following processor certificate:

—–BEGIN CERTIFICATE—– MIIEVTCCAr0CBGQm1T4wDQYJKoZIhvcNAQELBQAwbzEfMB0GA1UEAxMWQ2FyZGxpbmtNZXNzYWdl U2lnbmluZzELMAkGA1UECxMCUFMxEDAOBgNVBAoTB1ByaW50ZWMxDzANBgNVBAcTBkF0aGVuczEP MA0GA1UECBMGQXR0aWtpMQswCQYDVQQGEwJHUjAeFw0yMzAzMzExMjQyMzhaFw0zMzAzMjgyMDU5 NTlaMG8xHzAdBgNVBAMTFkNhcmRsaW5rTWVzc2FnZVNpZ25pbmcxCzAJBgNVBAsTAlBTMRAwDgYD VQQKEwdQcmludGVjMQ8wDQYDVQQHEwZBdGhlbnMxDzANBgNVBAgTBkF0dGlraTELMAkGA1UEBhMC R1IwggGiMA0GCSqGSIb3DQEBAQUAA4IBjwAwggGKAoIBgQCEI77PnF3W9npHsYFebQVEDbkoI7FY 0ZHvHtXKcwciGrXkhD6aoAGagER5cZjkeaTqdeS8yyML5ASYiXKmDNIJKTdWWwz/qiFixA5VRkwB JNWiXuDySLvcPUvn9TzmrGITd00kZIGe7J9f0dZGzzkNWDY5sqAPCRhEEZWMyEYBLIJp7I2oFyo7 38WTDOMua3V+hghqzFo6z2S97vjCGtCN2Wn4lG3WyDyoiXudFRTt2FbXMgpr/AIt/YXHWs3vOj7n Q0mfSmuLFy2X25gZcKfCo2jocH9IFozd3YIys+KIWh7uv3qLpbLEIpQ2SQ+gt57JK7A1Lw2luuOq 6qPlK1RV2AW4W9L0g7jJc6t4hM5NMZJYzgYum/ajcoCTl+ip/UpIRDJRL+w5cbZ/Lhc4+qcgTi1p liJRWvEoRUD0Bi9x/ACYEVj5QeZgvollo4zl+3lrrZaYfLEnIp8vet1RFTri6I5CRjokubbcyBxz d9+FTdW2Co66Ql7hPSv5UPO35ZcCAwEAATANBgkqhkiG9w0BAQsFAAOCAYEANcFACfhM7FhNYJaO XVwHdaE3fp2hMLajIg2LXhgjpjd3rM9nibhCbKBEIPNg8xWMPXbUdTcSqVKudjyuKxvdTkx6fMEg iLsaC29+JDfM1oXiGXiLiT11ayw8r94OX3AzXf8CYXLfXlY1AkuNXsp2Ocbn+/kFb3+9YG10qWzf qU3p7BN0chHDXaK+x3JfNg+z+8URt62w0e9+jDRfr2V/8Z7ev2aO2X/LZmCG9peYaELsSAgqvLFq SOOOXZtG7h7hqcE3xCSRlH13hK1gMtMQRRtiwbr2sQUL5YECpWWK1S+kyfcawQDiA5qxIcxpTqPz L7gPX4dzV/nQl40Jk+D0bTOaKoCMW1or5BRRo5mt4Uc+8ChHKQzr20VUmwCVf2FUODGCh4gg3DYH uU46fkKXexUD92aI/d/F/Vv/LZORZ8Wt4eIEmpmWW08Xww7LEqDpzHyGZ5BNuHf6r5Yb1rmS1Z/L PRu+VcI4Hy8081eP5rAcvjUTCjp6A9EwbDKsjH5K
—–END CERTIFICATE—–

For production, please contact via email at ecommerce_support@cardlink.gr