If you want to execute payment from а web page, you`ll need to add this URL to your website.
Example:
<a href="myposapi://glass/1.0?action=com.mypos.transaction.START_TRANSACTION&request_code=101&amount=1.23¤cy=EUR&app_id=yourwebsite.com&app_version=1.0.0&foreign_transaction_id=123test321&callback=https://www.yourwebsite.com/myposglassendpoint">Start myPOS Payment</a>
Method properties
Property |
Typical value |
Type |
Condition |
Description |
---|---|---|---|---|
action | com.mypos.transaction.START_TRANSACTION | String | Mandatory | Action Type: Payment/Refund |
request_code | 101 | Integer | Mandatory | Payment request code. |
amount | 1.23 | Decimal | Mandatory | The amount of the requested payment. |
currency | EUR | String | Mandatory | ISO 3-character currency code. The currency for the payment should be registered and approved. |
app_id | yourwebsite.com | String | Mandatory | Web site domain or application package name. |
app_version | 1.0 | String | Mandatory | Version code of the application. |
tip_amount | 2.20 | Decimal | Optional | Tip amount of the requested payment. |
skip_confirmation_screen | true/false | Boolean | Optional | A flag that skips the confirmation screen. |
tips_enabled | true/false | Boolean | Optional | A flag that will enable to have tip for the transaction. |
operator_code | operator5 | String | Optional | Unique code when there are multiple operators. |
reference_number | product5 | String | Optional | Unique code to link one or multiple payments. |
reference_number_type |
1 2 3 4 |
Integer | Optional | REFERENCE_NUMBER -> 1
INVOICE_ID -> 2 PRODUCT_ID -> 3 RESERVATION_NUMBER -> 4 |
foreign_transaction_id | 123test321 | String | Optional | Unique transaction id for request/response matching. |
enable_mastercard_sonic | true/false | Boolean | Optional | A flag that enables/disables the Mastercard sonic branding animation. |
enable_visa_sensory | true/false | Boolean | Optional | A flag that enables/disables the Visa sensory branding animation. |
print_merchant_receipt |
1 2 |
Integer | Optional |
1 - Receipt on 2 - Receipt off |
print_customer_receipt |
1 2 3 4
|
Integer | Optional |
1 - Receipt on 2 - Receipt off 3 - Receipt after confirmation 4 - E - receipt |
receipt_receiver |
+447911123456 |
String | Optional |
Set email or phone e-receipt receiver, works with customer receipt configuration RECEIPT_E_RECEIPT or RECEIPT_AFTER_CONFIRMATION |
callback | https://www.yourwebsite.com/myposglassendpoint | String | Optional | URL that will be executed with response parameters after successful or unsuccessful payment. |
Handle the result
Make sure that the callback URL you provide is correct and controlled by you.
Example of Approved transaction:
{CALLBACK_URL}?status=0&status_text=TRANSACTION_SUCCESS&transaction_approved=true&foreign_transaction_id=123test321&stan=6&date_time=211123172012&authorization_code=074114
Example of Declined transaction:
{CALLBACK_URL}?status=2&status_text=TRANSACTION_DECLINED&transaction_approved=false&foreign_transaction_id=123test321
Response properties
Property |
Typical value |
Type |
Condition |
Description |
---|---|---|---|---|
status | 0 | Integer | Mandatory | One of the constants in the Transaction Processing Result Class |
status_text | TRANSACTION_SUCCESS | String | Mandatory | A textual representation of the status in Transaction Processing Result Class |
transaction_approved | true/false | Boolean | Mandatory | Transaction Status Indicator |
foreign_transaction_id | 123test321 | String | Optional | Unique transaction id for request/response matching |
stan | 27 | Integer | Optional | System Trace Audit Number (unique number of transaction by TID) |
authorization_code | VISSIM | String | Optional | Authorization code returned by issuer |
transfer_date_time | 180129123753 | String | Optional | Date and time of the transaction formatted as YYMMDDHHmmss |