Skip to main content

Payment Interface (POS)

  • Payment

Connect your POS to our Payment connector.

Version
1.0.0
Status
Live
Incident
No incident

This service can be used by the POS Partner (Merchant) to initiate a Token on a card via a Payment Terminal or via an online channel.

 

COMPATIBILITY

 

Type Compatibility
Card present (CP) Yes
Card not present (CNP) Yes

 

TOKEN CARD PRESENT

 

REQUEST

 

Type Endpoint
POST /payment/v1/interface/pos/getToken

 

PARAMETERS

 

Name

Type

Description

CP mandatory

CNP mandatory

Example

ServerName

string

Name of the calling server

Y

 

S-RF-H9732-FS1

WorkStationName

String

Name of the calling station

The workstation must be linked to the payment terminal to awake it in case of card present message.

Y

 

L-5G01TH4

MerchantCode

String

Name of the calling origin (Merchant code)

Y

 

0449

PartnerCode String

Name of the calling partner (Partner code)

This code will allow to retreive transactions in the payment provider extranet

Y   Fols
PosCode String Name of calling point of sale (Hotel, Restaurant, Bar, Spa…) Y   H

 

RESPONSE

 

Name

Type

Description

CP mandatory

CNP mandatory

Example

responseCode

String

- 0 : if response OK

- 99 : if response KO for CNP message

- 10 : if response OK for CP message

 

Note: for CP, a polling message will follow to validate definitely the transaction.

Y

 

99

responseMessage

String

- 0 : OPERATION_OK

- 99 : DeviceOut

- 10 : OPERATION_IN_PROGRESS

 

Note: this response message can contain the description of the error.

Y

 

99

responseIdentifier

String

Response identifier generated by Accor

Y

 

H9732FO20101315118TK

responseObject

String

response object  (see details below)

N

 

 

nextPollingTime

String

Timer reference for the next transaction in case of CP

Time in second

Y

 

20

Detail of the object "responseObject"

Name

Type

Description

CP mandatory

CNP mandatory

Example

Token

string

Card token which allow Accor to know if client is present or not.

Y

 

8766778345690119

ExpirationDate

string

Card expiration date

Format: “YYMM”

Y

 

2206

 

CardType

String (200)

Card type : VI, CA, AX

Other card : JC, DC, CU, PF, BC, RU

a mapping could be done depending partner

Y

 

VI

ApprovalCode

String (8)

Acquirer approval code for the transaction

Y

Y

041016

TransactionId

String (50)

Identifier reference for the transaction

Y

Y

84547193121

 

ResponseCode

String

- 0 : if response OK

- 99 : if response KO for CNP message

- 10 : if response KO for CP message

 

Note: for CP, a polling message will follow to validate definitely the transaction.

Y

Y

99

ResponseMessage

String

- 0 : OPERATION_OK

- 99 : DeviceOut

- 10 : OPERATION_IN_PROGRESS

 

Note: this response message can contain the description of the error.

Y

Y

99

 

POLLING MESSAGE

This service can be used by the POS Partner (Merchant) to retrieve a transaction status. (only for CP model)

Request

Type Endpoint
GET /payment/v1/interface/pos/transactions/{transactionId}

Response

Name Description
status

OK : the transaction has been correctly processed.

KO : the transaction has not been correctly processed.

In progress : the transaction has not a definitive status yet.

 

EXAMPLE 1

This example show request/response for a card present transaction.

Example of request :

{

   "ServerName":"S-RF-H9732-F1",

   "WorkStationName":"L-5C046FG", 

   "MerchantCode":"9732",

   "PartnerCode":"FOLS", 

   "PosCode":"H"

}

Example of response :

    "responseCode": "10", 

    "responseMessage": "OPERATION_IN_PROGRESS",

    "responseIdentifier": "H9732FO20092518025TK", 

    "responseObject": "null", 

    "nextPollingTime": "20" 

}

 

Example of response after polling message : 

3 possibilities:

  • Same response as in progress response but with different nextPollingTime value. 
  • Response OK.
  • Response KO.

 

Example of response OK :

{

    "responseCode": "0",

    "responseMessage": "OPERATION_OK",

    "responseIdentifier": "null",

    "responseObject": {

        "responseCode": "0",

        "responseMessage": "OPERATION_OK",

        "cardType": "5",

        "token": "8766778345690119",

        "expirationDate": "2212",

        "approvalCode": "041016",

        "transactionId": "84547193121"

    },

    "nextPollingTime": "null"

}

 

Example of response KO :

{

    "responseCode": "99",

    "responseMessage": "DeviceOut",

    "responseIdentifier": "null",

    "responseObject": "null",

    "nextPollingTime": "null"

}

 

TOKEN CARD NOT PRESENT

3 services have to be called in order to completely process the token in Card Not Present mode.

  • GetTokenPageUrl 
  • getTokenHTMLForm
  • getToken

 

getTokenPageUrl

Allow to retreive a dedicated url.

 

REQUEST

 

Type Endpoint
POST https://rec-api.accor.com/payment/v1.0/authentication/pages

 

PARAMETERS

 

Header

Type

Description

CP mandatory

CNP mandatory

Example

apikey string First Id to recognize the origin   Y l7xxxxxxxxxxxxxxxxxxxxxxxxxxxxxx

traceId

string

Unique ID to trace the call

 

N

XXXXX-XXXXX-XXXXX-XXXXX-XXXXX

origin string Recognizable and unique name (for debugging purposes)   N XXXXX
apsmkey string Unique ID to recognize the origin in Accor API   Y APS12345678D

 

Body

Type

Description

CP mandatory

CNP mandatory

Example

MerchantCode

string

Name of the calling origin

 

Y

0449

PartnerCode string

Name of the calling partner (Partner code)

