Creating Payment Process

The merchant with API Accounts should send an inquiry to api.paym.es service as follows.

post
Order Create

https://api.paym.es/v4.5/order_create
This If the payment transaction creation is successful, the user should be directed to the returnUrl address returned from the response.allows you to get fee cakes.
Request
Response
Request
Form Data Parameters
publicKey
required
string
Your public key
orderId
required
string
Unique variable in your system so that you can follow the payment process
price
required
string
Payment price amount Example: 10.00
currency
required
string
Constant as TRY
productName
required
string
The name or stock code of the product
buyerName
required
string
The name and surname of buyer.
buyerPhone
required
string
Phone number of the buyer.
buyerEmail
required
string
Email of the buyer.
buyerAddress
required
string
Adress of the buyer.
hash
required
string
Base64 encoded string of SHA512 hash of data sent. It is detailed below.
Response
200: OK
Payment transaction created.
{
"status" : "return_url",
"message" : "Redirect 3D",
"returnUrl" : "https:\/\/api.paym.es\/payment\/fbe04621-ee39-451b-a694-09a6fed22809",
"paymesOrderId" : "fbe04621-ee39-451b-a694-09a6fed22809"
}
400: Bad Request
Error for inputs.
{
"status" : "error",
"message" : "The price field is required."
}

Generating Hash Information

To generate hash; concatenate strings in this order: "orderId + price + currency + productName + buyerName + buyerPhone + buyerEmail + buyerAddress + secretKey" Get the hash of the string with SHA512 (SHA1 512). Encoding this output should be base64

For example, a hash value that created using the following values:

orderId = "123456789";
price = "1050";
currency = "TRY";
productName = "Ürün İsmi";
buyerName = "Mehmet Yılmaz";
buyerPhone = "05555555555";
buyerEmail = "[email protected]";
buyerAddress = "Örnek adres bilgisi";
secretKey = "111111111";

Combine these variables via the string concatenate method:

str = orderId + price + currency + productName + buyerName + buyerPhone + buyerEmail + buyerAddress + secretKey;
str = "1234567891050TRYÜrün İsmiMehmet Yı[email protected]Örnek adres bilgisi111111111";

If this string is hashed with the SHA512 method and then the output is encoded with base64, the output will be in the following string:

hash = "knYih0b6Nrvqvw7yxtt5H9Tb6kkH7RJkYlB450FziSBKfx0q2eZACHLi+ZexDZKcs9rxJ//QCmoaq12LaI5+3g==";

If the hash is sent incorrectly, the request will fail.