Update transaction
curl --request PATCH \
--url http://staging.qshop.ng/apiv2/{transactionId} \
--header 'Content-Type: application/json' \
--data '
{
"breakdown": {
"aggregate": 816.875,
"amount": 18500,
"bankCharge": 76.875,
"payout": 17683.125,
"qshopCharge": 740
}
}
'import requests
url = "http://staging.qshop.ng/apiv2/{transactionId}"
payload = { "breakdown": {
"aggregate": 816.875,
"amount": 18500,
"bankCharge": 76.875,
"payout": 17683.125,
"qshopCharge": 740
} }
headers = {"Content-Type": "application/json"}
response = requests.patch(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PATCH',
headers: {'Content-Type': 'application/json'},
body: JSON.stringify({
breakdown: {
aggregate: 816.875,
amount: 18500,
bankCharge: 76.875,
payout: 17683.125,
qshopCharge: 740
}
})
};
fetch('http://staging.qshop.ng/apiv2/{transactionId}', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "http://staging.qshop.ng/apiv2/{transactionId}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PATCH",
CURLOPT_POSTFIELDS => json_encode([
'breakdown' => [
'aggregate' => 816.875,
'amount' => 18500,
'bankCharge' => 76.875,
'payout' => 17683.125,
'qshopCharge' => 740
]
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "http://staging.qshop.ng/apiv2/{transactionId}"
payload := strings.NewReader("{\n \"breakdown\": {\n \"aggregate\": 816.875,\n \"amount\": 18500,\n \"bankCharge\": 76.875,\n \"payout\": 17683.125,\n \"qshopCharge\": 740\n }\n}")
req, _ := http.NewRequest("PATCH", url, payload)
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.patch("http://staging.qshop.ng/apiv2/{transactionId}")
.header("Content-Type", "application/json")
.body("{\n \"breakdown\": {\n \"aggregate\": 816.875,\n \"amount\": 18500,\n \"bankCharge\": 76.875,\n \"payout\": 17683.125,\n \"qshopCharge\": 740\n }\n}")
.asString();require 'uri'
require 'net/http'
url = URI("http://staging.qshop.ng/apiv2/{transactionId}")
http = Net::HTTP.new(url.host, url.port)
request = Net::HTTP::Patch.new(url)
request["Content-Type"] = 'application/json'
request.body = "{\n \"breakdown\": {\n \"aggregate\": 816.875,\n \"amount\": 18500,\n \"bankCharge\": 76.875,\n \"payout\": 17683.125,\n \"qshopCharge\": 740\n }\n}"
response = http.request(request)
puts response.read_body{
"data": {
"__v": 0,
"_id": "62ea571509bd2e9be7de9edd",
"amount": 18500,
"breakdown": {
"aggregate": 816.875,
"amount": 18500,
"bankCharge": 76.875,
"payout": 17683.125,
"qshopCharge": 740
},
"createdAt": "2022-08-03T11:08:05.921Z",
"meta": {
"accountNumber": "9978770274",
"channelId": "1",
"currency": "NGN",
"feeAmount": "500",
"initiationTranRef": "",
"sessionId": "0000042103011805345648005069266636442358859209",
"settledAmount": "18500",
"settlementId": "202210301006807500001631",
"sourceAccountName": "CASAFINA CREDIT-EASY LOAN",
"sourceAccountNumber": "2093566866",
"sourceBankName": "UNITED BANK FOR AFRICA",
"tranDateTime": "2021-03-01 18:06:20.000",
"tranRemarks": "FROM UBA/ CASAFINA CREDIT-EASY LOAN-NIP/SEYI OLUFEMI/CASAFINA CAP/0000042103015656180548005069266636",
"transactionAmount": "19000",
"vatAmount": "0",
"virtualBankAccount": {
"__v": 0,
"_id": "62ea499b1908431f9caf727b",
"accountName": "MERCHANT(Qshop/Egoli)",
"accountNumber": "9978770274",
"created": "2022-08-03T10:10:35.667Z",
"isUsed": true,
"meta": {
"account_name": "MERCHANT(Qshop/Egoli)",
"account_number": "9978770274",
"bvn": "",
"requestSuccessful": true,
"responseCode": "00",
"responseMessage": "Reserved Account Generated Successfully"
},
"order": "62ea498e1908431f9caf7276",
"orderTotal": 22000,
"platformKey": "providus",
"platformName": "Providus",
"shop": "61a956d91a113f7e13c45c15"
}
},
"paymentPlatform": "61a6406c18ae008099246a8d",
"shop": "61a956d91a113f7e13c45c15",
"status": "62597ba57b912008a11e1206",
"statusLogs": [
"62597ba57b912008a11e1206"
],
"transactionReference": "202210301006807500001631",
"type": "order-payment",
"virtualBankAccount": "62ea499b1908431f9caf727b"
},
"msg": "Transaction updated",
"success": true
}Transactions
Update transaction
PATCH
/
{transactionId}
Update transaction
curl --request PATCH \
--url http://staging.qshop.ng/apiv2/{transactionId} \
--header 'Content-Type: application/json' \
--data '
{
"breakdown": {
"aggregate": 816.875,
"amount": 18500,
"bankCharge": 76.875,
"payout": 17683.125,
"qshopCharge": 740
}
}
'import requests
url = "http://staging.qshop.ng/apiv2/{transactionId}"
payload = { "breakdown": {
"aggregate": 816.875,
"amount": 18500,
"bankCharge": 76.875,
"payout": 17683.125,
"qshopCharge": 740
} }
headers = {"Content-Type": "application/json"}
response = requests.patch(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PATCH',
headers: {'Content-Type': 'application/json'},
body: JSON.stringify({
breakdown: {
aggregate: 816.875,
amount: 18500,
bankCharge: 76.875,
payout: 17683.125,
qshopCharge: 740
}
})
};
fetch('http://staging.qshop.ng/apiv2/{transactionId}', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "http://staging.qshop.ng/apiv2/{transactionId}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PATCH",
CURLOPT_POSTFIELDS => json_encode([
'breakdown' => [
'aggregate' => 816.875,
'amount' => 18500,
'bankCharge' => 76.875,
'payout' => 17683.125,
'qshopCharge' => 740
]
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "http://staging.qshop.ng/apiv2/{transactionId}"
payload := strings.NewReader("{\n \"breakdown\": {\n \"aggregate\": 816.875,\n \"amount\": 18500,\n \"bankCharge\": 76.875,\n \"payout\": 17683.125,\n \"qshopCharge\": 740\n }\n}")
req, _ := http.NewRequest("PATCH", url, payload)
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.patch("http://staging.qshop.ng/apiv2/{transactionId}")
.header("Content-Type", "application/json")
.body("{\n \"breakdown\": {\n \"aggregate\": 816.875,\n \"amount\": 18500,\n \"bankCharge\": 76.875,\n \"payout\": 17683.125,\n \"qshopCharge\": 740\n }\n}")
.asString();require 'uri'
require 'net/http'
url = URI("http://staging.qshop.ng/apiv2/{transactionId}")
http = Net::HTTP.new(url.host, url.port)
request = Net::HTTP::Patch.new(url)
request["Content-Type"] = 'application/json'
request.body = "{\n \"breakdown\": {\n \"aggregate\": 816.875,\n \"amount\": 18500,\n \"bankCharge\": 76.875,\n \"payout\": 17683.125,\n \"qshopCharge\": 740\n }\n}"
response = http.request(request)
puts response.read_body{
"data": {
"__v": 0,
"_id": "62ea571509bd2e9be7de9edd",
"amount": 18500,
"breakdown": {
"aggregate": 816.875,
"amount": 18500,
"bankCharge": 76.875,
"payout": 17683.125,
"qshopCharge": 740
},
"createdAt": "2022-08-03T11:08:05.921Z",
"meta": {
"accountNumber": "9978770274",
"channelId": "1",
"currency": "NGN",
"feeAmount": "500",
"initiationTranRef": "",
"sessionId": "0000042103011805345648005069266636442358859209",
"settledAmount": "18500",
"settlementId": "202210301006807500001631",
"sourceAccountName": "CASAFINA CREDIT-EASY LOAN",
"sourceAccountNumber": "2093566866",
"sourceBankName": "UNITED BANK FOR AFRICA",
"tranDateTime": "2021-03-01 18:06:20.000",
"tranRemarks": "FROM UBA/ CASAFINA CREDIT-EASY LOAN-NIP/SEYI OLUFEMI/CASAFINA CAP/0000042103015656180548005069266636",
"transactionAmount": "19000",
"vatAmount": "0",
"virtualBankAccount": {
"__v": 0,
"_id": "62ea499b1908431f9caf727b",
"accountName": "MERCHANT(Qshop/Egoli)",
"accountNumber": "9978770274",
"created": "2022-08-03T10:10:35.667Z",
"isUsed": true,
"meta": {
"account_name": "MERCHANT(Qshop/Egoli)",
"account_number": "9978770274",
"bvn": "",
"requestSuccessful": true,
"responseCode": "00",
"responseMessage": "Reserved Account Generated Successfully"
},
"order": "62ea498e1908431f9caf7276",
"orderTotal": 22000,
"platformKey": "providus",
"platformName": "Providus",
"shop": "61a956d91a113f7e13c45c15"
}
},
"paymentPlatform": "61a6406c18ae008099246a8d",
"shop": "61a956d91a113f7e13c45c15",
"status": "62597ba57b912008a11e1206",
"statusLogs": [
"62597ba57b912008a11e1206"
],
"transactionReference": "202210301006807500001631",
"type": "order-payment",
"virtualBankAccount": "62ea499b1908431f9caf727b"
},
"msg": "Transaction updated",
"success": true
}Was this page helpful?
⌘I