# Create Payment

Create Payment API is responsible for processing the customer's card payments. When this service is used, iyzico provides an instant response regarding the success of the transaction.

* It supports transactions made with TROY, MASTERCARD, VISA, and AMEX branded cards.&#x20;
* For cards participating in installment programs such as BONUS, WORLD, MAXIMUM, AXESS, CARDFINANS, PARAF, and ADVANTAGE, the service allows options for 2, 3, 6, 9, and 12 installments.
* Successful transactions are displayed in green, while failed transactions are displayed in red on the panel.&#x20;
* The merchant can utilize the conversationId and basketId parameters as order numbers on their side.

By incorporating these features, you can provide a seamless payment experience for your customers, with real-time feedback on the success or failure of their transactions.

## Create Non3D Payment

> Initiates a payment without 3D Secure.

```json
{"openapi":"3.0.3","info":{"title":"NON3D","version":"1.0.0"},"servers":[{"url":"https://api.iyzipay.com","description":"iyzico API"}],"paths":{"/payment/auth":{"post":{"summary":"Create Non3D Payment","description":"Initiates a payment without 3D Secure.","tags":["Non3D Payment"],"parameters":[{"$ref":"#/components/parameters/AuthHeader"},{"$ref":"#/components/parameters/ContentTypeHeader"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["paidPrice","price","currency","paymentCard","buyer","shippingAddress","billingAddress","basketItems"],"properties":{"conversationId":{"type":"string","description":"Unique ID used to match request/response."},"locale":{"type":"string","description":"Language code. Allowed values; tr, en. Default; tr","enum":["tr","en"]},"paidPrice":{"type":"decimal","description":"Total amount to be charged from the buyer."},"price":{"type":"decimal","description":"Basket total amount."},"paymentGroup":{"type":"string","description":"Payment group. Default; PRODUCT.","enum":["PRODUCT","LISTING","SUBSCRIPTION"]},"currency":{"type":"string","description":"Currency. Default; TRY.","enum":["TRY","USD","EUR","GBP","NOK","CHF"]},"installment":{"type":"integer","description":"Installment count. If omitted, single payment (1) is applied.","enum":[1,2,3,6,9,12]},"basketId":{"type":"string","description":"Basket ID."},"paymentChannel":{"type":"string","description":"Payment channel.","enum":["WEB","MOBILE","MOBILE_WEB","MOBILE_IOS","MOBILE_ANDROID","MOBILE_WINDOWS","MOBILE_TABLET","MOBILE_PHONE"]},"paymentCard":{"description":"Card information.","$ref":"#/components/schemas/PaymentCard"},"buyer":{"description":"Buyer information.","$ref":"#/components/schemas/Buyer"},"shippingAddress":{"description":"Shipping address. Required if at least one of the basket items has itemType \"PHYSICAL\". Not required if all items are \"VIRTUAL\".","$ref":"#/components/schemas/Address"},"billingAddress":{"description":"Billing address.","$ref":"#/components/schemas/Address"},"basketItems":{"type":"array","description":"Items in the basket.","items":{"$ref":"#/components/schemas/BasketItem"}}}}}}},"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PaymentResponse"}}}},"400":{"description":"Invalid request / validation error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}}}},"components":{"parameters":{"AuthHeader":{"name":"Authorization","in":"header","required":true,"description":"Authorization header starting with IYZWSv2 and a signed hash value encoded in base64.","schema":{"type":"string"}},"ContentTypeHeader":{"name":"Content-Type","in":"header","required":true,"description":"Content-Type value.","schema":{"type":"string"}}},"schemas":{"PaymentCard":{"type":"object","required":["cardHolderName","cardNumber","expireYear","expireMonth","cvc"],"properties":{"cardHolderName":{"type":"string","description":"Cardholder full name."},"cardNumber":{"type":"string","description":"Card number."},"expireYear":{"type":"string","description":"Expiry year (YYYY format)."},"expireMonth":{"type":"string","description":"Expiry month (MM format)."},"cvc":{"type":"string","description":"CVC code."},"registerCard":{"type":"integer","description":"Save the card? (0 = no, 1 = yes)"}}},"Buyer":{"type":"object","required":["id","name","surname","identityNumber","email","gsmNumber","registrationAddress","city","country"],"properties":{"id":{"type":"string","description":"Customer ID."},"name":{"type":"string","description":"First name."},"surname":{"type":"string","description":"Last name."},"identityNumber":{"type":"string","description":"National ID number (TR)."},"email":{"type":"string","description":"Email."},"gsmNumber":{"type":"string","description":"Phone number."},"registrationDate":{"type":"string","description":"Registration date (yyyy-MM-dd HH:mm:ss)."},"lastLoginDate":{"type":"string","description":"Last login date (yyyy-MM-dd HH:mm:ss)."},"registrationAddress":{"type":"string","description":"Address."},"city":{"type":"string","description":"City."},"country":{"type":"string","description":"Country."},"zipCode":{"type":"string","description":"Postal code."},"ip":{"type":"string","description":"IP address."}}},"Address":{"type":"object","required":["address","contactName","city","country"],"properties":{"address":{"type":"string","description":"Full address."},"zipCode":{"type":"string","description":"Postal code."},"contactName":{"type":"string","description":"Contact person."},"city":{"type":"string","description":"City."},"country":{"type":"string","description":"Country."}}},"BasketItem":{"type":"object","required":["id","price","name","category1","itemType"],"properties":{"id":{"type":"string","description":"Product ID."},"price":{"type":"decimal","description":"Product price."},"name":{"type":"string","description":"Product name."},"category1":{"type":"string","description":"Primary category."},"category2":{"type":"string","description":"Secondary category (optional)."},"itemType":{"type":"string","description":"Item type.","enum":["PHYSICAL","VIRTUAL"]},"subMerchantKey":{"type":"string","description":"Sub-merchant key for the service provider. Not sent in the standard business model. Required only for marketplace model."},"subMerchantPrice":{"type":"string","description":"Amount to be transferred to the sub-merchant. Not sent in the standard business model. Required only for marketplace model."}}},"PaymentResponse":{"type":"object","properties":{"status":{"type":"string","description":"Indicates the result of the request.","enum":["success","failure"]},"locale":{"type":"string","description":"Response language (tr/en)."},"systemTime":{"type":"integer","description":"Operation time (epoch ms)."},"conversationId":{"type":"string","description":"ID matching the request."},"price":{"type":"decimal","description":"Basket total amount."},"paidPrice":{"type":"decimal","description":"Total collected amount."},"installment":{"type":"integer","description":"Installment count."},"paymentId":{"type":"string","description":"Payment ID."},"fraudStatus":{"type":"integer","description":"Payment status per fraud filters. If the risk score is low, the payment is approved instantly; if high, the payment is declined. The merchant should ship products only for transactions with value 1; for 0, the merchant should wait for notification.\n - 1: Approved\n - 0: Under review\n - -1: Declined\n","enum":[0,-1,1]},"merchantCommissionRate":{"type":"decimal","description":"Merchant's applied installment/commission rate. For example, if price=100 and paidPrice=110, the merchant rate is 10%. Informational."},"merchantCommissionRateAmount":{"type":"decimal","description":"Merchant's commission amount. For example, if price=100 and paidPrice=110, the commission amount is 10. Informational."},"iyziCommissionRateAmount":{"type":"decimal","description":"iyzico transaction commission amount."},"iyziCommissionFee":{"type":"decimal","description":"iyzico transaction fee."},"cardType":{"type":"string","description":"Card type.","enum":["CREDIT_CARD","DEBIT_CARD","PREPAID_CARD"]},"cardAssociation":{"type":"string","description":"Card association.","enum":["VISA","MASTER_CARD","AMERICAN_EXPRESS","TROY"]},"cardFamily":{"type":"string","description":"Card family.","enum":["Bonus","Axess","World","Maximum","Paraf","CardFinans"]},"binNumber":{"type":"string","description":"BIN (first 8 digits)."},"lastFourDigits":{"type":"string","description":"Last 4 digits of the card."},"basketId":{"type":"string","description":"Basket ID."},"currency":{"type":"string","description":"Currency.","enum":["TRY","USD","EUR","NOK","CHF","GBP"]},"itemTransactions":{"type":"array","description":"Payment line items for basket entries.","items":{"type":"object","properties":{"paymentTransactionId":{"type":"string","description":"ID of the payment breakdown. Must be stored by the merchant. Used for refund/approve/disapprove operations and communication with iyzico. Preferably stored in relation with itemId."},"itemId":{"type":"string","description":"ID of the item in the basket provided by the merchant."},"price":{"type":"decimal","description":"Amount of the item in the merchant's basket."},"paidPrice":{"type":"decimal","description":"Distributed collected amount per breakdown. Must be stored by the merchant."},"transactionStatus":{"type":"integer","description":"Status of the payment breakdown.\n- 0: In fraud control\n- -1: Declined after fraud control\n- 1: Approved (Marketplace: Waiting for Merchant Approval)\n- 2: Approved (Marketplace Approval Given)\n","enum":[0,-1,1,2]},"blockageRate":{"type":"decimal","description":"Merchant blockage rate per breakdown."},"blockageRateAmountMerchant":{"type":"decimal","description":"Portion of the blockage amount reflected to the merchant."},"blockageRateAmountsubMerchant":{"type":"decimal","description":"Sub-merchant blockage amount per breakdown."},"blockageResolvedDate":{"type":"string","description":"Blockage release date per transaction. Format yyyy-MM-dd HH:mm:ss, e.g. 2015-10-19 14:36:52."},"iyziCommissionFee":{"type":"decimal","description":"iyzico transaction fee distributed per breakdown."},"iyziCommissionRateAmount":{"type":"decimal","description":"iyzico commission amount distributed per breakdown."},"merchantCommissionRate":{"type":"decimal","description":"Merchant commission rate distributed per breakdown."},"merchantCommissionRateAmount":{"type":"decimal","description":"Merchant commission amount distributed per breakdown."},"merchantPayoutAmount":{"type":"decimal","description":"Amount to be sent to the merchant after fees, commissions and blockages are deducted for this breakdown."},"subMerchantPrice":{"type":"decimal","description":"Sub-merchant entitlement."},"subMerchantPayoutRate":{"type":"string","description":"Rate of the amount to be sent to the sub-merchant."},"subMerchantPayoutAmount":{"type":"decimal","description":"Amount to be transferred to the sub-merchant."},"convertedPayout":{"type":"object","description":"Post-conversion calculations per breakdown.","properties":{"paidPrice":{"type":"decimal","description":"Distributed collected amount per breakdown. Must be stored by the merchant."},"iyziCommissionFee":{"type":"decimal","description":"iyzico transaction fee distributed per breakdown."},"iyziCommissionRateAmount":{"type":"decimal","description":"iyzico commission amount distributed per breakdown."},"blockageRateAmountMerchant":{"type":"decimal","description":"Portion of blockage amount reflected to the merchant."},"blockageRateAmountSubMerchant":{"type":"string"},"subMerchantPayoutAmount":{"type":"string"},"merchantPayoutAmount":{"type":"decimal","description":"Amount to be sent to the merchant after fees, commissions and blockages are deducted for this breakdown."},"iyziConversationRate":{"type":"decimal","description":"Exchange rate."},"iyziConversationRateAmount":{"type":"decimal","description":"Amount after applying the exchange rate."}}}}}},"authCode":{"type":"string","description":"Auth code returned by the bank."},"phase":{"type":"string","description":"Payment phase."},"hostReference":{"type":"string","description":"Host reference value given by the bank for the payment."},"signature":{"type":"string","description":"Signature value that can be used for signature verification."}}},"ErrorResponse":{"type":"object","properties":{"status":{"type":"string","description":"Success/failure info."},"errorCode":{"type":"string","description":"Error code."},"errorMessage":{"type":"string","description":"Error message."},"errorGroup":{"type":"string","description":"Error group."},"locale":{"type":"string","description":"Language code."},"systemTime":{"type":"integer","description":"System time."},"conversationId":{"type":"string","description":"Request/response matching ID."}}}}}}
```

