Migration Guide: Widget v1 → Widget v2
What's Changed
Widget v2 is a simplified, single-page experience. The key differences:
- Single entry URL — No more locale paths (
/en/widgets/kyc). Everything lives at the root. - PostMessage by default — Events are always sent to the parent window. No need to opt-in.
- New scenarios — More control over the user flow.
- New UI controls — Hide buttons you don't need with
continuebuttonandclosebutton. - Legacy
user_uuidrenamed — Nowidentification_id
URL Change
Before (v1)
https://widget.depasify.com/en/widgets/kyc?partner=YOUR_PARTNER_ID&user_uuid=abc123&postmessage=true
After (v2)
https://widget.depa.finance/?partner=YOUR_PARTNER_ID&identification_id=abc123
That's it. The widget handles KYC, payment selection, and transaction processing in a single flow.
PostMessage is Now Always Active
In v1, you had to pass postmessage=true to receive events. In v2, events are always sent to the parent window — no parameter needed.
Events you'll receive:
Payment completed:
{
"type": "isCompleted",
"payload": {
"transactionId": "6b5790de-e603-48ac-a4b9-3249017e688f",
"status": "isCompleted",
"amount": "100",
"currency": "EUR"
}
}Payment failed:
{
"type": "isFailed",
"payload": {
"transactionId": "6b5790de-e603-48ac-a4b9-3249017e688f",
"status": "isFailed",
"amount": "100",
"currency": "EUR",
"refusalCode": "24",
"refusalReason": "Declined"
}
}SEPA transfer submitted:
{
"type": "isAwaiting",
"payload": {
"transactionId": "6b5790de-e603-48ac-a4b9-3249017e688f",
"status": "isAwaiting"
}
}KYC completed (only when scenario=kyc_only):
{
"type": "kycCompleted",
"payload": {
"status": "completed"
}
}Listen for these in your parent page:
window.addEventListener('message', (event) => {
const { type, payload } = event.data
// Handle event
})Parameters
| Parameter | Required | Default | Notes |
|---|---|---|---|
partner | ✅ | — | Your partner identifier |
identification_id | No | — | User's identification. If omitted, a new one is created. Required if user already passed KYC. Legacy user_uuid still accepted |
amount | No | — | Pre-fills and locks the amount field |
currency | No | EUR | Pre-fills and locks currency. Options: EUR, USD, GBP, ETH, USDT, USDC, POL |
scenario | No | — | Controls the flow (see below) |
name | No | — | User's first name |
surname | No | — | User's last name |
email | No | — | User's email |
address | No | — | Billing address |
postal_code | No | — | Billing postal code |
city | No | — | Billing city |
country_code | No | — | Billing country (ISO) |
state | No | — | Billing state |
trx_uuid | No | auto-generated | Your transaction reference |
redirect_url | No | — | Redirect after success |
redirect_failure_url | No | — | Redirect after failure |
lang | No | en | en or es |
mode | No | light | light or dark |
continuebutton | No | true | Set to false to hide the "Finish" button on result screens |
closebutton | No | true | Set to false to hide the close button on failure/3DS screens |
Scenarios
| Scenario | What it does | Required params |
|---|---|---|
| (none) | Full flow: KYC → Payment | — |
kyc_only | KYC only, fires kycCompleted event on success | — |
signin | Skips KYC, shows sign-in directly | — |
reset-password | Password reset flow | — |
direct_card_payment | Skips to card payment form | amount, name, surname, address, postal_code, city, country_code |
direct_bank_payment | Skips to SEPA bank transfer form | amount |
crypto_payment | Skips to crypto payment form | amount, currency |
Removed scenarios from v1:
direct_payment→ usedirect_card_paymentdirect_funding→ use default flow withamountparamfund_without_amount_select→ usedirect_bank_paymentordirect_card_payment
Renamed Parameters
| v1 | v2 | Notes |
|---|---|---|
user_uuid | identification_id | |
postmessage=true | (removed) | Always active now |
New: UI Controls
You can now control what buttons appear on completion/failure screens:
?continuebutton=false → Hides "Finish" button (useful if you rely only on postMessage)
?closebutton=false → Hides close (X) button on failure and 3DS screens
This is useful when you want full control over the user experience from your parent page using postMessage events.
Iframe Setup
<iframe
src="https://widget.depa.finance/?partner=YOUR_PARTNER_ID"
allow="camera; microphone; geolocation; payment"
sandbox="allow-scripts allow-same-origin allow-forms allow-popups allow-popups-to-escape-sandbox"
style="width: 560px; height: 650px; border: none;"
></iframe>Removed Features
- Locale-based URLs (
/en/widgets/...) — replaced by?lang=parameter postmessageparameter — always ondirect_payment/direct_funding/fund_without_amount_selectscenarios — replaced by clearer names
Migration Checklist
- Update your iframe
srcfrom/en/widgets/kyc?...to/?... - Remove
postmessage=truefrom your URL (it's always on now) - Rename
user_uuidtoidentification_id(optional — both work) - Update scenario names if you used
direct_paymentordirect_funding - Add a
messageevent listener if you haven't already — you'll now always receive events - Consider using
continuebutton=falseif you handle flow entirely via postMessage - Test with the sandbox test cards:
- Success:
4000000000002503(Visa) /5200000000002151(MC) - Failure:
4000000000002420(Visa) /5200000000002664(MC)
- Success:
Support
Questions? Contact us at [email protected]

