Testing your point-of-sale integration
You can use test mode to begin developing your Point of Sale (POS) integration without purchasing physical terminal hardware. A virtual test terminal allows you to simulate the entire payment flow and validate if your integration is working correctly.
Ensure the
Point of Salepayment method is enabled on your profile. Doing so automatically generates a test mode terminal.
To start testing your integration:
- Get your test terminal ID - fetch your test
terminal IDfrom the Web App (withtestmode active) or via the List Terminals endpoint using your test credentials. If you are using an access token, ensure you passtestmode=trueas a query parameter. - Create a test payment - use your test credentials and the retrieved
terminal IDto call the Create Payment endpoint. Set themethodtopointofsaleand pass the test terminal ID in theterminalIdparameter.
Example:
curl -X POST https://api.mollie.com/v2/payments \
-H "Authorization: Bearer test_dHar4XY7LxsDOtmnkVtjNVWXLSlXsM" \
-d "amount[currency]=EUR" \
-d "amount[value]=10.00" \
-d "description=My first in-person payment" \
-d "redirectUrl=https://cash-register.example.org/order/12345/" \
-d "webhookUrl=https://cash-register.example.org/payments/webhook/" \
-d "method=pointofsale" \
-d "terminalId=term_7MgL4wea46qkRcoTZjWEH"<?php
$mollie = new \Mollie\Api\MollieApiClient();
$mollie->setApiKey("test_dHar4XY7LxsDOtmnkVtjNVWXLSlXsM");
$payment = $mollie->payments->create([
"amount" => [
"currency" => "EUR",
"value" => "10.00"
],
"description" => "My first in-person payment",
"redirectUrl" => "https://cash-register.example.org/order/12345/",
"webhookUrl" => "https://cash-register.example.org/payments/webhook/",
"method" => "pointofsale",
"terminalId" => "term_7MgL4wea46qkRcoTZjWEH"
]);- Simulate payment statuses - since there is no physical device to interact with, the API response includes a
changePaymentStateURL. Use this URL to simulate different payment statuses (such aspaid,canceled, orfailed) to ensure your integration handles them correctly. Depending on the payment status, this will also trigger a call to your webhook server.
See Handling payment status for a breakdown of all payment stages and check out Webhooks for more details on how to handle webhook events.
Updated 1 day ago
Did this page help you?