discoverReaders
to search for readers, with the simulated option set to true.
### Discover readers
The Stripe Terminal SDK comes with a built-in simulated card reader, so you can develop and test your app without connecting to physical hardware. To use the simulated reader, call `discoverReaders` to search for readers, with the simulated option set to true. You can discover intended readers more easily by [filtering by location](https://docs.stripe.com/terminal/fleet/register-readers.md).
### Connect to the simulated reader
When `discoverReaders` returns a result, call `connectInternetReader` to connect to the simulated reader.
### Connect to the simulated reader
When `discoverReaders` returns a result, call `connectBluetoothReader` to connect to the simulated reader.
### Create a PaymentIntent
Create a [PaymentIntent](https://docs.stripe.com/api/payment_intents.md) object using the SDK. A PaymentIntent tracks the customer’s payment lifecycle, keeping track of any failed payment attempts and ensuring the customer is only charged once.
### Collect payment method details
Call `collectPaymentMethod` with the PaymentIntent’s client secret to collect a payment method. When connected to the simulated reader calling this method immediately updates the PaymentIntent object with a [simulated test card](https://docs.stripe.com/terminal/references/testing.md#simulated-test-cards). When connected to a physical reader the connected reader waits for a card to be presented.
### Confirm the payment
After successfully collecting payment method data, call `confirmPaymentIntent` with the updated PaymentIntent to confirm the payment. A successful call results in a PaymentIntent with a status of `requires_capture` for manual capture or `succeeded` for automatic capture.
### Create an endpoint to capture the PaymentIntent
Create an endpoint on your backend that accepts a PaymentIntent ID and sends a request to the Stripe API to capture it.
### Capture the PaymentIntent
If you defined `capture_method` as `manual` during PaymentIntent creation, the SDK returns an authorized but not captured PaymentIntent to your application. When the PaymentIntent status is `requires_capture`, notify your backend to capture the PaymentIntent. In your request send the PaymentIntent ID.
To ensure the application fee captured is correct for connected accounts, inspect each `PaymentIntent` and modify the application fee, if needed, prior to manually capturing the payment.
### Run the application
Run your server and go to [localhost:4242](http://localhost:4242).
### Make a test payment
Use [amounts](https://docs.stripe.com/terminal/references/testing.md#physical-test-cards) ending in the following special values to test your integration.
| Scenario | Card Number |
| ------------------------------- | ---------------- |
| Payment succeeds | 4242424242424242 |
| Payment requires authentication | 4000002500003155 |
| Payment is declined | 4000000000009995 |
### Install the Stripe Node library
Install the library:
```
npm install --save stripe
```
Initialize the Stripe library with your key:
### Install the Stripe Ruby library
Install the gem:
```
gem install stripe
```
Initialize the Stripe library with your key:
### Install the Stripe Java library
Add the following dependency to your POM and replace {VERSION} with the version number you want to use.
```