#### Sample Codes

<table data-view="cards"><thead><tr><th></th></tr></thead><tbody><tr><td><a href="https://github.com/iyzico/iyzipay-php/blob/master/samples/create_payment.php">PHP</a></td></tr><tr><td><a href="https://github.com/iyzico/iyzipay-java/blob/master/src/test/java/com/iyzipay/sample/PaymentSample.java#L31">Java</a></td></tr><tr><td><a href="https://github.com/iyzico/iyzipay-dotnet/blob/master/Iyzipay.Samples/PaymentSample.cs#L12">.Net</a></td></tr><tr><td><a href="https://github.com/iyzico/iyzipay-node/blob/master/samples/IyzipaySamples.js#L479">Node.Js</a></td></tr><tr><td><a href="https://github.com/iyzico/iyzipay-python/blob/master/samples/create_payment.py">Python</a></td></tr><tr><td><a href="https://www.postman.com/iyzico/iyzico/request/xs07eti/2-1-create-non3d-payment?sideView=agentMode">Postman</a></td></tr></tbody></table>

Lastly analyzing following headlines, you can effectively handle and respond to the outcome of the payment inquiry, ensuring a smooth and reliable payment process for your customers.

* The `status` parameter provides information about the status of the transaction. `success` indicates that the transaction has been successfully completed and the payment has been processed. `failure` indicates that the transaction has failed, and an error message related to the failure reason is provided.
* The `paymentStatus` parameter is null for this service.
* The `paymentId` and `paymentTransactionId` values should be stored for future reference and tracking.
* In the event of a failed transaction (`failure` status), the `errorCode`, `errorMessage`, and `errorGroup` parameters will be returned with corresponding values, providing details about the error.


---

# 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.iyzico.com/en/payment-methods/api/non-3ds/non-3ds-implementation/create-payment.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.
