Ödeme Formu Oluşturma

Ödeme Formunuzu kolayca oluşturabilirsiniz.

Ödeme Formu Başlatma

Ödeme Oluşturma

POST https://api.weepay.co/Payment/PaymentCreate

Ödeme servisi için gerekli parametreler.

Path Parameters

NameTypeDescription

Auth

array

Auth array altında bayiId, apiKey ve secretKey gönderilir.

bayiId

integer

weepay tarafından verilerin bayi id.

apiKey

string

weepay tarafından apiKey.

secretKey

string

weepay tarafından verilen secretKey

Request Body

NameTypeDescription

Data

string

Data array altında gönderilecek parametreler

orderId

string

Üye iş yeri sipariş id.

ipAddress

string

Alıcıya ait ip adresi.

locale

string

Geri dönüş dili

paidPrice

number

Ödeme tutarı (Kuruş kısmı nokta ile yazılır. Örn: 35.50)

currency

string

Para birimi TL, USD, EUR, GBP

callBackUrl

string

İşlemin sonucunun dönüleceği URL adresiniz.

description

string

Sipariş açıklaması

Customer

array

Customer array altında gönderilecek parametreler

customerId

string

Üye işyeri tarafındaki alıcıya ait id.

customerName

string

Üye işyeri tarafındaki alıcıya ait isim bilgisi.

customerSurname

string

Üye işyeri tarafındaki alıcıya ait soyisim bilgisi.

gsmNumber

number

Üye işyeri tarafındaki alıcıya ait gsm bilgisi.

email

string

Üye işyeri tarafındaki alıcıya ait email bilgisi.

identityNumber

number

Üye işyeri tarafındaki alıcıya ait TCKN.

city

string

Üye işyeri tarafındaki alıcıya ait şehir bilgisi.

country

string

Üye işyeri tarafındaki alıcıya ait ülke bilgisi.

BillingAddress

string

BillingAddress array altında gönderilecek parametreler

contactName

string

Üye işyeri tarafındaki fatura adresi ad soyad bilgisi.

address

string

Üye işyeri tarafındaki fatura adresi adres bilgisi.

city

string

Üye işyeri tarafındaki fatura adresi şehir bilgisi.

country

string

Üye işyeri tarafındaki fatura adresi ülke bilgisi.

district

string

Üye işyeri tarafındaki fatura adresi bölge bilgisi.

zipCode

number

Üye işyeri tarafındaki fatura adresi posta kodu.

ShippingAddress

string

SippingAddres array'i altında gönderilecek bilgiler

contactName

string

Üye işyeri tarafındaki teslimat adresi, ad, soyad bilgisi. Sepetteki ürünlerden en az 1 tanesi fiziksel ürün (itemType=PHYSICAL) ise zorunludur.

address

string

Üye işyeri tarafındaki teslimat adresi. Sepetteki ürünlerden en az 1 tanesi fiziksel ürün (itemType=PHYSICAL) ise zorunludur.

city

string

Üye işyeri tarafındaki teslimat adresi şehir bilgisi. Sepetteki ürünlerden en az 1 tanesi fiziksel ürün (itemType=PHYSICAL) ise zorunludur.

country

string

Üye işyeri tarafındaki teslimat adresi ülke bilgisi. Sepetteki ürünlerden en az 1 tanesi fiziksel ürün (itemType=PHYSICAL) ise zorunludur.

district

number

Üye işyeri tarafındaki fatura adresi bölge bilgisi.

zipCode

string

Üye işyeri tarafındaki teslimat adresi posta kodu.

Products

string

Products array altında gönderilecek parametreler

productId

string

Üye işyeri tarafındaki ürüne ait id.

name

string

Üye işyeri tarafındaki ürüne ait isim bilgisi.

productPrice

number

Üye işyeri tarafındaki ürünlere ait tutar.tutarlar toplamı paidPrice alanına eşit olmalıdır.

itemType

string

Üye işyeri tarafındaki ürüne ait tip. Geçerli enum değerler: PHYSICAL ve VIRTUAL.

API servisi istek örnek kodlar

