> For the complete documentation index, see [llms.txt](https://docs.payengine.co/developer-docs-v2.5/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.payengine.co/developer-docs-v2.5/getting-started-1/9.-available-web-components.md).

# 9. Available Web-Components

Web components provide a user-friendly solution for partners looking to implement a streamlined and interactive payment system. Its ease of inclusion and integration make it simple to set up and customize, providing a seamless user experience from onboarding to transaction and batch processing, to eventual payouts.

{% hint style="warning" %}
**Note:** Refer to [this doc](/developer-docs-v2.5/getting-started-1/securing-embedded-uis-merchant-session.md) for guidance on implementing embedded web components. Platform now uses **MerchantSession** to enable embedded web components.

If you're currently using HMAC-based security, please note that it has been deprecated and will continue to be supported for backward compatibility. However, we strongly recommend migrating to **MerchantSession** for improved security and future support.
{% endhint %}

### 1. Onboarding

```javascript
<payment-platform
    id="elementID"
    merchant_id="<Merchant ID>"
    type="boarding">
</payment-platform>
```

### 2. Transactions

```javascript
<payment-platform
    id="elementID"
    merchant_id="<Merchant ID>"
    type="transactions">
</payment-platform>
```

To enable the print option in the transaction widget, set the "print\_receipt" attribute to true in the transaction web-component as shown below:

```javascript
<payment-platform
    id="elementID"
    merchant_id="<Merchant ID>"
    print_receipt="true"
    type="transactions">
</payment-platform>
```

### 3. Batch Settlements

```javascript
<payment-platform
    id="elementID"
    merchant_id="<Merchant ID>"
    type="payouts"
    view_type="settlement">
</payment-platform>
```

### 4. Payouts (Funding)&#x20;

```javascript
<payment-platform
    id="elementID"
    merchant_id="<Merchant ID>"
    type="payouts"
    view_type="funding">
</payment-platform>
```

### 5. Credit Card Form

{% tabs %}
{% tab title="Credit Card Form" %}

```javascript
<payment-platform
    id="elementID"
    merchant_id="<Merchant ID>"
    type="creditcardform"
    show_zip="true" >
</payment-platform>
```

{% endtab %}

{% tab title="Credit Card Form - Zip Code Properties" %}

```javascript
<payment-platform
    id="elementID"
    merchant_id="<Merchant ID>"
    type="creditcardform"
    show_zip="true" 
    allowed_countries="UK, JP, AU"
    validate_zip="true">
</payment-platform>
```

{% endtab %}

{% tab title="Example" %}

```html
<!DOCTYPE html>
<html lang="en">
  <head>
    <meta charset="utf-8" />
    <meta name="viewport" content="width=device-width, initial-scale=1" />
    <title>Platform Test</title>

    <script src="http://<Platform_HOST>/js/1.0.0/embed.js?key=<Public API Key>"></script>
    <style>
      #btn {
        width: 100%;
        color: #fff;
        background-color: #409eff;
        display: block;
        line-height: 1;
        white-space: nowrap;
        cursor: pointer;
        border: 1px solid #409eff;
        -webkit-appearance: none;
        text-align: center;
        box-sizing: border-box;
        outline: none;
        margin: 0;
        transition: .1s;
        font-weight: 500;
        padding: 12px 20px;
        font-size: 14px;
        border-radius: 4px;
      }
    </style>
  </head>

  <body style="overflow: auto !important">
    <payment-platform style="width: 500px;" id="pf-cc" 
      type="creditcardform" 
      show_zip="true" 
      merchant_id="<Merchant ID>" 
      hash="<HMAC>">
    </payment-platform>
    <button id="btn">Submit</button>
    <h4>Result</h4>
    <div id="result"></div>
    <script>
      document.getElementById('btn').addEventListener('click', function() {
        document.getElementById("pf-cc").submit();
      })
      document.getElementById("pf-cc")?.addEventListener("success", function (e) {
        console.log(e.detail);
        document.getElementById("result").innerHTML = JSON.stringify(e.detail);
      });
      document.getElementById("pf-cc")?.addEventListener("error", function (e) {
        console.log(e.detail);
        document.getElementById("result").innerHTML = JSON.stringify(e.detail);
      });
    </script>
  </body>
</html>
```

{% endtab %}
{% endtabs %}

You can customize the **allowed countries** and **ZIP code validation** behavior in the credit card form web-component using the following properties:

#### `allowed_countries` (optional)

* Defines which countries are allowed for the zip code in the form.
* If not specified, the default is **US** and **CA**.
* Provide a comma-separated list of country codes (case-insensitive), for example: `"JP, AU"`
* To allow **all supported countries**, use: `allowed_countries="INTL"`

#### `validate_zip` (optional)

* Accepts `true` or `false`. Default is `true`.
* When `true`, the form will validate ZIP/postal codes for the allowed countries.
* When `false`, ZIP validation will be skipped for all allowed countries.

{% hint style="info" %}
Supported countries for zip code

`UK`, `JE`, `GG`, `IM`, `US`, `CA`, `IE`, `DE`, `JP`, `FR`, `AU`, `IT`, `CH`, `AT`, `ES`, `NL`, `BE`, `DK`, `SE`, `NO`, `BR`, `PT`, `FI`, `AX`, `KR`, `CN`, `TW`, `SG`, `DZ`, `AD`, `AR`, `AM`, `AZ`, `BH`, `BD`, `BB`, `BY`, `BM`, `BA`, `IO`, `BN`, `BG`, `KH`, `CV`, `CL`, `CR`, `HR`, `CY`, `CZ`, `DO`, `EC`, `EG`, `EE`, `FO`, `GE`, `GR`, `GL`, `GT`, `HT`, `HN`, `HU`, `IS`, `IN`, `ID`, `IL`, `JO`, `KZ`, `KE`, `KW`, `LA`, `LV`, `LB`, `LI`, `LT`, `LU`, `MK`, `MY`, `MV`, `MT`, `MU`, `MX`, `MD`, `MC`, `MA`, `NP`, `NZ`, `NI`, `NG`, `OM`, `PK`, `PY`, `PH`, `PL`, `PR`, `RO`, `RU`, `SM`, `SA`, `SN`, `SK`, `SI`, `ZA`, `LK`, `TJ`, `TH`, `TN`, `TR`, `TM`, `UA`, `UY`, `UZ`, `VA`, `VE`, `ZM`, `AS`, `CC`, `CK`, `RS`, `ME`, `CS`, `YU`, `CX`, `ET`, `FK`, `NF`, `FM`, `GF`, `GN`, `GP`, `GS`, `GU`, `GW`, `HM`, `IQ`, `KG`, `LR`, `LS`, `MG`, `MH`, `MN`, `MP`, `MQ`, `NC`, `NE`, `VI`, `PF`, `PG`, `PM`, `PN`, `PW`, `RE`, `SH`, `SJ`, `SO`, `SZ`, `TC`, `WF`, `XK`, `YT`, `INTL`
{% endhint %}

{% hint style="warning" %}
**Visa 3D Secure Mandate**

Partners must collect cardholder's mobile number OR email address during payment processing. For this purpose, set show\_email = "true" and/or show\_phone\_number = "true"
{% endhint %}

### 6. ACH Form

{% tabs %}
{% tab title="ACH Form" %}

```javascript
<payment-platform
    id="elementID"
    merchant_id="<Merchant ID>"
    type="bankaccountform"> 
</payment-platform>
```

{% endtab %}

{% tab title="ACH Form - Optional Business Bank Account Name" %}

```javascript
<payment-platform
    id="elementID"
    merchant_id="<Merchant ID>"
    type="bankaccountform"
    show_business_name="true"> //optional field
</payment-platform>
```

{% endtab %}

{% tab title="Example" %}

```html
<!DOCTYPE html>
<html lang="en">
  <head>
    <meta charset="utf-8" />
    <meta name="viewport" content="width=device-width, initial-scale=1" />
    <title>Platform Test</title>

    <script src="http://<Platform_HOST>/js/1.0.0/embed.js?key=<Public API Key>"></script>
    <style>
      #btn {
        width: 100%;
        color: #fff;
        background-color: #409eff;
        display: block;
        line-height: 1;
        white-space: nowrap;
        cursor: pointer;
        border: 1px solid #409eff;
        text-align: center;
        box-sizing: border-box;
        outline: none;
        margin: 0;
        transition: .1s;
        font-weight: 500;
        padding: 12px 20px;
        font-size: 14px;
        border-radius: 4px;
      }
    </style>
  </head>

  <body style="overflow: auto !important">
    <payment-platform style="width: 500px;" 
      id="pf-ach" 
      type="bankaccountform" 
      merchant_id="<Merchant ID>" 
      hash="<HAMC>">
    </payment-platform>
    <button id="btn">Submit</button>
    <h4>Result</h4>
    <div id="result"></div>
    <script>
      document.getElementById('btn').addEventListener('click', function() {
        document.getElementById("pf-ach").submit();
      })
      document.getElementById("pf-ach")?.addEventListener("success", function (e) {
        console.log(e.detail);
        document.getElementById("result").innerHTML = JSON.stringify(e.detail);
      });
      document.getElementById("pf-ach")?.addEventListener("error", function (e) {
        console.log(e.detail);
        document.getElementById("result").innerHTML = JSON.stringify(e.detail);
      });
    </script>
  </body>
</html>

```

{% endtab %}
{% endtabs %}

If your use case supports both personal and business bank accounts, you can include the optional `show_business_name` property in the ACH web-component. When enabled, the form will display a **Business Name** input field. This field should be completed by the user when they are entering a business bank account.

### 7. Device Management

```javascript
<payment-platform
    id="elementID"
    merchant_id="<Merchant ID>"
    type="devices">
</payment-platform>
```

### 8. Dispute Management (Contact support to enable)

```javascript
<payment-platform
    id="elementID"
    merchant_id="<Merchant ID>"
    type="disputes">
</payment-platform>
```

### 9. Plaid Connect (Plaid Account Required)

```javascript
<payment-platform
    id="elementID"
    merchant_id="<Merchant ID>"
    type="plaidconnect">
</payment-platform>
```

### 10. Dashboard (Merchant's GMV)

```javascript
<payment-platform
    id="elementID"
    merchant_id="<Merchant ID>"
    type="dashboard">
</payment-platform>
```

### 11. Virtual Terminal

{% tabs %}
{% tab title="Virtual Terminal" %}

```javascript
<payment-platform
    id="elementID"
    merchant_id="<Merchant ID>"
    type="merchant-terminal">
</payment-platform>
```

{% endtab %}

{% tab title="Virtual Terminal with Zip Code Validation" %}

```javascript
<payment-platform
    id="elementID"
    merchant-id="<Merchant ID>"
    type="merchant-terminal"
    show-zip="true"> //optional field
</payment-platform>
```

{% endtab %}
{% endtabs %}

#### `show-zip` (optional)

* Accepts `true` or `false`. Default is `false`.
* When set to `true`, the form will display a mandatory ZIP/postal code field and apply validation based on the entered ZIP/postal code.

### 12. Merchant Statements

```javascript
<payment-platform
    id="elementID"
    merchant_id="<Merchant ID>"
    type="statements">
</payment-platform>
```

### 13. Merchant Reports

```javascript
<payment-platform
    id="elementID"
    merchant_id="<Merchant ID>"
    type="merchant-reports">
</payment-platform>
```

### &#x20; 14. Payment Session and Links

#### a. **Payment Session**

Use the following web-component to embed a customer-facing payment session on your page:

```javascript
<payment-platform
    id="elementID"
    payment-link-id="<Payment Link ID>"
    shouldProcess3ds="true" // Optional. Default is false
    onTransactionEvent="<custom callback function>"
    type="payment-session">
</payment-platform>
```

Note: Refer to the `onTransactionEvent` [documentation](https://docs.payengine.co/api-reference/ui-styleguide-specs/accounting-web-component/payment-link-web-component) for details and usage examples of the callback function.

#### b. Payment Link

To embed the payment link, use the following web-component:

```javascript
<payment-platform
    id="elementID"
    payment-link-id="<Payment Link ID>"
    shouldProcess3ds="true" // Optional. Default is false
    type="payment-link">
</payment-platform>
```

{% hint style="warning" %}
**Difference between Payment Link and Payment Session**

**Payment Session**: If your use case involves displaying a secure form to collect payment information within a modal and showing the transaction status in the same modal through a callback mechanism, then use Payment Session.

**Payment Link**: If your use case requires presenting a payment link that captures additional details—such as contact information—along with payment details, and you prefer to display the link in a flexible manner (not necessarily in a modal), then use Payment Link.
{% endhint %}

#### c.  Creating and Managing Payment Links

To embed the interface for creating and managing payment links, use the following web-component:

```javascript
<payment-platform
    id="elementID"
    merchant-id="<Merchant ID>"
    type="payment-link-create">
</payment-platform>
```

### &#x20; 15. Payment page

```javascript
<payment-platform
    id="elementID"
    merchant_id="<Merchant ID>"
    type="payment-hosted-page">
</payment-platform>
```

### 16. Recurring Payments

```javascript
<payment-platform
    id="elementID"
    merchant_id="<Merchant ID>"
    type="merchant-recurring-payment">
</payment-platform>
```

### 17. Gateway Connection&#x20;

<pre class="language-javascript"><code class="lang-javascript"><strong>&#x3C;payment-platform
</strong>    id="elementID"
    merchant_id="&#x3C;Merchant ID>"
    type="gateway-connect"
    gateway_id="&#x3C;GATEWAY-ID>">
&#x3C;/payment-platform>
</code></pre>

Please see [Gateway Orchestration](https://docs.paymentplatform.dev/payengine-api-v2.5/transactions/gateway-orchestration) for more details
