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

# Migration from WebSDK

> Move from the legacy WebSDK card flow to Payment Element with low operational risk and a stable backend contract.

Use this page when you are replacing a legacy browser card flow.

## What changes

* raw browser tokenization flow -> hosted Payment Element field
* legacy browser-side card orchestration -> `elements.submit(...)`
* custom challenge plumbing -> card authentication handled inside `elements.submit(...)`
* manual retry after an interrupted challenge -> `elements.resume({ transactionId })`
* unstable browser contract -> stable backend `POST /v2/transactions`

## Keep stable during migration

* keep your backend transaction route stable
* keep `external_ref`, transaction ID, and `requestId` persistence unchanged
* keep webhook and reconciliation logic unchanged
* migrate one checkout surface at a time

## Backend contract example

```json theme={null}
{
  "external_ref": "order_2001",
  "amount": 2490,
  "currency": "BRL",
  "method": "credit_card",
  "token": "pgct_token_from_browser"
}
```

## Read next

* [Overview](/frontend/payment-element/overview)
* [Quickstart](/frontend/payment-element/quickstart)
* [Accept a Payment](/frontend/payment-element/accept-a-payment)
