İptal
Yapılan finansal işlemi iptal etmek amacıyla kullanılan servistir. İptal servisi; işlemiçin günsonu yapılmadan, aynı gün çağırılabilir.
POSThttps://testpfapi.rubikpara.com/v1/Payments/reverse
Request
Headers
ClientIpAddress array[string]
ConversationId string
MerchantNumber string
Nonce string
PublicKey string
Signature string
ConversationId string
MerchantNumber string
Nonce string
PublicKey string
Signature string
Body
{
"orderId": "string",
"languageCode": "string"
}
Response
Body
{
"isSucceed": "boolean",
"errorCode": "string or null",
"errorMessage": "string or null",
"conversationId": "string or null",
}
Örnek Kodlar
- Axios
- Java
- PHP
- C#
- Go
- Python
- cURL
const axios = require('axios').default; const options = { method: 'POST', url: 'https://testpfapi.rubikpara.com/v1/Payments/reverse', headers: { PublicKey: 'SkDP+k0jpMPDOzjcQ2dTcg==', Nonce: '', Signature: '', ConversationId: 'test123456', ClientIpAddress: '192.1.1.1', MerchantNumber: '1100000001', 'Content-Type': 'application/json', Accept: 'application/json' }, data: {orderId: ''/*Provizyon Servisinden alınacak*/, languageCode: 'TR'} }; try { const { data } = await axios.request(options); console.log(data); } catch (error) { console.error(error); }
- AsyncHttp
- AsyncHttp
OkHttpClient client = new OkHttpClient().newBuilder()
.build();
MediaType mediaType = MediaType.parse("application/json");
RequestBody body = RequestBody.create(mediaType, "{\r\n \"orderid\": \"\",// Provizyon Servisinden alınacak\r\n \"LanguageCode\":\"TR\"\r\n}");
Request request = new Request.Builder()
.url("${Config.customFields.testUrl}/v1/Payments/reverse")
.method("POST", body)
.addHeader("publicKey", "${Config.customFields.publicKey}")
.addHeader("nonce", "${Config.customFields.nonce}")
.addHeader("signature", "${Config.customFields.signature}")
.addHeader("conversationId", "${Config.customFields.conversationId}")
.addHeader("clientIpAddress", "${Config.customFields.clientIpAddress}")
.addHeader("merchantNumber", "${Config.customFields.merchantNumber}")
.addHeader("Content-Type", "application/json")
.build();
Response response = client.newCall(request).execute();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("${Config.customFields.testUrl}/v1/Payments/reverse"))
.header("PublicKey", "${Config.customFields.publicKey}")
.header("Nonce", "${Config.customFields.nonce}")
.header("Signature", "${Config.customFields.signature}")
.header("ConversationId", "${Config.customFields.conversationId}")
.header("ClientIpAddress", "${Config.customFields.clientIpAddress}")
.header("MerchantNumber", "${Config.customFields.merchantNumber}")
.header("Content-Type", "application/json")
.header("Accept", "application/json")
.method("POST", HttpRequest.BodyPublishers.ofString("{\n \"orderId\": \"\",// Provizyon Servisinden alınacak\n \"languageCode\": \"TR\"\n}"))
.build();
HttpResponse<String> response = HttpClient.newHttpClient().send(request, HttpResponse.BodyHandlers.ofString());
System.out.println(response.body());
<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://testpfapi.rubikpara.com/v1/Payments/reverse",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'orderId' => '',// Provizyon Servisinden alınacak
'languageCode' => 'TR'
]),
CURLOPT_HTTPHEADER => [
"Accept: application/json",
"ClientIpAddress: 192.1.1.1",
"Content-Type: application/json",
"ConversationId: test123456",
"MerchantNumber: 1100000001",
"Nonce: ",
"PublicKey: SkDP+k0jpMPDOzjcQ2dTcg==",
"Signature: "
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}
curl --request POST --url https://testpfapi.rubikpara.com/v1/Payments/return --header 'Accept: application/json' --header 'ClientIpAddress: 192.1.1.1' --header 'Content-Type: application/json' --header 'ConversationId: test123456' --header 'MerchantNumber: 1100000001' --header 'Nonce: ' --header 'PublicKey: SkDP+k0jpMPDOzjcQ2dTcg==' --header 'Signature: ' --data '{
"orderId": "",// Provizyon Servisinden alınacak
"languageCode": "TR",
"amount": 20
}'
using System.Net.Http.Headers;
var client = new HttpClient();
var request = new HttpRequestMessage
{
Method = HttpMethod.Post,
RequestUri = new Uri("${Config.customFields.testUrl}/v1/Payments/reverse"),
Headers =
{
{ "PublicKey", "${Config.customFields.publicKey}" },
{ "Nonce", "${Config.customFields.nonce}" },
{ "Signature", "${Config.customFields.signature}" },
{ "ConversationId", "${Config.customFields.conversationId}" },
{ "ClientIpAddress", "${Config.customFields.clientIpAddress}" },
{ "MerchantNumber", "${Config.customFields.merchantNumber}" },
{ "Accept", "application/json" },
},
Content = new StringContent("{\n \"orderId\": \"\",// Provizyon Servisinden alınacak\n \"languageCode\": \"TR\"\n}")
{
Headers =
{
ContentType = new MediaTypeHeaderValue("application/json")
}
}
};
using (var response = await client.SendAsync(request))
{
response.EnsureSuccessStatusCode();
var body = await response.Content.ReadAsStringAsync();
Console.WriteLine(body);
}
package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://testpfapi.rubikpara.com/v1/Payments/reverse"
payload := strings.NewReader("{
"orderId": "",// Provizyon Servisinden alınacak
"languageCode": "TR"
}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("PublicKey", "SkDP+k0jpMPDOzjcQ2dTcg==")
req.Header.Add("Nonce", "")
req.Header.Add("Signature", "")
req.Header.Add("ConversationId", "test123456")
req.Header.Add("ClientIpAddress", "192.1.1.1")
req.Header.Add("MerchantNumber", "1100000001")
req.Header.Add("Content-Type", "application/json")
req.Header.Add("Accept", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(res)
fmt.Println(string(body))
}
import http.client
conn = http.client.HTTPSConnection("https://testpfapi.rubikpara.com")
payload = "{
"orderId": "",// Provizyon Servisinden alınacak
"languageCode": "TR"
}"
headers = {
'PublicKey': "SkDP+k0jpMPDOzjcQ2dTcg==",
'Nonce': "",
'Signature': "",
'ConversationId': "test123456",
'ClientIpAddress': "192.1.1.1",
'MerchantNumber': "1100000001",
'Content-Type': "application/json",
'Accept': "application/json"
}
conn.request("POST", "/v1/Payments/reverse", payload, headers)
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
curl --request POST --url https://testpfapi.rubikpara.com/v1/Payments/reverse --header 'Accept: application/json' --header 'ClientIpAddress: 192.1.1.1' --header 'Content-Type: application/json' --header 'ConversationId: test123456' --header 'MerchantNumber: 1100000001' --header 'Nonce: ' --header 'PublicKey: SkDP+k0jpMPDOzjcQ2dTcg==' --header 'Signature: ' --data '{
"orderId": "",// Provizyon Servisinden alınacak
"languageCode": "TR"
}'