Agentcard

Cancel a payment

Closes the virtual card and cancels the payment.

post/v3/payments/{paymentId}/cancel

Request

  • Base URL: https://api.linqapp.com/api/partner
  • URL: https://api.linqapp.com/api/partner/v3/payments/{paymentId}/cancel
  • Auth: HTTP bearer

Path parameters

paymentIdstring required

Payment id

Response

Payment canceled

idstring
status'needs_connection' | 'connecting' | 'awaiting_user_action' | 'ready' | 'authorized' | 'succeeded' | 'declined' | 'canceled' | 'expired'
handlestring
amount_centsinteger
currencystring
descriptionstring
metadataobject

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

attach_urlstring

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.

approval_urlstring

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.

Example response

{
  "id": "550e8400-e29b-41d4-a716-446655440000",
  "status": "ready",
  "handle": "+14155550123",
  "amount_cents": 2500,
  "currency": "usd",
  "merchant": {
    "name": "DoorDash",
    "url": "doordash.com"
  },
  "attach_url": "https://app.agentcard.sh/attach/eyJhbGciOi..."
}

Changes

No recorded changes to this operation across all 1 revision of this API.