iyzico button customization

You can use below parameters to customize the iyzico-button and to cover your website requirements.

Please add a selector div and source code before start
<!-- You should add mentioned div to the place where the button will be displayed-->
<div id="iyzico-button"></div>

<!-- script source should be added to the page -->
<script src="https://static.iyzipay.com/plugins/v1/iyzico-buttons.min.js"></script>
Sample Customization
new iyzico.buttons({
  locale: "en_EN",
  selector: "#iyzico-button",
  buttonType: "pay",
  style: {
     color: "black",
     shape: "rect",
     tagline: "logo"
  form: {
    name: "iyzico-refund-form",
    action: "/refund-post",
  onSubmit: function () {
     console.log("iyzico button onSubmit");
  1. Selector
  2. Language
  3. Button Type
  4. Style
  5. Form
  6. Callbacks

1. Selector

It defines the html item that is used for putting iyzico button

Parameter Type Default Value Description
selector String #iyzico-button Selects the related dom element for showing iyzico-button. It can be a class or id. The value should be unique in the page.

2. Language

The texts of a button can be changed with locale parameter

Parameter Type Default Value Description
locale String tr_TR Changes the language of button. Possible values: "tr_TR", "en_EN"

3. Button Type

It defines action type of button. iyzico buttons can be used for 2 purposes. Payments and Refunds. The button type should be specified according to transaction type. This attribute will basically change the text on the buttons.

Parameter Type Default Value Description
buttonType String pay Shows the related text based on the transaction type. Possible values: "pay", "refund"

4. Style

It helps customizing the visualization

Parameter Type Default Value Description
color String blue Changes the background color of button: Values: blue, orange, yellow, black
shape String pill Changes the shape of button: Values: pill, rect
tagline String null Adds the schemes logos or text under the botton. It can only be used when buttonType is pay. Values: text, logo

color parameter's values are shown as below(blue, orange, yellow, black)

Value(color) Type Display
blue String
orange String
yellow String
black String

shape parameter's values are shown as below(pill, rect)

Value(shape) Type Display
pill String
rect String

tagLine parametresinin değerlere göre gösterimi aşağıdadır (text, logo)

Değer(tagLine) Tip Görünüm
text String
logo String

5. Form

Changes the form attributes

Parameter Type Default Value Description
name String iyzico-form Changes the name attribute of the form
action String # Changes the action attribute of the form

6. CallBack

It helps to take additional actions just before submitting the form.

Parameter Type Default Value Description
onSubmit Function null-form If added, the functions under this callBack will work automatically