---
title: "Trigger credit card autofill"
method: POST
path: "/v1/browser/autofill/credit-card"
tags: ["Browser"]
---

# Trigger credit card autofill

`POST /v1/browser/autofill/credit-card`

## Request

- Base URL: `http://localhost:9998`
- URL: `http://localhost:9998/v1/browser/autofill/credit-card`
- Auth: HTTP bearer

Triggers Chrome's Autofill.trigger CDP method on a form field, then
fills credit card details via DOM manipulation as a fallback.

## Request body

- object
  - `selector` string, required: PiperSelector string (e.g. "css:input[name=card]")
  - `number` string, required: Credit card number
  - `name` string: Cardholder name
  - `expiryMonth` string
  - `expiryYear` string
  - `cvc` string

## Response `200`

Autofill result

- AutofillResult
  - `triggered` boolean, required
  - `filledFields` integer, nullable

## Other responses

- `400`: Invalid request or autofill error
- `409`: Not connected to a browser
- `503`: Browser service not initialized

---

[API](https://skmtc.dev/modelpiper/apis/toolpiper-api.md) · [All operations](https://skmtc.dev/modelpiper/apis/toolpiper-api/llms.txt) · [OpenAPI document](https://skmtc.dev/modelpiper/apis/toolpiper-api/revisions/6722bf56385c?raw)