// Request JSON example;
{
"Auth": {
		"bayiId":"22",
		"apiKey": "XXXXXXXXX",
		"secretKey": "XXXXXXXXXXXXXXXX"
		},
"Data":{
 "orderId":1,
 "currency":"TL", 
 "locale":"tr",
 "paidPrice":"0.16", 
 "ipAddress":"192.168.1.1", 
 "installmentNumber":1, // Uygulanacak Taksit Sayısı
 "description":"Açıkalama", // Açıklama
 "callBackUrl":"http://Sitem.com/callBack"// Response URL
},
"Customer":{
	"customerId":"1", // alıcı müşteri Id 
	"customerName":"isim", //alıcı ismi 
	"customerSurname":"soyisim", // alıcı Soyismi
	"gsmNumber":"50XXXXXXX",// alıcı cep telefonu
	"email":"hello@weepay.co", // alıcı mail
	"identityNumber":"112312312313132", // alıcı TC kimlik numarası
	 "city":"istanbul",// alıcı  şehir
	 "country":"Turkey" // alıcı ülke
},
 "BillingAddress": {
		"contactName":"isim soyisim",
		"address":"Abdurrahman Nafiz Gürman,Mh, G. Ali Rıza Gürcan Cd. No:27",
		"city":"istanbul",
		"country":"turkey",
		"zipCode":34164
},
 "ShippingAddress": {
		"contactName":"isim soyisim",
		"address":"Abdurrahman Nafiz Gürman,Mh, G. Ali Rıza Gürcan Cd. No:27",
		"city":"istanbul",
		"country":"turkey",
		"zipCode":34164
},
 "Products":
   [
    {"productId":"B104A", "name":"ürün bir","productPrice":2.3, "itemType":"PHYSICAL"},
 	  {"productId":"C1087", "name":"ürün iki","productPrice":2.3, "itemType":"PHYSICAL" },
 		{"productId":"12233352", "name":"ürün üç","productPrice":2.3, "itemType":"PHYSICAL" }
   ]
}

API Servisinden Dönen Sonuç Örnekleri

Başarılı Sonuç Örneği

{
"CheckoutFormData":"html data",
"status":"success",
"paymentPageUrl":"Ortak Ödeme Sayfası linki"
}

Başarısız Sonuç Örneği

{
"status":"failure",
"errorCode":"030",
"error":"array()",
"message":"Hata Mesajı" 
}

Ödeme Servisi Kullanım Çeşitleri

  • Ödeme Formu Popup

  • Ödeme Formu Responsive

  • Ödeme Sayfası

  • Ödeme Sayfası iFrame

Ödeme Formu Kullanım Şekilleri

Response
Response olarak dönen CheckOutFormData nesnesi 2 farklı şekilde kullanılır.
<div id='weePay-checkout-form' class='popup'> // Popup Form
<div id='weePay-checkout-form' class='responsive'> // Responsive Form


Ortak Ödeme Sayfası Kullanım Şekilleri

// Ortak Ödeme Sayfası

// Ödeme response ile gelen paymentPageUrl 
// alanındaki adrese Yönlendirme yapabilirinz
// Örnek Adres 
# https://api.weepay.co/GuvenliOdeme/Payment/xxxx-xxx-xxx-xxxxxx

iframe Ortak Ödeme Sayfası

// iframe ortak ödeme sayfası için
// Ödeme response ile gelen paymentPageUrl ortak ödeme URL'nin sonuna 
// get parametresi olarak iframe değeri true olarak gönderilir.
// Script tagları içerisine iframe resizer kullanarak iframe sorunsuz olarak kullanılır.

<iframe src="https://api.weepay.co/GuvenliOdeme/Payment/xxxx-xxx-xxx-xxxxxx?iframe=true"
id="weepayiframe" style="width: 100%;" frameborder="0" scrolling="no"></iframe>
<script src="https://service.weepay.co/assets/js/iframe-resizer.js"></script>

3D Secure (CallBack) Parametreleri

Başarılı Sonuç Örneği

{
"paymentStatus":true,// işlemin başarılı olup olmadı true / false
"paymentId":"",//Ödemenin Idsi
}

Başarısız Sonuç Örneği

{
"paymentStatus":false,// işlemin başarılı olup olmadı true / false
"errorCode":"00",
"message":"ÖRN : 3D onayı alınamadı."
}

ÖNEMLİ UYARI

CallBack URL POST olarak işlem sonucu gönderilir. İşlem sonucu başarılı ise Ödeme Detay servisimizi kullanarak ödemenin başarılı olup olmadığını tekrar kontrol ediniz.

Last updated