Simulate terminal based payments

I can create a checkout item and get a status but how do I simulate tapping the card on the termainl to move my payment from PENDING to PAID?

    def create_checkout(self, amount):
        checkout = {
            "checkout": {
                "amount_money": {
                    "amount": amount,
                    "currency": "GBP"
                "device_options": {
                    "device_id": self._config["device_id"],
            "idempotency_key": str(uuid4()),
        data = json.dumps(checkout)
        j = req(f"{API_URL}/v2/terminals/checkouts",
        id = j["checkout"]["id"]
        return id

    def get_checkout(self, checkout_id):
        j = req(f"{API_URL}/v2/terminals/checkouts/{checkout_id}", headers=self.HEADERS)
        status = j["checkout"]["status"]
        return status

Oh so okay I use a device_id from here Test in the Sandbox
But there is a whole load of logic in my application where customer triggers a payment request for 1 item but then before they tap their card they might indicate they actually want two items so I think want to cancel that checkout and send a requset for twice the value
With these termainls it instantly goes to completed

Stripes api has a “special” API to tap the card on the terminal when your useing development mode

If the customer is going to be prompted to add additional items at checkout, wouldn’t you want to wait until the customer has made their selection before prompting them to pay? If you prompt them prior, they may not notice the additional prompts because their attention is diverted to the Terminal device for making the payment.

Alternatively, if you would like to delay the capture of a payment and possibly call UpdatePayment to change the amount charged, you can set autocomplete in the CreateTerminalCheckout to false. :slightly_smiling_face: