Authorization

Programmatically Authorize Transactions Before Settlement

Purpose

This method initiates an authorization for a particular amount in the specified currency for a stored card of a customer. The amount is reserved and can be captured instantly or after a period of time. The max period of time available before sending the IPCAuthorizationCapture method is limited based on the type of business.

myPOS Checkout API will check for:

  • Valid myPOS Account number (also referred to as Client number)
  • Valid Checkout Store ID (SID) corresponding with this myPOS Account number
  • Valid status of the Checkout (enabled)
  • Valid currency and amount
  • Valid KeyIndex & corresponding Signature
  • Valid OrderID
  • Valid ItemName
  • Valid CardToken

Method Properties

Please note all properties must be in PascalCase!

PropertyTypical valueTypeRequiredDescription
Amount23.45DoubleYESThe amount of the payment requested.
CurrencyEURA(3)YESISO 3-character currency code. The currency for the payment should be registered and approved.
OrderID20120331999999StringYESPlaceholder for the merchant. Used to put some data that will help the merchant to recognize for which order is the payment. Up to 80 characters.
SID000000000000010StringYESStore ID (SID) - Reference number for the Merchant Checkout in the myPOS system
WalletNumber61938166610StringYESmyPOS Client Number
KeyIndex1IntYESIndicates which key pair is being used.
AccountSettlement11111111119N(11)NOAccount for payment settlement.
ItemNameHP ProBook 6360b stickerStringYESThe item for which the authorization is being issued.
NoteBooking for John SmithStringNOText associated with the authorization.
CardToken287A....971E07StringYESThe token of the stored client's card.
OutputFormatXMLStringNOOutput format of data. The property can be “XML” or “JSON”. If it is not specified in the request, the default value is “XML”.

Partner Identification

If you are part of our Partners Program, you will need to submit these two additional parameters with each of your requests to the API. This will provide you with analytics about the usage in your myPOS Partners Portal account and help our support teams assist you better.

Note - This requires you to set the API version of your requests to 1.4.1. No other changes in the code/requests are necessary.*

PropertyTypical valueTypeDescription
PartnerIDmps-p-XXXXXXXXStringIdentical number for the partner
ApplicationIDmps-app-XXXXXXXXStringIdentical number for the application

Response Properties

PropertyTypical valueTypeDescription
Amount23.45DoubleEcho from IPCAuthorization
CurrencyEURA(3)Echo from IPCAuthorization
OrderID201203319999999StringEcho from IPCAuthorization
IPCTrnref12345678923StringUsed to uniquely identify a transaction in IPC. Used as a parameter for a subsequent refund or reversal if needed.
Status0Int0 means success; any other value indicates an error.
StatusMsgSuccessStringHuman-readable result of the transaction.
Signature(Base64 encoded)StringUsed to verify the integrity of the response.

Example request

New lines and tabulators are included for better reading and do not exist in the POST request.

IPCmethod=IPCAuthorization&
IPCVersion=1.4&
IPCLanguage=EN&
SID=000000000000010&
WalletNumber=61938166610&
Amount=23.45&
Currency=EUR&
OrderID=2bfbe61a-6da2-459f-b91b-2ee754b2f255&
CardToken=287ABEB971E07E61E5A043C1B48270EA88E2A5604DA120F522E24A4E44396F50&
KeyIndex=1&
ItemName=HP ProBook 6360b sticker&
Note=&
Signature=TuQ6nQJxWJ2T+sM6uzBqYYtOWdw+0ecHaRzujTJChWds/1HWK+kCcfKrAW9sN8xzsRBSZ2zH1uPMMIMgB3XqqHNbq06YhpD3XY/Ltp+ooc8xoq1jdajnUexC5JuDzTslCMKKFmW5vl0HsEkPltyxir0Z5AWpgOZkjqCPEr817

Example response

XML

<ipc_response is-array="true">
    <IPCmethod>IPCAuthorization</IPCmethod>
    <IPCTrnref>97258</IPCTrnref>
    <OrderID>2bfbe61a-6da2-459f-b91b-2ee754b2f255</OrderID>
    <Amount>1.23</Amount>
    <Currency>EUR</Currency>
    <Status>0</Status>
    <StatusMsg>Success</StatusMsg>
    <Signature>hwJ0jFXsf3G8N9A2xHXr9mfuBsGGC4uVG35NNJbBf6Ogtn3nK4Y9axLxPtC0VDUnzfg17BYbRuWKAHcxHslUsbsA7c1WzNCue4cgFQVNkppkdkpr5YK5AQPxOzdTqfHzqyw5YvFXcJJLSpkr7BKk4cv3Q01QvtWziOdirbnysJc=</Signature>
</ipc_response>

JSON

{
    "IPCmethod": "IPCAuthorization",
    "IPCTrnref": "97258",
    "OrderID": "2bfbe61a-6da2-459f-b91b-2ee754b2f255",
    "Amount": "1.23",
    "Currency": "EUR",
    "Status": 0,
    "StatusMsg": "Success",
    "Signature": "hwJ0jFXsf3G8N9A2xHXr9mfuBsGGC4uVG35NNJbBf6Ogtn3nK4Y9axLxPtC0VDUnzfg17BYbRuWKAHcxHslUsbsA7c1WzNCue4cgFQVNkppkdkpr5YK5AQPxOzdTqfHzqyw5YvFXcJJLSpkr7BKk4cv3Q01QvtWziOdirbnysJc="
}