Not all developers and QA testers need or can have a physical terminal to test payments. However, you might still need for them to be able to submit terminal request. You can emulate a P5 terminal in you application for testing Adyen CP payments.
Creating a simulated request
Simulated requests only work with test accounts and test payments. To create a simulated CP request, create a CP payment as you normally would. Here is an example:
// POST /v2/payment/intent
{
"external_account_id": "account_123456",
"amount": 12.99,
"payment_method_types": "card_present",
"capture_method": "automatic",
"external_payment_id": "transaction_123456"
}
Then create the AUTH request, but in this case pass qti_simulated_visa
as the terminal_id
. This will simulate the request as if it went through the P5 hardware. Here is an example:
// POST /v2/payment/auth
{
"external_account_id": "account_123456",
"payment_id": "pi_12345",
"external_payment_id", "transaction_123456",
"terminal_id": "qti_simulated_visa",
}
You should get back a response showing that the CP simulated payment was used
{
"payment_id": "pi_12345",
"date_created": "2024-11-01T19:32:51+00:00",
"external_transaction_id": "",
"merchant_reference": null,
"status": "success",
"amount": "16.99",
"amount_authorized": "12.99",
"amount_captured": "12.99",
"amount_capturable": 0,
"amount_refunded": "0.00",
"amount_refundable": "12.99",
"tip_amount": 0,
"donation_amount": 0,
"currency": "USD",
"card_present": true,
"payment_method_id": null,
"notes": null,
"authorization_code": null,
"processor": "Adyen",
"funding_source": null,
"payment": {
"type": "card_present",
"brand": "Visa",
"last_4": "1111",
"exp_month": "03",
"exp_year": 30,
"cardholder_name": null,
"receipt_data": {
"emv_app_id": "A0000000012345",
"emv_cryptogram": "simulated",
"emv_reference_number": "K897523913989077",
"emv_app_label": "visa",
"emv_term_id": "qti_simulated_visa",
"emv_auth_code": "123456"
},
"avs_response": "",
"payment_method_id": null
},
"last_error": "",
"last_error_code": "",
"request_id": 288108072
}