# Hand off a PaymentIntent to a Reader and collect card details

Initiates a payment flow on a Reader and updates the PaymentIntent with card details before manual confirmation. See [Collecting a Payment method](https://docs.stripe.com/terminal/payments/collect-card-payment.md?terminal-sdk-platform=server-driven&process=inspect#collect-a-paymentmethod) for more details.

## Prerequisites

Before you can run the following code snippet, you need to call these APIs with the provided parameters to set up the prerequisite API object(s).

1. createPaymentIntent
POST /v1/payment_intents {"amount":2000,"currency":"usd","automatic_payment_methods":{"enabled":true}}

## Request

```curl
curl https://api.stripe.com/v1/terminal/readers/{{READER_ID}}/collect_payment_method \
  -u "<<YOUR_SECRET_KEY>>" \
  -d payment_intent={{PAYMENT_INTENT_ID}}
```

### Response

```json
{
  "id": "tmr_FDOt2wlRZEdpd7",
  "object": "terminal.reader",
  "action": {
    "failure_code": null,
    "failure_message": null,
    "collect_payment_method": {
      "payment_intent": "pi_1NrpbFBHO5VeT9SUiCEDMdc8"
    },
    "status": "in_progress",
    "type": "collect_payment_method"
  },
  "device_sw_version": "2.37.2.0",
  "device_type": "simulated_wisepos_e",
  "ip_address": "0.0.0.0",
  "label": "Blue Rabbit",
  "last_seen_at": 1681320543815,
  "livemode": false,
  "location": "tml_FDOtHwxAAdIJOh",
  "metadata": {},
  "serial_number": "259cd19c-b902-4730-96a1-09183be6e7f7",
  "status": "online"
}
```

## Returns

Returns an updated `Reader` resource.

## Parameters

- `payment_intent` (string, required)
  The ID of the PaymentIntent to collect a payment method for.

- [`collect_config`](https://docs.stripe.com/api/terminal/readers/collect_payment_method.md?query=collect_config) (object, optional)
  Configuration overrides for this collection, such as tipping, surcharging, and customer cancellation settings.
