Handle payment card delegation from Human Phone. Covers credit/debit card number, expiry, CVC entry in checkout flows.
Use this when an app requires payment card information for a purchase or subscription.
request_human_auth(
capability: "payment",
instruction: "Please enter your payment card details for [purchase description, amount].",
uiTemplate: {
fields: [
{ id: "card_number", label: "Card Number", type: "card-number", required: true },
{ id: "expiry", label: "Expiration", type: "expiry", required: true, placeholder: "MM/YY" },
{ id: "cvc", label: "Security Code", type: "cvc", required: true }
],
artifactKind: "payment_card",
requireArtifactOnApprove: true,
title: "Payment Card Required",
summary: "Enter your card details to complete payment."
}
)
Read the artifact: read(<artifact_path>) to get card fields.
Check the current screen. The checkout form may still be visible.
If the form is visible: fill each field by tapping + typing (card number, expiry, CVC).
If the screen changed: navigate back to the checkout page.
Tap Pay / Submit / Complete Purchase.
Delete the artifact immediately: exec("rm <artifact_path>")