# How to implement 'Pay based on usage' payment method to your product's check out page

## **1. Download DePlan logo to place it on your product's check out page**

{% file src="/files/B0qTuI8YMvcmJovAI23X" %}

{% file src="/files/fRIMtHzeRX8h0RVR10vp" %}

## &#x20;**2. Name a new payment method 'DePlan' or 'Pay based on usage'**&#x20;

Add DePlan logo and add text below:

*Deposit monthly fee into smart-contract escrow.*

*Use the product and control usage.*

*Get refunded at the end of the month depending on usage.*

&#x20;View examples bellow

<div align="left"><figure><img src="/files/Pkppc0Sp2sL5hATMpW42" alt="" width="375"><figcaption></figcaption></figure></div>

<div align="left"><figure><img src="/files/yRxwHW8RpCspACOqzdJl" alt="" width="375"><figcaption></figcaption></figure></div>

<div align="left"><figure><img src="/files/jhni2QeVTFoIAn2W6wvu" alt="" width="375"><figcaption></figcaption></figure></div>

## 3. Go to[ https://product.deplan.xyz](< https://product.deplan.xyz>) and create an account on DePlan Connect. This will be your personal account as a developer.

<div align="left"><figure><img src="/files/32E2OmUcqmLwJw0yEeqM" alt="" width="375"><figcaption><p>Creating an accout on DePlan Connect</p></figcaption></figure></div>

Watch video below how to create account on DePlan Connect

{% file src="/files/ptbGmKP3pwmUetBXYoJQ" %}

## 4. While in your account add your Product

* Create ID of your product (product\_username)
* Add Product Name
* Add Product Logo
* Add website with info about the product
* Provide price per month
* Provide the link to the product itself&#x20;

Make sure you provided the link to the product and website with the product's info&#x20;

<div align="left"><figure><img src="/files/V2WzmNdZnNVHh5qFFG5q" alt="" width="375"><figcaption></figcaption></figure></div>

\
When you’re done press ‘Next’

<div align="left"><figure><img src="/files/HUn8oRa25ywWfVnk6iqC" alt="" width="375"><figcaption><p>Creating a Product on DePlan Connect</p></figcaption></figure></div>

Watch video below how to add you product on DePlan Connect

{% file src="/files/7ESpe6rWBKceeSgpGYVw" %}

## 5. Now your project is on blockchain. It has its own wallet that is connected to your personal developer’s account wallet on blockchain.

<div align="left"><figure><img src="/files/r4aypfW2rdO4sNxXQKwe" alt=""><figcaption><p>Your product on DePlan. Product's wallet and your developer's account wallet</p></figcaption></figure></div>

## 6. Come up with events relevant to your product that will be used to calculate intensity of usage of your product

Examples:&#x20;

* Upload data
* Download data
* Play content
* Save content
* Export file
* Import file
* View content
* Open project
* Create project
* AI request
* Time

or others

7. Provide us with a webhook url that will be called once user confirmes subscription, the endpoint has to accept POST requests with "application/json" content type. It will be passed your custom data and "deplanUserWallet" string in the body
8. When user chooses DePlan as a subscription method, you should navigate them to [https://deplan.app?orgId=\&redirectUrl=\&data=](https://deplan.app/?orgId=\&redirectUrl=\&data=)

   \
   Params

   **orgWallet** - wallet address of your organization from step 6

   **redirectUrl** - where to redirect a user once they have confirmed subscription in DePlan

   **data** - custom key/value pairs data as JSON string, that will be passed to your webhook, e.g. a user id in your system, so that you can identify the user and set their "deplanUserWallet"
9. Now your user is connected with their account in DePlan and you can save events by making a POST request to <https://deplan-560eb4c67350.herokuapp.com/events>

   Request body

   **orgWallet** - wallet address of your organization from step 6

   **userWallet** - deplanUserWallet string

   **typeEvent** - event name string


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.deplan.xyz/how-to-implement-pay-based-on-usage-payment-method-to-your-products-check-out-page.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
