## Cancel a payment

**post** `/v3/payments/{paymentId}/cancel`

Closes the virtual card and cancels the payment.

### Path Parameters

- `paymentId: string`

### Returns

- `Payment object { id, amount_cents, approval_url, 5 more }`

  - `id: optional string`

  - `amount_cents: optional number`

  - `approval_url: optional string`

    Present when the customer must approve with a passkey.

  - `attach_url: optional string`

    Present when the customer must attach a card.

  - `currency: optional string`

  - `description: optional string`

  - `handle: optional string`

  - `status: optional "needs_connection" or "connecting" or "awaiting_user_action" or 6 more`

    - `"needs_connection"`

    - `"connecting"`

    - `"awaiting_user_action"`

    - `"ready"`

    - `"authorized"`

    - `"succeeded"`

    - `"declined"`

    - `"canceled"`

    - `"expired"`

### Example

```http
curl https://api.linqapp.com/api/partner/v3/payments/$PAYMENT_ID/cancel \
    -X POST \
    -H "Authorization: Bearer $LINQ_API_V3_API_KEY"
```

#### Response

```json
{
  "id": "550e8400-e29b-41d4-a716-446655440000",
  "amount_cents": 2500,
  "approval_url": "approval_url",
  "attach_url": "attach_url",
  "currency": "usd",
  "description": "description",
  "handle": "+14155550123",
  "status": "ready"
}
```
