# Creating a payment widget

## Creating a payment widget

## Create sign up request.

<mark style="color:green;">`POST`</mark> `https://api.ozurapay.com/widget`

Creates a new payment widget, use the widget ID to append to the widget URL.

#### Request Body

| Name                   | Type   | Description                    |
| ---------------------- | ------ | ------------------------------ |
| productName            | string | Name of the product            |
| productPrice           | string | Price in US Dollar             |
| merchantProcessingFees | string | Processing fee in percentage   |
| imageUrl               | string | PNG or JPG URL for the product |

{% tabs %}
{% tab title="200 Login successfully created" %}

```javascript
{
    "data": {
        "productName": "Apple",
        "productPrice": 1,
        "merchantId": "65bxxx25068dd3f931f207a3",
        "merchantProcessingFees": 1,
        "imageUrl": "https://image.com/apple.png",
        "_id": "6699989f80461a95af2101c",
        "__v": 0
    },
    "code": 201,
    "message": "Widget successfully created"
}
```

{% endtab %}

{% tab title="401 Permission denied" %}

{% endtab %}
{% endtabs %}

{% hint style="info" %}
**Good to know:** You can use "\_id" and append it to the widget URL, .i.e. <https://widget.ozurapay.com/?widget=6699989f80461a95af2101c>
{% endhint %}

## Widget payment status
