Local API

(0 reviews)

Endpoints

HTTP Integration

Introduction

The Market Pay Local API uses a mixed communication model based on the endpoint's requirements:

  • Synchronous (SYNC) Mode: Used for simple, direct actions where the POS waits for an immediate result. This follows a standard single request/response cycle (e.g., POST /status returns RC 200 OK with the response body).
  • Asynchronous (ASYNC) Mode: Used for complex transactions that require user interaction or processing time. This involves the HTTP Polling cycle detailed below.

1. Endpoints

  • POST: Used in ASYNC/SYNC modes
  • GET: Only used to fetch stored responses

resources/image-d30141ca-a1f5-48c1-986e-113d4094b5f8.png

2.1 Pay On Site Endpoint description list

NNameFunctionModeInput MessageOutput Message
1/loginPOSTSYNCLoginRequestLoginResponse, EventNotification, RC 408, RC 500
2/paymentPOSTASYNCPaymentRequestRC 202, RC 403
2/paymentGETSYNCNothingRC 200, RC 204, RC 206, RC 423, RC 408, RC 500, DisplayRequest, EventNotification, PaymentResponse
3/abortPOSTSYNCAbortRequest, AdminRequestRC 202
4/logoutPOSTSYNCLogoutRequestLogoutResponse, EventNotification
5/acquisitionPOSTASYNCCardAcquisitionRequestRC 202, RC 403
5/acquisitionGETSYNCNothingRC 200, RC 201, RC 204, RC 206, RC 423, RC 408, RC 500, DisplayRequest, CardAcquisitionResponse, EventNotification, AdminResponse
6/statusPOSTSYNCTransactionStatusRequestRC 200, RC 408, RC 500, TransactionStatusResponse, EventNotification
7/diagnosisPOSTSYNCDiagnosisRequestRC 200, RC 408, RC 500 DiagnosisResponse, EventNotification
8/reversalPOSTASYNCReversalRequestRC 202, RC 403
8/reversalGETSYNCNothingRC 200, RC 204, RC 408, RC 423, RC 500, ReversalResponse, DisplayRequest, EventNotification
9/updatePOSTASYNCAdminRequestRC 202, RC 403
9/updateGETSYNCNothingRC 200, RC 201, RC 204, RC 206, RC 423, RC 408, RC 500, DisplayRequest, EventNotification, AdminResponse
10/balanceinquiryPOSTASYNCBalanceInquiryRequestRC 202, RC 403
10/balanceinquiryGETSYNCNothingRC 200, RC 201, RC 204, RC 206, RC 423, RC 408, RC 500, DisplayRequest, EventNotification, BalanceInquiryResponse
11/giftcardPOSTASYNCStoredValueRequestRC 202, RC 403
11/giftcardGETSYNCNothingRC 200, RC 204, RC 423, RC 408, RC 500, EventNotification, StoredValueResponse
12/activationPOSTASYNCAdminRequestRC 202, RC 403
12/activationGETSYNCNothingRC 200, RC 201, RC 204, RC 206, RC 423, RC 408, RC 500, DisplayRequest, EventNotification, AdminResponse
13/reconciliationPOSTASYNCReconciliationRequestRC 202, RC 403
13/reconciliationGETSYNCNothingRC 200, RC 204, RC 423, RC 408, RC 500, ReconciliationResponse, EventNotification
14/acquisition/abortPOSTSYNCAdminRequestRC 200, RC 408, RC 500, AdminResponse, EventNotification

2.2 Voucher Endpoint description list

NNameFunctionModeInput MessageOutput Message
1/italy/voucher/paymentPOSTSYNCPaymentRequestRC 200, RC 408, RC 500, PaymentResponse
2/italy/voucher/reversalPOSTSYNCReversalRequestRC 200, RC 408, RC 500, ReversalResponse
3/italy/altpayment/paymentPOSTSYNCPaymentRequestRC 200, RC 408, RC 500, PaymentResponse
4/italy/altpayment/reversalPOSTSYNCReversalRequestRC 200, RC 408, RC 500, ReversalResponse

2.3 Cheque Endpoint description list

NNameFunctionModeInput MessageOutput Message
1/cheque/paymentPOSTSYNCPaymentRequestRC 200, RC 408, RC 500, PaymentResponse
2/cheque/reversalPOSTSYNCReversalRequestRC 200, RC 408, RC 500, ReversalResponse

3. Transaction Status Codes

3.1 Flow Reference

This table defines the meaning and required actions for every HTTP response code encountered during
a synchronous transaction or the asynchronous polling loop.

