Widget Integration

How to integrate our widget in your platform

Depa Widget Integration Guide

Overview

The Depa widget provides a seamless, customizable interface for integrating KYC (Know Your Customer) processes and fiat-to-crypto gateway functionality into your platform. This solution enables your clients to verify their identity and conduct secure cryptocurrency transactions via card, SEPA bank transfer, or crypto wallet.


User Journey

  1. Identity Verification — Submit personal information (name, ID proof, selfie) and complete AML checks
  2. Payment Method Selection — Choose between card, SEPA bank transfer, or crypto wallet
  3. Transaction Completion — Process payment and optionally redirect to your system via redirect_url

Integration Process

Prerequisites

  • Create a client account on Depa — See our Getting Started Guide
  • Once registered Depa provides your Partner ID and relevant configuration details

Widget Implementation

Add the following iframe to your platform:

<iframe
  src="https://widget.depa.finance/emb?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>

Available Scenarios Parameters

The scenario parameter allows you to define the specific entry point and workflow a user encounters when the widget loads. By customizing this value in the widget URL, you can edit the user journey, whether that means bypassing KYC verification for returning users or launching directly into a specific payment method. The table below outlines the available scenarios , the additional parameters required for each, and the resulting behavior of the widget flow.

ScenarioRequired ParametersDescription
(default)Full flow: Includes both KYC verification and payment method selection.
kyc_onlyKYC verification only: Skips the payment step. Triggers a kycCompleted postMessage upon success.
signinDirect Sign-in: Opens the login form immediately and skips the KYC process.
reset-passwordPassword Reset: Opens the reset form (intended for use via email recovery links).
direct_card_paymentamount, name, surname, address, postal_code, city, country_codePre-selected Card: Starts at the payment step with Card already selected.
direct_bank_paymentamountPre-selected Bank Transfer: Starts at the payment step with SEPA Bank Transfer already selected.
crypto_paymentamount, currencyPre-selected Crypto: Starts at the payment step with Crypto already selected.

URL Parameters

Customizing the widget experience is handled through URL parameters. These parameters allow you to pre-fill user information, lock specific transaction values, and control the visual theme or language of the interface. While most fields are optional to allow for maximum flexibility.

ParameterRequiredDescription
partnerYesYour unique partner identifier (provided during registration)
currencyNoTransaction currency. If provided, the selector is disabled. Available: EUR, USD, GBP, ETH, USDT, USDC, POL. Default: EUR
scenarioNoSets the workflow configuration — see Scenarios
emailNoPre-fills the user's email
stateNoBilling state
trx_uuidNoCustom transaction identifier. Auto-generated if omitted
redirect_urlNoURL to redirect to after a successful transaction or KYC completion
redirect_failure_urlNoURL to redirect to after a failed transaction
modeNoColor mode: light or dark. Default: light
langNoLanguage: en (English) or es (Spanish).
Default: Browser language or en
continuebuttonNoSet to false to hide the "Finish" button on completion screens
closebuttonNoSet to false to hide the close button on the failure dialog and 3-D Secure iframe
identification_idNo*

UUIDv4 for user identification and session management. If omitted, the backend creates a new identification automatically.


(*Required if the user has already completed KYC — omitting it will start a new identification flow from scratch.) Legacy alias user_uuid is also accepted

amountNo*Transaction amount. If provided, the field becomes read-only (*required for direct_card_payment and direct_bank_payment scenarios)
nameNo*User's first name (*required for direct_card_payment)
surnameNo*User's last name (*required for direct_card_payment)
addressNo*Billing address (*required for direct_card_payment)
postal_codeNo*Billing postal code (*required for direct_card_payment)
cityNo*Billing city (*required for direct_card_payment)
country_codeNo*Billing country ISO code (*required for direct_card_payment)


Post Message Structure

All messages are sent from the widget to window.parent via postMessage.

The widget broadcasts real-time updates towindow.parent using the browser's postMessage. Each event follows a consistent JSON format, providing a type to identify the specific action and a detailed payload containing relevant transaction data.

Payment succeeded:

{
  "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 is awaiting processing:

{
  "type": "isAwaiting",
  "payload": {
    "transactionId": "6b5790de-e603-48ac-a4b9-3249017e688f",
    "status": "isAwaiting"
  }
}

KYC-only flow completed (only fired whenscenario=kyc_only):

{
  "type": "kycCompleted",
  "payload": {
    "status": "completed"
  }
}

Final Configuration

  • Provide your redirect_url to Depa for post-transaction redirects, or pass it as a URL parameter
  • Optionally provide a redirect_failure_url for failed transactions
  • Test the integration in your development environment


Testing

Test card numbers and sandbox credentials are environment-specific and provided by the Depa team during onboarding. Contact [email protected] to receive test credentials for your integration environment.


Testing Card

Test Card ScenarioCard Number
SuccessfulVisa: 4000000000002503
Mastercard: 5200000000002151
FailedVisa: 4000000000002420
Mastercard: 5200000000002664

Support

For technical support or custom implementations, contact our team at [email protected]