1) Creating Payment
The merchant with API Accounts should send an inquiry to api.paym.es service as follows.
order_create
POST
https://api.paym.es/v4.6/order_create
The first step to getting payments via Paymes is creating a Payment request. You can send the data shown below as an HTTP Post Request to Paymes to create a payment request. If the information is OK, your transaction request is gets approved and you progress to the second step which requires card information to complete the transaction successfully. Card information can be sent to Paymes servers in 2 different ways; via a Hosted Payment Page that developed and maintaned by Pamyes, or using Paymes API via HTTP Post Request method. It is sufficient to use only one of these two different methods. If there is no error in the card information, the URL to which the buyer will be directed for 3D verification is sent as a reply.
Request Body
publicKey*
string
Your public key
orderId*
string
Unique variable in your system so that you can follow the payment process
price*
string
Payment price amount Example: 10.00
currency*
string
"TRY", "USD", EUR"
productName*
string
The name or stock code of the product
buyerName*
string
The name and surname of the buyer.
buyerPhone*
string
Phone number of the buyer.
buyerEmail*
string
Email of the buyer.
buyerAddress*
string
Address of the buyer.
hash*
string
Base64 encoded string of SHA512 hash of data sent. It is detailed below.
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:
Combine these variables via the string concatenate method:
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:
If the hash is sent incorrectly, the request will fail.
Last updated