RCStatus & TypeContent DeliveredFlow Result
200OK (Final)Full Body (PaymentResponse) or Failure Body (EventNotification).Transaction Finalized. The final result has been received. POS must STOP polling and finalize the transaction based on the content (success/failure).
202Accepted (Start)None (Empty Body)Transaction Started. The request was accepted and queued. The POS must immediately BEGIN polling (GET loop).
423Locked (No Operation)None (Empty Body)No Current Operation. Response Code returned when server doesn't process any operations on this endpoint hence no response available, no need to poll GET requests.
403Forbidden (Critical Error)None (Empty Body)Rejected. It informs that there is an operation in progress and not possible to start next one. The request is not allowed (e.g., already in progress). The POS must STOP the transaction immediately. And get result of previous via GET method
408Request TimeoutNone (Empty Body)Timeout. The request wasn't handled by POI within configured timeout
500Internal Server ErrorNone (Empty Body)Unexpected error An Unexpected Exception occurred during request or response handling

3.2 ASYNC Polling Intermediate Codes

These codes are exclusively returned to a GET polling request and require the POS application to continue the monitoring loop until a final status (RC 200/423) is reached.

In ASYNC, POS will receive Display Request sent by the POI via the polling cycle. Its primary function is to instruct the POS on what information to display or what operational status has been reached during a transaction.

RCStatus & TypeContent DeliveredFlow Result
201CreatedBody (DisplayRequest)Customer Action Required. The POI needs the customer to interact (e.g., PIN entry, card selection). POS must display the message and continue polling.
206Partial ContentBody (DisplayRequest or EventNotification)Status Update. Provides intermediate status data. POS must handle the notification and continue polling.
204No ContentNone (Empty Body)Processing. The transaction is active, but the POI has no status updates ready yet. POS must continue polling (checking again later).

3.3 Polling loop

The Polling Loop is the mechanism used for Asynchronous (ASYNC) transactions, where the Point of Sale (POS) actively monitors the Payment Terminal (POI) for a final result after initiating a request. This loop replaces a persistent connection and is critical for managing transaction state and communication stability.

  • Initiation: The POS sends a POST request (e.g., /payment) and receives RC 202 Accepted, signaling the transaction is queued and the loop must begin.
  • Continuation: The POS sends repeated GET requests (polling). The loop continues as long as the POI returns an intermediate status (RC 206 Partial Content, RC 201 Created, or RC 204 No Content).
  • Termination (Success/Failure): The loop immediately stops (break) when the POI returns a final status code (RC 200 OK for the result or RC 423 Locked/RC 403 Forbidden for a fatal error).
  • Exception: An unrecoverable internal error (like a parsing rejection) is delivered via an RC 200 OK response containing an EventNotification, which also requires the POS to immediately stop polling.

resources/ASYNC%20Polling%20Loop%20-%20Status%20Check%20%26%20Termination-77b0b7e9-7fd5-4d34-9cef-553539ddb530.png

###

4. Pay On Site Flows

4.1. Login flow

resources/Login%20Flow%20%28login%29%20-%20Synchronous-55b08918-04b4-40ae-ab04-15f0f337b42a.png

3.2. Payment Flow

resources/Payment%20Flow%20%28ASYNC%20Polling%20Cycle%29-00f82046-cb11-4dc1-a209-f581c4be6c64.png

3.3. Abort

resources/image-b8e0e9d5-f77f-4e10-89f8-0ae0aac1039e.png

In this case payment response’s Field ā€œResultā€: ā€œErrorā€, ā€œReasonā€: ā€œAbortedā€

3.4. Logout

resources/Logout%20Flow%20%28logout%29%20-%20Synchronous-7dced050-2850-428c-9eb0-7efb9f8c3e8d.png

3.5. Acquisition

resources/image-6082c420-05a0-46fb-a5e7-0a859323225f.png

INFO: Display request may be returned with code 206 Partial Content or 201 Continue

Continue - in case when there is currently no cached responses available on endpoint except this Display

Card Acquisition is a first part of ā€œDualā€ transaction, to Authorise transaction, further PaymentRequest should be sent (/payment Endpoint). Request shall contain CardAcquisitionReferenceId field pointing POITransactionId field from received previously CardAcqusitionResponse

3.6. Status

resources/image-1ea4b50d-8e56-478b-b072-80b65e75b3a4.png

3.7. Diagnosis

resources/image-6765ad20-ef9c-4b18-94bf-864b49bb4358.png

3.8 Reversal

resources/image-46ee7375-15a8-46ea-8279-ea0f9f810824.png

3.9 Update

resources/image-74215b0c-10fc-4a38-b3ed-e75a0906e7cc.png

3.10 Balance Inquiry

resources/Balance%20Inquiry%20Flow%20%28ASYNC%20Polling%29-5ff23d85-a29e-4de6-aaad-b7a12f99d04d.png

3.11 Gift Card

  • No diagram available

Italy endpoint

1. Voucher Payment

  • No diagram available

2. Voucher Reversal

  • No diagram available

3. Alternative Payment

  • No diagram available

4. Alternative Reversal

  • No diagram available

Cheque endpoint

1. Cheque payment

  • No diagram available

2. Cheque reversal

  • No diagram available

##


Reviews