Skip to content
Linq Copy agent prompt

Payments

Let an agent pay on a customer’s behalf with a single-use virtual card. Connect a customer once, then create a payment — a virtual card is minted scoped to that purchase and the card details are handed back for checkout.

Create a payment (agent pays on a customer's behalf)
client.payments.create(PaymentCreateParams { amount_cents, currency, handle, 3 more } body, RequestOptionsoptions?): Payment { id, amount_cents, approval_url, 7 more }
POST/v3/payments
Get a payment
client.payments.retrieve(stringpaymentID, RequestOptionsoptions?): Payment { id, amount_cents, approval_url, 7 more }
GET/v3/payments/{paymentId}
Cancel a payment
client.payments.cancel(stringpaymentID, RequestOptionsoptions?): Payment { id, amount_cents, approval_url, 7 more }
POST/v3/payments/{paymentId}/cancel
Get a payment's card-reveal handoff
client.payments.credentials(stringpaymentID, RequestOptionsoptions?): PaymentCredentialsResponse { handoff }
GET/v3/payments/{paymentId}/credentials
ModelsExpand Collapse
Payment { id, amount_cents, approval_url, 7 more }
id?: string
amount_cents?: number
formatint64
approval_url?: string

Present on awaiting_user_action once a card is on file and the charge needs the customer’s passkey. Re-send the create request with the same Idempotency-Key to collect the payment after they approve.

attach_url?: string

Present on awaiting_user_action when the customer has no card on file yet. A hosted page — open it for them; it stays valid for about 48 hours. Not returned on needs_connection: connect the handle first.

currency?: string
description?: string
handle?: string
merchant?: Merchant { name, url }

The merchant the card is minted against, echoed from the request.

name?: string
url?: string
metadata?: Record<string, string>

Your own key/values, echoed back from the request.

status?: "needs_connection" | "connecting" | "awaiting_user_action" | 6 more
One of the following:
"needs_connection"
"connecting"
"awaiting_user_action"
"ready"
"authorized"
"succeeded"
"declined"
"canceled"
"expired"
PaymentCredentialsResponse { handoff }
handoff?: Handoff { card_ref, fetch_url, provider, user_token }

Fetch the card directly from the provider with these — never through Linq.

card_ref?: string
fetch_url?: string
provider?: string
user_token?: string

Short-lived bearer to fetch the card from the provider.