Overview

Paypoint WEB ECR Service API (V1)

Test endpoint: https://mpqr-test.eftpos.com.sg/

 

Flows

Flow between the Merchant POS to Terminal Sequence flow.

 

ECR Operations

Header

Every API request requires the following HTTP headers to be included.

Header Key Description
Content-Type the MIME type of the body of the request when present. Eg: "application/json"
Accept the MIME type of the body of the response will present in Registration, Payment and Inquiry.
 

POS Terminal

Takes care by Payment App this is not for merchant to implement.

 

Registration

POS Terminal Registration.

REQUEST BODY SCHEMA: application/json

Field Id Type Description
device_serial_no string POS device serial no
merchant_id string Provided by ASCAN
terminal_id string Provided by ASCAN
timestamp string
<date-time>
format 'yyyyMMddHHmmss'
RESPONSES:






Request Samples

Payload
Content type
application/json
{  
  "device_serial_no": "123456789012",
  "merchant_id": "600054000000384"
  "terminal_id": "60006371"
  "timestamp": "20220627044107"
}  

Response Samples

200   400   500
Content type
application/json
{  
  "response": {
      "device_id": "9d6879ab-aa2a-43e1-adff-1dce30de2f19"
},
  "status": "S"
}  

Callback

ECR terminal command result handler.

REQUEST BODY SCHEMA: application/json

Field Id Type Description
additional_fields Array of objects
field_name string
field_value string
* Refer Additional Field section.
command_identifier string It is an identifier to trace the original transaction.
device_id string To identify the terminal device.
nonce string To trace the original transaction.
timestamp string
<date-time>
format 'yyyyMMddHHmmss'
trans_status string Success, Failed, Processing.
RESPONSES:







Request Samples

Payload
Content type
application/json
{  
  "additional_fields": [
      {
          "field_name": "transaction_type",
          "field_value": "R200"
      },
      {
          "field_name": "transaction_amount",
          "field_value": "000000000100"
      },
      {
          "field_name": "notify_url",
          "field_value": "https://mpqr-test.eftpos.com.sg/paypoint-web/api/version/1/ecr/terminal"
      }, ....etc
],
  "command_identifier": "7973dd3f-1a34-4f67-ba12-d9799503c071"
  "device_id": "9d6879ab-aa2a-43e1-adff-1dce30de2f19"
  "nonce": "431da91c-48f7-4365-bd17-d4d2590b8e1e"
  "timestamp": "20220627055257"
  "trans_status": "Success"
}  

Response Samples

400   500
Content type
application/json
{  
  "error": {
      "error_code": "Bad_Request",
      "error_description": "string"
},
  "status": "F"
}  

Merchant App

Merchant has to implement.

 

Initial Payment

ECR terminal inbound payment handler. Third party ECR system send payment information to the terminal through web, this api post the message to terminal.

REQUEST BODY SCHEMA: application/json

Field Id Type Description
additional_fields Array of objects
field_name string
field_value string
* Refer Additional Field section.
command_identifier string It is an identifier to trace the original transaction.
device_id string Scanned id from terminal.
nonce string It is an Unique random number.
timestamp string
<date-time>
format 'yyyyMMddHHmmss'
RESPONSES:







Request Samples

Payload
Content type
application/json
{  
  "additional_fields": [
      {
          "field_name": "transaction_type",
          "field_value": "C200"
      },
      {
          "field_name": "transaction_amount",
          "field_value": "100"
      },
      {
          "field_name": "notify_url",
          "field_value": "https://mpqr-test.eftpos.com.sg/paypoint-web/api/version/1/ecr/terminal"
      }
],
  "command_identifier": "7973dd3f-1a34-4f67-ba12-d9799503c071"
  "device_id": "9d6879ab-aa2a-43e1-adff-1dce30de2f19"
  "nonce": "431da91c-48f7-4365-bd17-d4d2590b8e1e"
  "timestamp": "20220627055257"
}  

Response Samples

200   400   500
Content type
application/json
{  
  "reference": "EX10001"
}  

Payment Inquiry

ECR Payment transaction inquiry.

REQUEST BODY SCHEMA: application/json

Field Id Type Description
device_id string Scanned id from terminal.
original_txn_command_identifier string It is an identifier to trace the original transaction.
original_txn_nonce string It is an Unique random number.
timestamp string
<date-time>
format 'yyyyMMddHHmmss'
transaction_reference string (Optional) Original transaction reference received from command API.
RESPONSES:







Request Samples

Payload
Content type
application/json
{  
  "device_id": "9d6879ab-aa2a-43e1-adff-1dce30de2f19"
  "original_txn_command_identifier": "7973dd3f-1a34-4f67-ba12-d9799503c071"
  "original_txn_nonce": "431da91c-48f7-4365-bd17-d4d2590b8e1e"
  "timestamp": "20220627055315"
  "transaction_reference": "EX10001"
}  

Response Samples

