İşlem İade
Açıklama: Ödemesi yapılmış bir işlemin iadesi için kullanılır.
Not İade edilecek tutar 0 veya " " (Boş) gönderildiği taktirde tutarın tamamı iade edilir
URL: /api/refund
Test Sunucusu: https://test.vepara.com.tr/ccpayment/api/refund
Canlı Sunucusu: https://app.vepara.com.tr/ccpayment/api/refund
Method: POST
REQUEST BODY SCHEMA
json
{
"type": "object",
"properties": {
"invoice_id": {
"type": "string",
"description": "Ödeme yapılacak sepetin sipariş numarası, benzersiz göndermeye dikkat edin"
},
"amount": {
"type": "double/empty string",
"description": "İade edilecek tutarı ifade eder"
},
"app_id": {
"type": "string",
"description": "app_id üye işyerine atanan benzersiz bir anahtardır."
},
"app_secret": {
"type": "string",
"description": "app_secret üye işyerine verilen benzersiz ve gizli bir anahtardır."
},
"merchant_key" : {
"type": "string",
"description": "Vepara tarafından sağlanan üye işyerinin benzersiz anahtarıdır."
},
"hash_key": {
"type": "string",
"description": "işlemin bankaya ulaşmadan, kullanıcının ödemeyle ilgili değişiklikler yapamamasını ve ödemenin güvenli olarak tamamlanmasını sağlamaktadır. Aşağıda verilen hash anahtarını yazmak için kullanılan algoritma için tıklayınız veya sağ taraftaki PHP sekmesinden örneğini inceleyiniz."
},
"refund_transaction_id": {
"type": "string",
},
"refund_webhook_key": {
"type": "string",
"description": "Bankadan iade için başarılı cevap gelmediği zaman işlem manuel iadeye düşüyor, bu durumda bildirim almak için iade webhook'unu kullanabilirsiniz"
},
},
"required": ["invoice_id"],
"required": ["amount"],
"required": ["app_id"],
"required": ["app_secret"],
"required": ["merchant_key"],
"required": ["hash_key"],
}
200 Başarılı Sonuç
json
{
"status_code": 100,
"status_description": "Refund completed successfully",
"order_no": "16952164787436841",
"invoice_id": "wEWIcIVOifMGsqc",
"ref_no": "",
"ref_number": ""
}
400 Başarısız Sonuç
json
{
"status_code": 31,
"status_description": "Transaction Not Found",
"order_no": "",
"invoice_id": "wEWIcIVOifMGc",
"ref_no": "",
"ref_number": ""
}
Hash-Key Oluşturma
Hash Key, girdi değeri kullanılarak oluşturulması gereken benzersiz bir anahtardır. Aşağıda hash_key oluşturma yöntemi verilmiştir.
Request Body Scheme
json
{
"type": "object",
"properties": {
"amount": {
"type": "string",
"description": "Toplam ürün tutarı"
},
"merchant_key" : {
"type": "string",
"description": "Vepara tarafından sağlanan üye işyerinin benzersiz anahtarıdır."
},
"invoice_id": {
"type": "string",
"description": "Ödeme yapılacak sepetin sipariş numarası, benzersiz göndermeye dikkat edin"
},
"app_secret": {
"type": "string",
"description": "app_secret üye işyerine verilen benzersiz ve gizli bir anahtardır."
},
},
"required": ["amount"],
"required": ["merchant_key"],
"required": ["invoice_id"],
"required": ["app_secret"],
}
Hash Key Oluşturma Kod Örnekleri
PHP Örneği
php
function generateRefundHashKey($amount, $invoice_id, $merchant_key, $app_secret) {
$data = $amount.'|'.$invoice_id.'|'.$merchant_key;
$iv = substr(sha1(mt_rand()), 0, 16);
$password = sha1($app_secret);
$salt = substr(sha1(mt_rand()), 0, 4);
$saltWithPassword = hash('sha256', $password . $salt);
$encrypted = openssl_encrypt(
"$data", 'aes-256-cbc', "$saltWithPassword", null, $iv
);
$msg_encrypted_bundle = "$iv:$salt:$encrypted";
$hash_key = str_replace('/', '__', $msg_encrypted_bundle);
return $hash_key;
}
Python Örneği
python
from Crypto.Hash import SHA1
from Crypto.Hash import SHA256
def generateHashKey(secretKey, iv, salt, status, total, invoiceId, orderId, currencyCode):
if secretKey is None or iv is None or salt is None:
return None
# Create a SHA1 hash of the secretKey
hashStr = SHA1.new()
hashStr.update(secretKey.encode("UTF-8"))
password = hashStr.hexdigest()
# Combine password and salt, then create a SHA256 hash
strSum = password + salt
hashSalt = SHA256.new()
hashSalt.update(strSum.encode("UTF-8"))
salt = hashSalt.hexdigest()
# Construct the decryptedMsg string
decryptedMsg = f"{status}|{total}|{invoiceId}|{orderId}|{currencyCode}"
# Combine iv, salt, and decryptedMsg using a colon separator
hashKey = f"{iv}:{salt}:{decryptedMsg}"
# Replace forward slashes with underscores in the hashKey
hashKey = hashKey.replace("/", "_")
return hashKey
secretKey = "your_secret_key"
iv = "your_iv"
salt = "your_salt"
status = "your_status"
total = "your_total"
invoiceId = "your_invoice_id"
orderId = "your_order_id"
currencyCode = "your_currency_code"
generatedHashKey = generateHashKey(secretKey, iv, salt, status, total, invoiceId, orderId, currencyCode)
print("Generated Hash Key:", generatedHashKey)
Nodejs Örneği
javascript
function generateHashKey(secretKey, iv, salt, status, total, invoiceId, orderId, currencyCode) {
var hashKey = iv + ':' + salt + ':' + status + '|' + total + '|' + invoiceId + '|' + orderId + '|' + currencyCode;
hashKey = hashKey.replace(/\//g, '_');
var password = CryptoJS.SHA1(secretKey).toString();
var strSalt = password + salt;
var saltHash = CryptoJS.SHA256(strSalt).toString();
return hashKey.replace(/\//g, '_');
}
var secretKey = "your_secret_key";
var iv = "your_iv";
var salt = "your_salt";
var status = "your_status";
var total = "your_total";
var invoiceId = "your_invoice_id";
var orderId = "your_order_id";
var currencyCode = "your_currency_code";
var generatedHashKey = generateHashKey(secretKey, iv, salt, status, total, invoiceId, orderId, currencyCode);
console.log("Generated Hash Key: " + generatedHashKey);
C# Örneği
c#
using System;
using System.Security.Cryptography;
using System.Text;
using System.Linq;
public class HashGenerator
{
public string GenerateHashKey(string total, string installment, string currency_code, string merchant_key, string invoice_id, string app_secret)
{
string data = total + "|" + installment + "|" + currency_code + "|" + merchant_key + "|" + invoice_id;
Random mt_rand = new Random();
string iv = Sha1Hash(mt_rand.Next().ToString()).Substring(0, 16);
string password = Sha1Hash(app_secret);
string salt = Sha1Hash(mt_rand.Next().ToString()).Substring(0, 4);
string saltWithPassword = "";
using (SHA256 sha256Hash = SHA256.Create())
{
saltWithPassword = GetHash(sha256Hash, password + salt);
}
string encrypted = Encryptor(data, saltWithPassword.Substring(0, 32), iv);
string msg_encrypted_bundle = iv + ":" + salt + ":" + encrypted;
msg_encrypted_bundle = msg_encrypted_bundle.Replace("/", "__");
return msg_encrypted_bundle;
}
private string GetHash(HashAlgorithm hashAlgorithm, string input)
{
byte[] data = hashAlgorithm.ComputeHash(Encoding.UTF8.GetBytes(input));
var sBuilder = new StringBuilder();
for (int i = 0; i < data.Length; i++)
{
sBuilder.Append(data[i].ToString("x2"));
}
return sBuilder.ToString();
}
private string Sha1Hash(string password)
{
return string.Join("", SHA1CryptoServiceProvider.Create().ComputeHash(Encoding.UTF8.GetBytes(password)).Select(x => x.ToString("x2")));
}
private string Encryptor(string TextToEncrypt, string strKey, string strIV)
{
byte[] PlainTextBytes = System.Text.Encoding.UTF8.GetBytes(TextToEncrypt);
AesCryptoServiceProvider aesProvider = new AesCryptoServiceProvider();
aesProvider.BlockSize = 128;
aesProvider.KeySize = 256;
aesProvider.Key = System.Text.Encoding.UTF8.GetBytes(strKey);
aesProvider.IV = System.Text.Encoding.UTF8.GetBytes(strIV);
aesProvider.Padding = PaddingMode.PKCS7;
aesProvider.Mode = CipherMode.CBC;
ICryptoTransform cryptoTransform = aesProvider.CreateEncryptor(aesProvider.Key, aesProvider.IV);
byte[] EncryptedBytes = cryptoTransform.TransformFinalBlock(PlainTextBytes, 0, PlainTextBytes.Length);
return Convert.ToBase64String(EncryptedBytes);
}
public static void Main(string[] args)
{
HashGenerator hashGenerator = new HashGenerator(); // HashGenerator sınıfından bir nesne oluşturun
string hashKey = hashGenerator.GenerateHashKey("10", "1", "TRY", "$2y$10$w/ODdbTmfubcbUCUq/ia3OoJFMUmkM1UVNBiIQIuLfUlPmaLUT1he", "Vepara-INVOICE-2", "217071ea9f3f2e9b695d8f0039024e64");
Console.WriteLine("Hash Key:"+ hashKey);
}
}
Kod Örnekleri
PHP Örneği
php
<?php
$curl = curl_init();
curl_setopt_array($curl, array(
CURLOPT_URL => 'https://test.vepara.com.tr/ccpayment/api/refund',
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => '',
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 0,
CURLOPT_FOLLOWLOCATION => true,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => 'POST',
CURLOPT_POSTFIELDS =>'{
"merchant_key": "$2y$10$w/ODdbTmfubcbUCUq/ia3OoJFMUmkM1UVNBiIQIuLfUlPmaLUT1he",
"invoice_id": "wEWIcIVOifMGc",
"amount": 10,
"app_id": "c3d81ae3cc3011ef10dcefa31a458d65",
"app_secret": "217071ea9f3f2e9b695d8f0039024e64",
"hash_key": "90cb8102b218c917:4e8f:0dZYhYItbY+kSj700DLHUK22__wl8wwReDjP4boWzKUZUD3ZP7Kh0jAQR2Gt0T7+PcgWXpKywhFvxb1cRlNov7PIxnv6pARNO19ybyURYDc4="
}',
CURLOPT_HTTPHEADER => array(
'Accept: application/json',
'Content-Type: application/json',
'Authorization: Bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJSUzI1NiJ9.eyJhdWQiOiIxOSIsImp0aSI6IjRkYzBjY2FiYWU0MjczYWE2YTk4ODRlYWZlN2VhYmJjYTUxZTA1MzQ5ZjYxNDk5MzhmMmQ1YmUyYzUyMDI5YWI0ODQ3NDMwOTMwYzcxYWQzIiwiaWF0IjoxNjk1MjE3NDQ5LjAxNzgsIm5iZiI6MTY5NTIxNzQ0OS4wMTc4LCJleHAiOjE2OTUyMjQ2NDkuMDEyOCwic3ViIjoiNiIsInNjb3BlcyI6W119.l4kUfAJx5V6B9BdARFkhg8dAAdfT6LqBeUkVuh1k2sOfz7BCA-vcdHHG-k-y5hZJshedmk-AwVPRoYc3Ce9LIE4CZnJZWHqhUTZifSSj8bokMLrbH0BERcZS2IaZdba7oJ8sjFgAd9p6pr-e__E2HwbYp9Y2TzqEzF8jsouEpFrsqqRUovMNJnJs5iMtZkBJTXYYF_4fC7FGeN70glg3Hi3O5gWmwEuC62N6kb_uIXPDj56x0ZfBdey3fpg6ugQV_mrWxcWNT2fUF5-Jxct7X7PQ8yp6wyELo4boYvproWbRJojhcqrYID3CKEtPEldxxFEcSetx-zNCFHb44rbRSyyYrcPedM2zCEU-ycufTAGG_kwVa1Akssh1kLwZN-vNt2Xsx2AXZbf9nih6kdA20E1ip2PU4cqa_TohmfqBrjW9LuVWkNUbhLclFA2NZBuZLC6jrCULTbs4YLEilEMW53oX90qK354n1oNBq6w5NLKg6XW1k1GHgj7pd6gs0z5dKD1cet_UAl_kHg08m_jx7oeniZGhmqBqNAHGwdJZ94OjY8ZvEqFZc8MjCFJWz81g7KoUl68fdIpBZ4aYnJtd6uYsg0QHuR4fYL1dCpAl_--enCYl8XJMM31-4ddfVS-cbpYJKg-MRB9gEo0FdN7C-3fZBQHH0SqfjVpMt9lx9Bg',
'Cookie: veparaccpayment_session=ZOq6q12h3Pfw5AsQhwayL7GZ1EiJz0MK8GsXLj2a'
),
));
$response = curl_exec($curl);
curl_close($curl);
echo $response;
Ruby Örneği
ruby
require "uri"
require "json"
require "net/http"
url = URI("https://test.vepara.com.tr/ccpayment/api/refund")
https = Net::HTTP.new(url.host, url.port)
https.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Accept"] = "application/json"
request["Content-Type"] = "application/json"
request["Authorization"] = "Bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJSUzI1NiJ9.eyJhdWQiOiIxOSIsImp0aSI6IjRkYzBjY2FiYWU0MjczYWE2YTk4ODRlYWZlN2VhYmJjYTUxZTA1MzQ5ZjYxNDk5MzhmMmQ1YmUyYzUyMDI5YWI0ODQ3NDMwOTMwYzcxYWQzIiwiaWF0IjoxNjk1MjE3NDQ5LjAxNzgsIm5iZiI6MTY5NTIxNzQ0OS4wMTc4LCJleHAiOjE2OTUyMjQ2NDkuMDEyOCwic3ViIjoiNiIsInNjb3BlcyI6W119.l4kUfAJx5V6B9BdARFkhg8dAAdfT6LqBeUkVuh1k2sOfz7BCA-vcdHHG-k-y5hZJshedmk-AwVPRoYc3Ce9LIE4CZnJZWHqhUTZifSSj8bokMLrbH0BERcZS2IaZdba7oJ8sjFgAd9p6pr-e__E2HwbYp9Y2TzqEzF8jsouEpFrsqqRUovMNJnJs5iMtZkBJTXYYF_4fC7FGeN70glg3Hi3O5gWmwEuC62N6kb_uIXPDj56x0ZfBdey3fpg6ugQV_mrWxcWNT2fUF5-Jxct7X7PQ8yp6wyELo4boYvproWbRJojhcqrYID3CKEtPEldxxFEcSetx-zNCFHb44rbRSyyYrcPedM2zCEU-ycufTAGG_kwVa1Akssh1kLwZN-vNt2Xsx2AXZbf9nih6kdA20E1ip2PU4cqa_TohmfqBrjW9LuVWkNUbhLclFA2NZBuZLC6jrCULTbs4YLEilEMW53oX90qK354n1oNBq6w5NLKg6XW1k1GHgj7pd6gs0z5dKD1cet_UAl_kHg08m_jx7oeniZGhmqBqNAHGwdJZ94OjY8ZvEqFZc8MjCFJWz81g7KoUl68fdIpBZ4aYnJtd6uYsg0QHuR4fYL1dCpAl_--enCYl8XJMM31-4ddfVS-cbpYJKg-MRB9gEo0FdN7C-3fZBQHH0SqfjVpMt9lx9Bg"
request["Cookie"] = "veparaccpayment_session=ZOq6q12h3Pfw5AsQhwayL7GZ1EiJz0MK8GsXLj2a"
request.body = JSON.dump({
"merchant_key": "$2y$10$w/ODdbTmfubcbUCUq/ia3OoJFMUmkM1UVNBiIQIuLfUlPmaLUT1he",
"invoice_id": "wEWIcIVOifMGc",
"amount": 10,
"app_id": "c3d81ae3cc3011ef10dcefa31a458d65",
"app_secret": "217071ea9f3f2e9b695d8f0039024e64",
"hash_key": "90cb8102b218c917:4e8f:0dZYhYItbY+kSj700DLHUK22__wl8wwReDjP4boWzKUZUD3ZP7Kh0jAQR2Gt0T7+PcgWXpKywhFvxb1cRlNov7PIxnv6pARNO19ybyURYDc4="
})
response = https.request(request)
puts response.read_body
Python Örneği
python
import http.client
import json
conn = http.client.HTTPSConnection("test.vepara.com.tr")
payload = json.dumps({
"merchant_key": "$2y$10$w/ODdbTmfubcbUCUq/ia3OoJFMUmkM1UVNBiIQIuLfUlPmaLUT1he",
"invoice_id": "wEWIcIVOifMGc",
"amount": 10,
"app_id": "c3d81ae3cc3011ef10dcefa31a458d65",
"app_secret": "217071ea9f3f2e9b695d8f0039024e64",
"hash_key": "90cb8102b218c917:4e8f:0dZYhYItbY+kSj700DLHUK22__wl8wwReDjP4boWzKUZUD3ZP7Kh0jAQR2Gt0T7+PcgWXpKywhFvxb1cRlNov7PIxnv6pARNO19ybyURYDc4="
})
headers = {
'Accept': 'application/json',
'Content-Type': 'application/json',
'Authorization': 'Bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJSUzI1NiJ9.eyJhdWQiOiIxOSIsImp0aSI6IjRkYzBjY2FiYWU0MjczYWE2YTk4ODRlYWZlN2VhYmJjYTUxZTA1MzQ5ZjYxNDk5MzhmMmQ1YmUyYzUyMDI5YWI0ODQ3NDMwOTMwYzcxYWQzIiwiaWF0IjoxNjk1MjE3NDQ5LjAxNzgsIm5iZiI6MTY5NTIxNzQ0OS4wMTc4LCJleHAiOjE2OTUyMjQ2NDkuMDEyOCwic3ViIjoiNiIsInNjb3BlcyI6W119.l4kUfAJx5V6B9BdARFkhg8dAAdfT6LqBeUkVuh1k2sOfz7BCA-vcdHHG-k-y5hZJshedmk-AwVPRoYc3Ce9LIE4CZnJZWHqhUTZifSSj8bokMLrbH0BERcZS2IaZdba7oJ8sjFgAd9p6pr-e__E2HwbYp9Y2TzqEzF8jsouEpFrsqqRUovMNJnJs5iMtZkBJTXYYF_4fC7FGeN70glg3Hi3O5gWmwEuC62N6kb_uIXPDj56x0ZfBdey3fpg6ugQV_mrWxcWNT2fUF5-Jxct7X7PQ8yp6wyELo4boYvproWbRJojhcqrYID3CKEtPEldxxFEcSetx-zNCFHb44rbRSyyYrcPedM2zCEU-ycufTAGG_kwVa1Akssh1kLwZN-vNt2Xsx2AXZbf9nih6kdA20E1ip2PU4cqa_TohmfqBrjW9LuVWkNUbhLclFA2NZBuZLC6jrCULTbs4YLEilEMW53oX90qK354n1oNBq6w5NLKg6XW1k1GHgj7pd6gs0z5dKD1cet_UAl_kHg08m_jx7oeniZGhmqBqNAHGwdJZ94OjY8ZvEqFZc8MjCFJWz81g7KoUl68fdIpBZ4aYnJtd6uYsg0QHuR4fYL1dCpAl_--enCYl8XJMM31-4ddfVS-cbpYJKg-MRB9gEo0FdN7C-3fZBQHH0SqfjVpMt9lx9Bg',
'Cookie': 'veparaccpayment_session=ZOq6q12h3Pfw5AsQhwayL7GZ1EiJz0MK8GsXLj2a'
}
conn.request("POST", "/ccpayment/api/refund", payload, headers)
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
Nodejs Örneği
javascript
const axios = require('axios');
let data = JSON.stringify({
"merchant_key": "$2y$10$w/ODdbTmfubcbUCUq/ia3OoJFMUmkM1UVNBiIQIuLfUlPmaLUT1he",
"invoice_id": "wEWIcIVOifMGc",
"amount": 10,
"app_id": "c3d81ae3cc3011ef10dcefa31a458d65",
"app_secret": "217071ea9f3f2e9b695d8f0039024e64",
"hash_key": "90cb8102b218c917:4e8f:0dZYhYItbY+kSj700DLHUK22__wl8wwReDjP4boWzKUZUD3ZP7Kh0jAQR2Gt0T7+PcgWXpKywhFvxb1cRlNov7PIxnv6pARNO19ybyURYDc4="
});
let config = {
method: 'post',
maxBodyLength: Infinity,
url: 'https://test.vepara.com.tr/ccpayment/api/refund',
headers: {
'Accept': 'application/json',
'Content-Type': 'application/json',
'Authorization': 'Bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJSUzI1NiJ9.eyJhdWQiOiIxOSIsImp0aSI6IjRkYzBjY2FiYWU0MjczYWE2YTk4ODRlYWZlN2VhYmJjYTUxZTA1MzQ5ZjYxNDk5MzhmMmQ1YmUyYzUyMDI5YWI0ODQ3NDMwOTMwYzcxYWQzIiwiaWF0IjoxNjk1MjE3NDQ5LjAxNzgsIm5iZiI6MTY5NTIxNzQ0OS4wMTc4LCJleHAiOjE2OTUyMjQ2NDkuMDEyOCwic3ViIjoiNiIsInNjb3BlcyI6W119.l4kUfAJx5V6B9BdARFkhg8dAAdfT6LqBeUkVuh1k2sOfz7BCA-vcdHHG-k-y5hZJshedmk-AwVPRoYc3Ce9LIE4CZnJZWHqhUTZifSSj8bokMLrbH0BERcZS2IaZdba7oJ8sjFgAd9p6pr-e__E2HwbYp9Y2TzqEzF8jsouEpFrsqqRUovMNJnJs5iMtZkBJTXYYF_4fC7FGeN70glg3Hi3O5gWmwEuC62N6kb_uIXPDj56x0ZfBdey3fpg6ugQV_mrWxcWNT2fUF5-Jxct7X7PQ8yp6wyELo4boYvproWbRJojhcqrYID3CKEtPEldxxFEcSetx-zNCFHb44rbRSyyYrcPedM2zCEU-ycufTAGG_kwVa1Akssh1kLwZN-vNt2Xsx2AXZbf9nih6kdA20E1ip2PU4cqa_TohmfqBrjW9LuVWkNUbhLclFA2NZBuZLC6jrCULTbs4YLEilEMW53oX90qK354n1oNBq6w5NLKg6XW1k1GHgj7pd6gs0z5dKD1cet_UAl_kHg08m_jx7oeniZGhmqBqNAHGwdJZ94OjY8ZvEqFZc8MjCFJWz81g7KoUl68fdIpBZ4aYnJtd6uYsg0QHuR4fYL1dCpAl_--enCYl8XJMM31-4ddfVS-cbpYJKg-MRB9gEo0FdN7C-3fZBQHH0SqfjVpMt9lx9Bg',
'Cookie': 'veparaccpayment_session=ZOq6q12h3Pfw5AsQhwayL7GZ1EiJz0MK8GsXLj2a'
},
data : data
};
axios.request(config)
.then((response) => {
console.log(JSON.stringify(response.data));
})
.catch((error) => {
console.log(error);
});
C# Örneği
c#
var client = new HttpClient();
var request = new HttpRequestMessage(HttpMethod.Post, "https://test.vepara.com.tr/ccpayment/api/refund");
request.Headers.Add("Accept", "application/json");
request.Headers.Add("Authorization", "Bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJSUzI1NiJ9.eyJhdWQiOiIxOSIsImp0aSI6IjRkYzBjY2FiYWU0MjczYWE2YTk4ODRlYWZlN2VhYmJjYTUxZTA1MzQ5ZjYxNDk5MzhmMmQ1YmUyYzUyMDI5YWI0ODQ3NDMwOTMwYzcxYWQzIiwiaWF0IjoxNjk1MjE3NDQ5LjAxNzgsIm5iZiI6MTY5NTIxNzQ0OS4wMTc4LCJleHAiOjE2OTUyMjQ2NDkuMDEyOCwic3ViIjoiNiIsInNjb3BlcyI6W119.l4kUfAJx5V6B9BdARFkhg8dAAdfT6LqBeUkVuh1k2sOfz7BCA-vcdHHG-k-y5hZJshedmk-AwVPRoYc3Ce9LIE4CZnJZWHqhUTZifSSj8bokMLrbH0BERcZS2IaZdba7oJ8sjFgAd9p6pr-e__E2HwbYp9Y2TzqEzF8jsouEpFrsqqRUovMNJnJs5iMtZkBJTXYYF_4fC7FGeN70glg3Hi3O5gWmwEuC62N6kb_uIXPDj56x0ZfBdey3fpg6ugQV_mrWxcWNT2fUF5-Jxct7X7PQ8yp6wyELo4boYvproWbRJojhcqrYID3CKEtPEldxxFEcSetx-zNCFHb44rbRSyyYrcPedM2zCEU-ycufTAGG_kwVa1Akssh1kLwZN-vNt2Xsx2AXZbf9nih6kdA20E1ip2PU4cqa_TohmfqBrjW9LuVWkNUbhLclFA2NZBuZLC6jrCULTbs4YLEilEMW53oX90qK354n1oNBq6w5NLKg6XW1k1GHgj7pd6gs0z5dKD1cet_UAl_kHg08m_jx7oeniZGhmqBqNAHGwdJZ94OjY8ZvEqFZc8MjCFJWz81g7KoUl68fdIpBZ4aYnJtd6uYsg0QHuR4fYL1dCpAl_--enCYl8XJMM31-4ddfVS-cbpYJKg-MRB9gEo0FdN7C-3fZBQHH0SqfjVpMt9lx9Bg");
request.Headers.Add("Cookie", "veparaccpayment_session=ZOq6q12h3Pfw5AsQhwayL7GZ1EiJz0MK8GsXLj2a");
var content = new StringContent("{\r\n \"merchant_key\": \"$2y$10$w/ODdbTmfubcbUCUq/ia3OoJFMUmkM1UVNBiIQIuLfUlPmaLUT1he\",\r\n \"invoice_id\": \"wEWIcIVOifMGc\",\r\n \"amount\": 10,\r\n \"app_id\": \"c3d81ae3cc3011ef10dcefa31a458d65\",\r\n \"app_secret\": \"217071ea9f3f2e9b695d8f0039024e64\",\r\n \"hash_key\": \"90cb8102b218c917:4e8f:0dZYhYItbY+kSj700DLHUK22__wl8wwReDjP4boWzKUZUD3ZP7Kh0jAQR2Gt0T7+PcgWXpKywhFvxb1cRlNov7PIxnv6pARNO19ybyURYDc4=\"\r\n}", null, "application/json");
request.Content = content;
var response = await client.SendAsync(request);
response.EnsureSuccessStatusCode();
Console.WriteLine(await response.Content.ReadAsStringAsync());