Amadis
Perform a Deferred Sale Payment (OneTimeReservation)
In Nexo Retail protocol, a Deferred Sale Payment is used to separate the payment in two steps:
Before the service consumption or the goods delivery, to get the payment authorisation for a maximum amount.
At the end of the consumption or delivery, to complete the payment transaction with the actual amount card.
In this section:
- 1 Step 1 : Get a payment authorisation for a maximum amount (OneTimeReservation)
- 1.1 Payment Request
- 1.1.1 Message example
- 1.2 Payment Response
- 1.2.1 Message example
- 1.1 Payment Request
- 2 Step 2 : Complete the payment authorisation with the actual amount (Completion)
- 2.1 Payment Request
- 2.1.1 Message example
- 2.2 Payment Response
- 2.2.1 Message example
- 2.1 Payment Request
Step 1 : Get a payment authorisation for a maximum amount (OneTimeReservation)
Payment Request
The Request message includes:
RequestedAmount: this data could be absent or is the maximum amount of the purchase,
PaymentType: must be “OneTimeReservation”.
Message example
<?xml version="1.0" encoding="UTF-8"?>
<SaleToPOIRequest>
<MessageHeader MessageClass="Service" MessageCategory="Payment" MessageType="Request" ServiceID="400" SaleID="SaleID20022" POIID="DEMO0001"/>
<PaymentRequest>
<SaleData SaleReferenceID="ABCD1234">
<SaleTransactionID TransactionID="4" TimeStamp="2020-05-21T14:48:05+05:00" />
</SaleData>
<PaymentTransaction>
<AmountsReq Currency="USD" RequestedAmount="80.00" />
</PaymentTransaction>
<PaymentData PaymentType="OneTimeReservation" />
</PaymentRequest>
</SaleToPOIRequest>
Payment Response
The Response message includes:
AuthorizedAmount: the maximum amount of the purchase.
Message example
<?xml version="1.0"?>
<SaleToPOIResponse>
<MessageHeader MessageClass="Service" MessageCategory="Payment" MessageType="Response" ServiceID="400" SaleID="SaleID20022" POIID="DEMO0001"/>
<PaymentResponse>
<Response Result="Success"/>
<SaleData>
<SaleTransactionID TransactionID="4" TimeStamp="2020-05-21T14:48:05+05:00" />
</SaleData>
<POIData>
<POITransactionID TransactionID="123456" TimeStamp="2020-05-21T14:48:06+05:00"/>
</POIData>
<PaymentResult>
<AmountsResp Currency="USD" AuthorizedAmount="80.00">
<PaymentAcquirerData AcquirerID="497867" MerchantID="mer77-130209" AcquirerPOIID="456">
<ApprovalCode>032983</ApprovalCode>
</PaymentAcquirerData>
</PaymentResult>
</PaymentResponse>
</SaleToPOIResponse>
Step 2 : Complete the payment authorisation with the actual amount (Completion)
Payment Request
The Request message includes:
RequestedAmount: this is the actual amount of the purchase,
PaymentType: must be “Completion”,
OriginalPOITransaction: this is a mandatory component of the Payment request containing the POITransactionID component of the first Payment response with “OneTimeReservation” PaymentType.
For Automated Fuel Dispensing Machine (AFD), at least one
SaleItem
must be present.
In the example below, the OneTimeReservation Response contains: <POITransactionID TransactionID="123456" TimeStamp="2020-05-21T14:48:06+05:00"/>
In the Completion Request, the OriginalPOITransaction shall contain: <POITransactionID TransactionID="123456" TimeStamp="2020-05-21T14:48:06+05:00"/>
Message example
<?xml version="1.0" encoding="UTF-8"?>
<SaleToPOIRequest>
<MessageHeader MessageClass="Service" MessageCategory="Payment" MessageType="Request" ServiceID="401" SaleID="SaleID20022" POIID="DEMO0001" />
<PaymentRequest>
<SaleData SaleReferenceID="ABCD1234">
<SaleTransactionID TransactionID="5" TimeStamp="2020-05-21T14:52:05+05:00" />
</SaleData>
<PaymentTransaction>
<AmountsReq Currency="USD" RequestedAmount="64.99" />
<OriginalPOITransaction SaleID="SaleID20022" POIID="DEMO0001">
<POITransactionID TransactionID="123456" TimeStamp="2020-05-21T14:48:06+05:00"/>
</OriginalPOITransaction>
<SaleItem ItemID="1" ProductCode="101" ItemAmount="5.00">
<UnitPrice>5.00</UnitPrice>
<Quantity>1.0</Quantity>
<UnitOfMeasure>USGallon</UnitOfMeasure>
<ProductLabel>Diesel</ProductLabel>
</SaleItem>
</PaymentTransaction>
<PaymentData PaymentType="Completion" />
</PaymentRequest>
</SaleToPOIRequest>
Payment Response
The Response message includes:
AuthorizedAmount: the actual amount of the purchase, as in RequestedAmount.
Message example