200   400   500
Content type
application/json
{  
  "additional_fields": [
      {
          "field_name": "transaction_type",
          "field_value": "R200"
      },
      {
          "field_name": "transaction_amount",
          "field_value": "000000000100"
      },
      {
          "field_name": "notify_url",
          "field_value": "https://mpqr-test.eftpos.com.sg/paypoint-web/api/version/1/ecr/terminal"
      }, ....etc
],
  "device_id": "string",
  "original_txn_command_identifier": "string",
  "original_txn_nonce": "string",
  "status": "Success",
  "timestamp": "20220427141522",
  "transaction_reference": "string"
}  

Additional Fields

Additional Fields used in Terminal Callback and Merchant Payment Inquiry.

  1. Request is using for Initial Payment API.
  2. Response is using for Terminal Callback and Merchant Payment Inquiry API's.

REQUEST BODY SCHEMA: application/json

Field Id Type Description
transaction_type string C640, C200.
transaction_amount string Sale amount with no decimal point.
notify_url string Terminal Callback url to backend system.

RESPONSE SCHEMA: application/json

Field Id Type Description
source_package_name string  
destination_package_name string  
transaction_type string  
card_number string  
transaction_amount string  
date_time string  
expiry_date string  
entry_mode string  
retrieval_reference_number string  
approval_code string  
response_code string  
terminal_id string  
merchant_id string  
host_label string  
emv_data string  
card_label string  
card_type string  
host_type string  
command_identifier string  
custom_data_2 string  
custom_data_3 string  
ecr_unique_trace_number string  
invoice_number string  
transaction_info string  
batch_number string  
coupons_vouchers string  
additional_printing_flag string  
external_device_invoice string  
card_holder_name string  
employee_id string  
original_trans_type string  
notify_url string  

Request Samples

Content type
application/json
{  
  "additional_fields": [
      {
          "field_name": "transaction_type",
          "field_value": "C200"
      },
      {
          "field_name": "transaction_amount",
          "field_value": "100"
      },
      {
          "field_name": "notify_url",
          "field_value": "https://mpqr-test.eftpos.com.sg/paypoint-web/api/version/1/ecr/terminal"
      }
],
}  

Response Samples

Content type
application/json
{  
  "additional_fields": [
      {
          "field_name": "source_package_name",
          "field_value": ""
      },
      {
          "field_name": "destination_package_name",
          "field_value": ""
      },
      {
          "field_name": "transaction_type",
          "field_value": "R200"
      },
      {
          "field_name": "card_number",
          "field_value": "XXXXXXXXXXXX5774"
      },
      {
          "field_name": "transaction_amount",
          "field_value": "000000000100"
      },
      {
          "field_name": "date_time",
          "field_value": "20220202152621"
      },
      {
          "field_name": "expiry_date",
          "field_value": "XXXX"
      },
      {
          "field_name": "entry_mode",
          "field_value": "C"
      },
      {
          "field_name": "retrieval_reference_number",
          "field_value": "220202152621"
      },
      {
          "field_name": "approval_code",
          "field_value": "152621"
      },
      {
          "field_name": "response_code",
          "field_value": "00"
      },
      {
          "field_name": "terminal_id",
          "field_value": "66616022"
      },
      {
          "field_name": "merchant_id",
          "field_value": "4551258049"
      },
      {
          "field_name": "host_label",
          "field_value": "AMEX"
      },
      {
          "field_name": "emv_data",
          "field_value": "00C0008000E800A0000000031010 VISA "
      },
      {
          "field_name": "card_label",
          "field_value": "AMEX"
      },
      {
          "field_name": "card_type",
          "field_value": "A"
      },
      {
          "field_name": "host_type",
          "field_value": "A"
      },
      {
          "field_name": "command_identifier",
          "field_value": ""
      },
      {
          "field_name": "custom_data_2",
          "field_value": ""
      },
      {
          "field_name": "custom_data_3",
          "field_value": ""
      },
      {
          "field_name": "ecr_unique_trace_number",
          "field_value": ""
      },
      {
          "field_name": "invoice_number",
          "field_value": "000001"
      },
      {
          "field_name": "transaction_info",
          "field_value": ""
      },
      {
          "field_name": "batch_number",
          "field_value": "000001"
      },
      {
          "field_name": "coupons_vouchers",
          "field_value": ""
      },
      {
          "field_name": "additional_printing_flag",
          "field_value": ""
      },
      {
          "field_name": "external_device_invoice",
          "field_value": ""
      },
      {
          "field_name": "card_holder_name",
          "field_value": "VENKATESULU ADDUR"
      },
      {
          "field_name": "employee_id",
          "field_value": ""
      },
      {
          "field_name": "original_trans_type",
          "field_value": "000002"
      },
      {
          "field_name": "notify_url",
          "field_value": "https://mpqr-test.eftpos.com.sg/paypoint-web/api/version/1/ecr/terminal/callback"
      }
]
}