This code will allow to retreive transactions in the payment provider extranet

  Y Fols

 

RESPONSE

 

Body

Type

Description

CP mandatory

CNP mandatory

Example

Code

String

Response

 

Y

0

Message String Response message   Y OK
Url String

Url to display the form

Will contain APIkey and APSMkey

  Y  

 

EXAMPLE 1

This example show request/response for a card not present transaction.

Example of request :

{

   "MerchantCode":"9732",

   "PartnerCode":"FOLS"

}

Example of response :

   "code": "0",

   "message":"OK",

    "url":"https:\/\/accor-group-nonprod-rec.apigee.net\/payment\/v1.0\/authentication\/pages?apikey=<apikey>&apsmkey=<apsmkey>&formId=<formId>"

}

 

 

getTokenHTMLForm

the point of sale will open an internet page which will call this service and get back with the html form.

 

REQUEST

 

Type Endpoint
GET https://rec-api.accor.com/payment/v1.0/authentication/pages?apiKey=<apikey>&apsmkey=<apsmkey>&formId=<formId>

 

PARAMETERS

 

Header

Type

Description

CP mandatory

CNP mandatory

Example

traceId

string

Unique ID to trace the call

 

Y

 

apsmkey string Unique ID to recognize the origin in AccorAPI   Y  

 

RESPONSE

 

Body

Type

Description

CP mandatory

CNP mandatory

Example

Form String

contain html code with all fields to get cc details:

- cardType
- cardNumber
- expiration date
- partnerCode
- merchantCode

  Y  

 

EXAMPLE 1

This example show request/response for a card not present transaction.

Example of request :

{

https://rec-api.accor.com/payment/v1.0/authentication/pages?formId=xxx&apiKey=xxx&apsmKey=xxx

}

Example of response :

<html>

<body>

   <h1>Tokenize : getToken WS</h1>

   <form id="form" name="form" action="POST REQUEST (via JS function or other) TO https://rec-api.accor.com/payment/v1.0/authentication/tokens"  method="post">

<input type="number" name="cardNumber" id="cardNumber" placeholder="Card Numberr"><br>  

<input type="text" name="expirationDate" id="expirationDate" placeholder="expirationDate"><br>

<input type="text" name="partnerCode2" id="partnerCode2" placeholder="partnerCode"><br>

<input type="text" name="merchantCode2" id="merchantCode2" placeholder="merchantCode"><br>

<select name="cardtype" required="">

<option value="" disabled="" selected="" hidden="">Card Type</option>

<option value="1-CB">Bank Card</option>

<option value="2-AX">American Express</option>

<option value="8-DC">Diners</option>

<option value="4-MC">Master Card</option>

<option value="5-VI">Visa</option>

<option value="6-MA">Maestro</option>

<option value="7-EL">Electron</option>

 <option value="10-DI">Discover</option>

<option value="11-JCB">Japan Credit Bureau</option>

<option value="14-DCC">Dynamic Currency Conversion</option>

<option value="17-GC">Girocard</option>

<option value="16-CUP">CUP Credit Card</option>

</select> <br>

<input type="hidden" id="apsmkey" value="9cfcb469630574fdff5aff374773a3cf23a0f92aa864412fc41596d8aaf69ffc">

<input type="hidden" id="apikey" value="l7xxeedeb3e731d54d5fa331700a846b1912">

<input type="submit">

     </form> <p>Click on the submit button, and the form will be submitted using the POST method.</p> </body>

</html>

 

 

getToken

allow to send all information to the API to get the token back (after all previous fields fill in)

 

REQUEST

 

Type Endpoint
POST https://rec-api.accor.com/payment/v1.0/authentication/tokens

 

PARAMETERS

 

Header

Type

Description

CP mandatory

CNP mandatory

Example

apikey string First Id to recognize the origin   Y l7xxxxxxxxxxxxxxxxxxxxxxxxxxxxxx

traceId

string

Unique ID to trace the call

 

N

XXXXX-XXXXX-XXXXX-XXXXX-XXXXX

origin string Recognizable and unique name (for debugging purposes)   N XXXXX
apsmkey string Unique ID to recognize the origin in Accor API   Y APS12345678D

 

Body

Type

Description

CP mandatory

CNP mandatory

Example

MerchantCode String

Name of calling origin

  Y 0449
PartnerCode String Name of calling partner   Y Fols
CardNumber String Card details   Y 4111111111111111
ExpirationDate String Expiration date of the card   Y 2206
CardType String

Card type : VI, CA, AX

Other card : JC, DC, CU, PF, BC, RU

  Y VI
Cvc String Security code of the card   N 455

 

RESPONSE

 

Body

Type

Description

CP mandatory

CNP mandatory

Example

Code

String

Response

 

Y

0

Message String Response message   Y OK
TransactionId String

Unique ID of the operation

  N  
ExpirationDate String Expiration date of the card   Y 2206
CardType String

Card type : VI, CA, AX

Other card : JC, DC, CU, PF, BC, RU

  Y VI
Alias String Token of the card (same format as the card type)   Y 5870321467306571

 

EXAMPLE 1

This example show request/response for a card not present transaction.

Example of request :

{

       "partnerCode": "FOLS",

       "merchantCode": "0416",

       "cardNumber": "4111111111111111",

       "expirationDate": "2206",

       "cardType": "VI"

    }

Example of response :

{

    "code": "0",

    "message": "OK",

    "transactionId": "DOIAIJSS_23359392691TK",

    "alias": "5870321467306571",

    "cardType": "VI",

    "expirationDate": "2206"

}

 

 

About us

We are far more than a worldwide leader. We are 300,000 hospitality experts placing people at the heart of what we do, and nurturing real passion for service and achievement beyond limits. We take care of millions of guests in our 5,000 addresses.