> ## Documentation Index
> Fetch the complete documentation index at: https://docs.pcxpay.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Payment Confirmation

> How PCX confirms payment completion and how to verify the result on your server

For the Open Banking / GBP bank transfer iFrame flow, payment confirmation is delivered via a server-to-server webhook from PCX to your registered endpoint. This is the authoritative completion signal — not a browser redirect.

***

## Webhook-based confirmation

When the payer authorises the bank transfer in their banking app, PCX receives confirmation and immediately fires a webhook to your registered endpoint.

### Webhook payload

```json theme={null}
{
  "event": "payment.completed",
  "payment_id": "34751905-725f-4e1a-a0e6-998666aabee3",
  "transaction_id": "835de352-cf44-4330-8a90-d835a169e895",
  "status": "completed",
  "amount": 100.0,
  "currency": "GBP",
  "timestamp": "2026-07-01T11:35:00Z"
}
```

### Webhook payload fields

| Field            | Description                                         |
| ---------------- | --------------------------------------------------- |
| `event`          | Event type — `payment.completed`, `payment.failed`  |
| `payment_id`     | PCX payment identifier from the initiation response |
| `transaction_id` | PCX transaction identifier                          |
| `status`         | Payment outcome: `completed` or `failed`            |
| `amount`         | Confirmed payment amount                            |
| `currency`       | Payment currency                                    |
| `timestamp`      | ISO 8601 timestamp of confirmation                  |

For webhook setup, security verification, and retry behaviour, see [Webhooks](/essentials/webhooks).

***

## Confirming payment status via the API

After receiving a webhook, confirm the payment status by querying the PCX API directly from your server:

```bash theme={null}
GET /payments/{payment_id}
```

Or by your own client reference:

```bash theme={null}
GET /payments/client-reference/{client_reference}
```

Always verify server-side before fulfilling an order. The `payment_id` is returned in the payment initiation response.

***

## Why webhooks and not a browser redirect

The iFrame payment flow uses Open Banking, where the payer authorises the payment inside their banking app — outside the browser tab containing the iFrame. There is no browser-level redirect back to a partner URL after completion. PCX confirms the payment via a server-to-server webhook that is delivered independently of the payer's browser session.

<Note>
  Do not attempt to fulfil orders based on the iFrame UI state alone. A webhook `payment.completed` event from PCX is the reliable fulfilment signal.
</Note>
