referencedPaymentId
is the value return in the id
JSON field. Capture an authorization
A capture is used to request clearing for previously authorized funds. A capture request is performed against a previous preauthorization (PA) payment by referencing itspayment.id
and sending a POST request over HTTPS to the /payments/{id} endpoint. Captures can be for full or partial amounts and multiple capture requests against the same PA are allowed. Refund a payment
A refund is performed against a previous payment, referencing itspayment.id
by sending a POST request over HTTPS to the /payments/{id} endpoint. A refund can be performed against debit (DB) or captured preauthorization (PA->CP) payment types. Where supported, the amount field can be used to process a partial or full amount.
Reverse a payment
A reversal is performed against a previous payment, referencing itspayment.id
by sending a POST request over HTTPS to the /payments/{id} endpoint. A reversal can be sent against debit (DB) or preauthorization (PA) payment types. When reversing a card payment and if sent within the time-frame the authorization is not captured yet, the reversal causes an authorization reversal request to be sent to the card issuer to clear the funds held against the authorization. NOTE: A full reversal does not require the amount or currency to be sent. If the acquirer supports it, partial reversals are also possible. In this latter case amount and currency must be specified in the request.
Rebill a payment
A rebill is performed against a previous payment, referencing its payment.id
by sending a POST request over HTTPS to the /payments/{id} endpoint. A rebill can be sent against a prior debit (DB payment type) transaction. The rebill transaction payment type must be RB (paymentType=RB).
Try it out
Operation:
curl https://test.como.world/v1/payments/{id} \ -d "entityId=8ac7a4c7761cdc4a01761f34e767099c" \ -d "amount=10.00" \ -d "currency=EUR" \ -d "paymentType=CP" \ -H "Authorization: Bearer OGFjN2E0Yzc3NjFjZGM0YTAxNzYxZjM0ZTc5YjA5YTB8V0duZ0Q4WGFYRg=="
https://test.como.world/v1/payments/
public Dictionary<string, dynamic> Request() { Dictionary<string, dynamic> responseData; string data="entityId=8ac7a4c7761cdc4a01761f34e767099c" + "&amount=10.00" + "¤cy=EUR" + "&paymentType=CP"; string url = "https://test.como.world/v1/payments/{id}"; byte[] buffer = Encoding.ASCII.GetBytes(data); HttpWebRequest request = (HttpWebRequest)HttpWebRequest.Create(url); request.Method = "POST"; request.Headers["Authorization"] = "Bearer OGFjN2E0Yzc3NjFjZGM0YTAxNzYxZjM0ZTc5YjA5YTB8V0duZ0Q4WGFYRg=="; request.ContentType = "application/x-www-form-urlencoded"; Stream PostData = request.GetRequestStream(); PostData.Write(buffer, 0, buffer.Length); PostData.Close(); using (HttpWebResponse response = (HttpWebResponse)request.GetResponse()) { Stream dataStream = response.GetResponseStream(); StreamReader reader = new StreamReader(dataStream); var s = new JavaScriptSerializer(); responseData = s.Deserialize<Dictionary<string, dynamic>>(reader.ReadToEnd()); reader.Close(); dataStream.Close(); } return responseData; } responseData = Request()["result"]["description"];
https://test.como.world/v1/payments/
import groovy.json.JsonSlurper public static String request() { def data = "entityId=8ac7a4c7761cdc4a01761f34e767099c" + "&amount=10.00" + "¤cy=EUR" + "&paymentType=CP" def url = "https://test.como.world/v1/payments/{id}".toURL() def connection = url.openConnection() connection.setRequestMethod("POST") connection.setRequestProperty("Authorization","Bearer OGFjN2E0Yzc3NjFjZGM0YTAxNzYxZjM0ZTc5YjA5YTB8V0duZ0Q4WGFYRg==") connection.doOutput = true connection.outputStream << data def json = new JsonSlurper().parseText(connection.inputStream.text) json } println request()
https://test.como.world/v1/payments/
private String request() throws IOException { URL url = new URL("https://test.como.world/v1/payments/{id}"); HttpsURLConnection conn = (HttpsURLConnection) url.openConnection(); conn.setRequestMethod("POST"); conn.setRequestProperty("Authorization", "Bearer OGFjN2E0Yzc3NjFjZGM0YTAxNzYxZjM0ZTc5YjA5YTB8V0duZ0Q4WGFYRg=="); conn.setDoInput(true); conn.setDoOutput(true); String data = "" + "entityId=8ac7a4c7761cdc4a01761f34e767099c" + "&amount=10.00" + "¤cy=EUR" + "&paymentType=CP"; DataOutputStream wr = new DataOutputStream(conn.getOutputStream()); wr.writeBytes(data); wr.flush(); wr.close(); int responseCode = conn.getResponseCode(); InputStream is; if (responseCode >= 400) is = conn.getErrorStream(); else is = conn.getInputStream(); return IOUtils.toString(is); }
https://test.como.world/v1/payments/
const https = require('https'); const querystring = require('querystring'); const request = async () => { const path='/v1/payments/{id}'; const data = querystring.stringify({ 'entityId':'8ac7a4c7761cdc4a01761f34e767099c', 'amount':'10.00', 'currency':'EUR', 'paymentType':'CP' }); const options = { port: 443, host: 'test.como.world', path: path, method: 'POST', headers: { 'Content-Type': 'application/x-www-form-urlencoded', 'Content-Length': data.length, 'Authorization':'Bearer OGFjN2E0Yzc3NjFjZGM0YTAxNzYxZjM0ZTc5YjA5YTB8V0duZ0Q4WGFYRg==' } }; return new Promise((resolve, reject) => { const postRequest = https.request(options, function(res) { const buf = []; res.on('data', chunk => { buf.push(Buffer.from(chunk)); }); res.on('end', () => { const jsonString = Buffer.concat(buf).toString('utf8'); try { resolve(JSON.parse(jsonString)); } catch (error) { reject(error); } }); }); postRequest.on('error', reject); postRequest.write(data); postRequest.end(); }); }; request().then(console.log).catch(console.error);
https://test.como.world/v1/payments/
function request() { $url = "https://test.como.world/v1/payments/{id}"; $data = "entityId=8ac7a4c7761cdc4a01761f34e767099c" . "&amount=10.00" . "¤cy=EUR" . "&paymentType=CP"; $ch = curl_init(); curl_setopt($ch, CURLOPT_URL, $url); curl_setopt($ch, CURLOPT_HTTPHEADER, array( 'Authorization:Bearer OGFjN2E0Yzc3NjFjZGM0YTAxNzYxZjM0ZTc5YjA5YTB8V0duZ0Q4WGFYRg==')); curl_setopt($ch, CURLOPT_POST, 1); curl_setopt($ch, CURLOPT_POSTFIELDS, $data); curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, false);// this should be set to true in production curl_setopt($ch, CURLOPT_RETURNTRANSFER, true); $responseData = curl_exec($ch); if(curl_errno($ch)) { return curl_error($ch); } curl_close($ch); return $responseData; } $responseData = request();
https://test.como.world/v1/payments/
try: from urllib.parse import urlencode from urllib.request import build_opener, Request, HTTPHandler from urllib.error import HTTPError, URLError except ImportError: from urllib import urlencode from urllib2 import build_opener, Request, HTTPHandler, HTTPError, URLError import json def request(): url = "https://test.como.world/v1/payments/{id}" data = { 'entityId' : '8ac7a4c7761cdc4a01761f34e767099c', 'amount' : '10.00', 'currency' : 'EUR', 'paymentType' : 'CP' } try: opener = build_opener(HTTPHandler) request = Request(url, data=urlencode(data).encode('utf-8')) request.add_header('Authorization', 'Bearer OGFjN2E0Yzc3NjFjZGM0YTAxNzYxZjM0ZTc5YjA5YTB8V0duZ0Q4WGFYRg==') request.get_method = lambda: 'POST' response = opener.open(request) return json.loads(response.read()); except HTTPError as e: return json.loads(e.read()); except URLError as e: return e.reason; responseData = request(); print(responseData);
https://test.como.world/v1/payments/
require 'net/https' require 'uri' require 'json' def request() uri = URI('https://test.como.world/v1/payments/{id}') http = Net::HTTP.new(uri.host, uri.port) http.use_ssl = true req = Net::HTTP::Post.new(uri.path) req.set_form_data({ 'entityId' => '8ac7a4c7761cdc4a01761f34e767099c', 'amount' => '10.00', 'currency' => 'EUR', 'paymentType' => 'CP' }) res = http.request(req) return JSON.parse(res.body) end puts request()
https://test.como.world/v1/payments/
def initialPayment : String = { val url = "https://test.como.world/v1/payments/{id}" val data = ("" + "entityId=8ac7a4c7761cdc4a01761f34e767099c" + "&amount=10.00" + "¤cy=EUR" + "&paymentType=CP" ) val conn = new URL(url).openConnection() conn match { case secureConn: HttpsURLConnection => secureConn.setRequestMethod("POST") case _ => throw new ClassCastException } conn.setDoInput(true) conn.setDoOutput(true) IOUtils.write(data, conn.getOutputStream()) conn.setRequestProperty("Authorization", "Bearer OGFjN2E0Yzc3NjFjZGM0YTAxNzYxZjM0ZTc5YjA5YTB8V0duZ0Q4WGFYRg==") conn.connect() if (conn.getResponseCode() >= 400) { return IOUtils.toString(conn.getErrorStream()) } else { return IOUtils.toString(conn.getInputStream()) } }
https://test.como.world/v1/payments/
Public Function Request() As Dictionary(Of String, Object) Dim url As String = "https://test.como.world/v1/payments/{id}" Dim data As String = "" + "entityId=8ac7a4c7761cdc4a01761f34e767099c" + "&amount=10.00" + "¤cy=EUR" + "&paymentType=CP" Dim req As WebRequest = WebRequest.Create(url) req.Method = "POST" req.Headers.Add("Authorization", "Bearer OGFjN2E0Yzc3NjFjZGM0YTAxNzYxZjM0ZTc5YjA5YTB8V0duZ0Q4WGFYRg==") req.ContentType = "application/x-www-form-urlencoded" Dim byteArray As Byte() = Encoding.UTF8.GetBytes(data) req.ContentLength = byteArray.Length Dim dataStream As Stream = req.GetRequestStream() dataStream.Write(byteArray, 0, byteArray.Length) dataStream.Close() Dim res As WebResponse = req.GetResponse() Dim resStream = res.GetResponseStream() Dim reader As New StreamReader(resStream) Dim response As String = reader.ReadToEnd() reader.Close() resStream.Close() res.Close() Dim jss As New System.Web.Script.Serialization.JavaScriptSerializer() Dim dict As Dictionary(Of String, Object) = jss.Deserialize(Of Dictionary(Of String, Object))(response) Return dict End Function responseData = Request()("result")("description")
https://test.como.world/v1/payments/ 8a82944a4cc25ebf014cc2c782423202
Authorization | Bearer OGFjN2E0Yzc3NjFjZGM0YTAxNzYxZjM0ZTc5YjA5YTB8V0duZ0Q4WGFYRg== |
entityId=8ac7a4c7761cdc4a01761f34e767099c
amount=10.00
currency=EUR
paymentType=CP
Operation:
Refund
https://test.como.world/v1/payments/
curl https://test.como.world/v1/payments/{id} \ -d "entityId=8ac7a4c7761cdc4a01761f34e767099c" \ -d "amount=10.00" \ -d "currency=EUR" \ -d "paymentType=RF" \ -H "Authorization: Bearer OGFjN2E0Yzc3NjFjZGM0YTAxNzYxZjM0ZTc5YjA5YTB8V0duZ0Q4WGFYRg=="
https://test.como.world/v1/payments/
public Dictionary<string, dynamic> Request() { Dictionary<string, dynamic> responseData; string data="entityId=8ac7a4c7761cdc4a01761f34e767099c" + "&amount=10.00" + "¤cy=EUR" + "&paymentType=RF"; string url = "https://test.como.world/v1/payments/{id}"; byte[] buffer = Encoding.ASCII.GetBytes(data); HttpWebRequest request = (HttpWebRequest)HttpWebRequest.Create(url); request.Method = "POST"; request.Headers["Authorization"] = "Bearer OGFjN2E0Yzc3NjFjZGM0YTAxNzYxZjM0ZTc5YjA5YTB8V0duZ0Q4WGFYRg=="; request.ContentType = "application/x-www-form-urlencoded"; Stream PostData = request.GetRequestStream(); PostData.Write(buffer, 0, buffer.Length); PostData.Close(); using (HttpWebResponse response = (HttpWebResponse)request.GetResponse()) { Stream dataStream = response.GetResponseStream(); StreamReader reader = new StreamReader(dataStream); var s = new JavaScriptSerializer(); responseData = s.Deserialize<Dictionary<string, dynamic>>(reader.ReadToEnd()); reader.Close(); dataStream.Close(); } return responseData; } responseData = Request()["result"]["description"];
https://test.como.world/v1/payments/
import groovy.json.JsonSlurper public static String request() { def data = "entityId=8ac7a4c7761cdc4a01761f34e767099c" + "&amount=10.00" + "¤cy=EUR" + "&paymentType=RF" def url = "https://test.como.world/v1/payments/{id}".toURL() def connection = url.openConnection() connection.setRequestMethod("POST") connection.setRequestProperty("Authorization","Bearer OGFjN2E0Yzc3NjFjZGM0YTAxNzYxZjM0ZTc5YjA5YTB8V0duZ0Q4WGFYRg==") connection.doOutput = true connection.outputStream << data def json = new JsonSlurper().parseText(connection.inputStream.text) json } println request()
https://test.como.world/v1/payments/
private String request() throws IOException { URL url = new URL("https://test.como.world/v1/payments/{id}"); HttpsURLConnection conn = (HttpsURLConnection) url.openConnection(); conn.setRequestMethod("POST"); conn.setRequestProperty("Authorization", "Bearer OGFjN2E0Yzc3NjFjZGM0YTAxNzYxZjM0ZTc5YjA5YTB8V0duZ0Q4WGFYRg=="); conn.setDoInput(true); conn.setDoOutput(true); String data = "" + "entityId=8ac7a4c7761cdc4a01761f34e767099c" + "&amount=10.00" + "¤cy=EUR" + "&paymentType=RF"; DataOutputStream wr = new DataOutputStream(conn.getOutputStream()); wr.writeBytes(data); wr.flush(); wr.close(); int responseCode = conn.getResponseCode(); InputStream is; if (responseCode >= 400) is = conn.getErrorStream(); else is = conn.getInputStream(); return IOUtils.toString(is); }
https://test.como.world/v1/payments/
const https = require('https'); const querystring = require('querystring'); const request = async () => { const path='/v1/payments/{id}'; const data = querystring.stringify({ 'entityId':'8ac7a4c7761cdc4a01761f34e767099c', 'amount':'10.00', 'currency':'EUR', 'paymentType':'RF' }); const options = { port: 443, host: 'test.como.world', path: path, method: 'POST', headers: { 'Content-Type': 'application/x-www-form-urlencoded', 'Content-Length': data.length, 'Authorization':'Bearer OGFjN2E0Yzc3NjFjZGM0YTAxNzYxZjM0ZTc5YjA5YTB8V0duZ0Q4WGFYRg==' } }; return new Promise((resolve, reject) => { const postRequest = https.request(options, function(res) { const buf = []; res.on('data', chunk => { buf.push(Buffer.from(chunk)); }); res.on('end', () => { const jsonString = Buffer.concat(buf).toString('utf8'); try { resolve(JSON.parse(jsonString)); } catch (error) { reject(error); } }); }); postRequest.on('error', reject); postRequest.write(data); postRequest.end(); }); }; request().then(console.log).catch(console.error);
https://test.como.world/v1/payments/
function request() { $url = "https://test.como.world/v1/payments/{id}"; $data = "entityId=8ac7a4c7761cdc4a01761f34e767099c" . "&amount=10.00" . "¤cy=EUR" . "&paymentType=RF"; $ch = curl_init(); curl_setopt($ch, CURLOPT_URL, $url); curl_setopt($ch, CURLOPT_HTTPHEADER, array( 'Authorization:Bearer OGFjN2E0Yzc3NjFjZGM0YTAxNzYxZjM0ZTc5YjA5YTB8V0duZ0Q4WGFYRg==')); curl_setopt($ch, CURLOPT_POST, 1); curl_setopt($ch, CURLOPT_POSTFIELDS, $data); curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, false);// this should be set to true in production curl_setopt($ch, CURLOPT_RETURNTRANSFER, true); $responseData = curl_exec($ch); if(curl_errno($ch)) { return curl_error($ch); } curl_close($ch); return $responseData; } $responseData = request();
https://test.como.world/v1/payments/
try: from urllib.parse import urlencode from urllib.request import build_opener, Request, HTTPHandler from urllib.error import HTTPError, URLError except ImportError: from urllib import urlencode from urllib2 import build_opener, Request, HTTPHandler, HTTPError, URLError import json def request(): url = "https://test.como.world/v1/payments/{id}" data = { 'entityId' : '8ac7a4c7761cdc4a01761f34e767099c', 'amount' : '10.00', 'currency' : 'EUR', 'paymentType' : 'RF' } try: opener = build_opener(HTTPHandler) request = Request(url, data=urlencode(data).encode('utf-8')) request.add_header('Authorization', 'Bearer OGFjN2E0Yzc3NjFjZGM0YTAxNzYxZjM0ZTc5YjA5YTB8V0duZ0Q4WGFYRg==') request.get_method = lambda: 'POST' response = opener.open(request) return json.loads(response.read()); except HTTPError as e: return json.loads(e.read()); except URLError as e: return e.reason; responseData = request(); print(responseData);
https://test.como.world/v1/payments/
require 'net/https' require 'uri' require 'json' def request() uri = URI('https://test.como.world/v1/payments/{id}') http = Net::HTTP.new(uri.host, uri.port) http.use_ssl = true req = Net::HTTP::Post.new(uri.path) req.set_form_data({ 'entityId' => '8ac7a4c7761cdc4a01761f34e767099c', 'amount' => '10.00', 'currency' => 'EUR', 'paymentType' => 'RF' }) res = http.request(req) return JSON.parse(res.body) end puts request()
https://test.como.world/v1/payments/
def initialPayment : String = { val url = "https://test.como.world/v1/payments/{id}" val data = ("" + "entityId=8ac7a4c7761cdc4a01761f34e767099c" + "&amount=10.00" + "¤cy=EUR" + "&paymentType=RF" ) val conn = new URL(url).openConnection() conn match { case secureConn: HttpsURLConnection => secureConn.setRequestMethod("POST") case _ => throw new ClassCastException } conn.setDoInput(true) conn.setDoOutput(true) IOUtils.write(data, conn.getOutputStream()) conn.setRequestProperty("Authorization", "Bearer OGFjN2E0Yzc3NjFjZGM0YTAxNzYxZjM0ZTc5YjA5YTB8V0duZ0Q4WGFYRg==") conn.connect() if (conn.getResponseCode() >= 400) { return IOUtils.toString(conn.getErrorStream()) } else { return IOUtils.toString(conn.getInputStream()) } }
https://test.como.world/v1/payments/
Public Function Request() As Dictionary(Of String, Object) Dim url As String = "https://test.como.world/v1/payments/{id}" Dim data As String = "" + "entityId=8ac7a4c7761cdc4a01761f34e767099c" + "&amount=10.00" + "¤cy=EUR" + "&paymentType=RF" Dim req As WebRequest = WebRequest.Create(url) req.Method = "POST" req.Headers.Add("Authorization", "Bearer OGFjN2E0Yzc3NjFjZGM0YTAxNzYxZjM0ZTc5YjA5YTB8V0duZ0Q4WGFYRg==") req.ContentType = "application/x-www-form-urlencoded" Dim byteArray As Byte() = Encoding.UTF8.GetBytes(data) req.ContentLength = byteArray.Length Dim dataStream As Stream = req.GetRequestStream() dataStream.Write(byteArray, 0, byteArray.Length) dataStream.Close() Dim res As WebResponse = req.GetResponse() Dim resStream = res.GetResponseStream() Dim reader As New StreamReader(resStream) Dim response As String = reader.ReadToEnd() reader.Close() resStream.Close() res.Close() Dim jss As New System.Web.Script.Serialization.JavaScriptSerializer() Dim dict As Dictionary(Of String, Object) = jss.Deserialize(Of Dictionary(Of String, Object))(response) Return dict End Function responseData = Request()("result")("description")
https://test.como.world/v1/payments/ 8a82944a4cc25ebf014cc2c782423202
Authorization | Bearer OGFjN2E0Yzc3NjFjZGM0YTAxNzYxZjM0ZTc5YjA5YTB8V0duZ0Q4WGFYRg== |
entityId=8ac7a4c7761cdc4a01761f34e767099c
amount=10.00
currency=EUR
paymentType=RF
Operation:
Reversal
https://test.como.world/v1/payments/
curl https://test.como.world/v1/payments/{id} \ -d "entityId=8ac7a4c7761cdc4a01761f34e767099c" \ -d "paymentType=RV" \ -H "Authorization: Bearer OGFjN2E0Yzc3NjFjZGM0YTAxNzYxZjM0ZTc5YjA5YTB8V0duZ0Q4WGFYRg=="
https://test.como.world/v1/payments/
public Dictionary<string, dynamic> Request() { Dictionary<string, dynamic> responseData; string data="entityId=8ac7a4c7761cdc4a01761f34e767099c" + "&paymentType=RV"; string url = "https://test.como.world/v1/payments/{id}"; byte[] buffer = Encoding.ASCII.GetBytes(data); HttpWebRequest request = (HttpWebRequest)HttpWebRequest.Create(url); request.Method = "POST"; request.Headers["Authorization"] = "Bearer OGFjN2E0Yzc3NjFjZGM0YTAxNzYxZjM0ZTc5YjA5YTB8V0duZ0Q4WGFYRg=="; request.ContentType = "application/x-www-form-urlencoded"; Stream PostData = request.GetRequestStream(); PostData.Write(buffer, 0, buffer.Length); PostData.Close(); using (HttpWebResponse response = (HttpWebResponse)request.GetResponse()) { Stream dataStream = response.GetResponseStream(); StreamReader reader = new StreamReader(dataStream); var s = new JavaScriptSerializer(); responseData = s.Deserialize<Dictionary<string, dynamic>>(reader.ReadToEnd()); reader.Close(); dataStream.Close(); } return responseData; } responseData = Request()["result"]["description"];
https://test.como.world/v1/payments/
import groovy.json.JsonSlurper public static String request() { def data = "entityId=8ac7a4c7761cdc4a01761f34e767099c" + "&paymentType=RV" def url = "https://test.como.world/v1/payments/{id}".toURL() def connection = url.openConnection() connection.setRequestMethod("POST") connection.setRequestProperty("Authorization","Bearer OGFjN2E0Yzc3NjFjZGM0YTAxNzYxZjM0ZTc5YjA5YTB8V0duZ0Q4WGFYRg==") connection.doOutput = true connection.outputStream << data def json = new JsonSlurper().parseText(connection.inputStream.text) json } println request()
https://test.como.world/v1/payments/
private String request() throws IOException { URL url = new URL("https://test.como.world/v1/payments/{id}"); HttpsURLConnection conn = (HttpsURLConnection) url.openConnection(); conn.setRequestMethod("POST"); conn.setRequestProperty("Authorization", "Bearer OGFjN2E0Yzc3NjFjZGM0YTAxNzYxZjM0ZTc5YjA5YTB8V0duZ0Q4WGFYRg=="); conn.setDoInput(true); conn.setDoOutput(true); String data = "" + "entityId=8ac7a4c7761cdc4a01761f34e767099c" + "&paymentType=RV"; DataOutputStream wr = new DataOutputStream(conn.getOutputStream()); wr.writeBytes(data); wr.flush(); wr.close(); int responseCode = conn.getResponseCode(); InputStream is; if (responseCode >= 400) is = conn.getErrorStream(); else is = conn.getInputStream(); return IOUtils.toString(is); }
https://test.como.world/v1/payments/
const https = require('https'); const querystring = require('querystring'); const request = async () => { const path='/v1/payments/{id}'; const data = querystring.stringify({ 'entityId':'8ac7a4c7761cdc4a01761f34e767099c', 'paymentType':'RV' }); const options = { port: 443, host: 'test.como.world', path: path, method: 'POST', headers: { 'Content-Type': 'application/x-www-form-urlencoded', 'Content-Length': data.length, 'Authorization':'Bearer OGFjN2E0Yzc3NjFjZGM0YTAxNzYxZjM0ZTc5YjA5YTB8V0duZ0Q4WGFYRg==' } }; return new Promise((resolve, reject) => { const postRequest = https.request(options, function(res) { const buf = []; res.on('data', chunk => { buf.push(Buffer.from(chunk)); }); res.on('end', () => { const jsonString = Buffer.concat(buf).toString('utf8'); try { resolve(JSON.parse(jsonString)); } catch (error) { reject(error); } }); }); postRequest.on('error', reject); postRequest.write(data); postRequest.end(); }); }; request().then(console.log).catch(console.error);
https://test.como.world/v1/payments/
function request() { $url = "https://test.como.world/v1/payments/{id}"; $data = "entityId=8ac7a4c7761cdc4a01761f34e767099c" . "&amount=10.00" . "¤cy=EUR" . "&paymentType=RF"; $ch = curl_init(); curl_setopt($ch, CURLOPT_URL, $url); curl_setopt($ch, CURLOPT_HTTPHEADER, array( 'Authorization:Bearer OGFjN2E0Yzc3NjFjZGM0YTAxNzYxZjM0ZTc5YjA5YTB8V0duZ0Q4WGFYRg==')); curl_setopt($ch, CURLOPT_POST, 1); curl_setopt($ch, CURLOPT_POSTFIELDS, $data); curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, false);// this should be set to true in production curl_setopt($ch, CURLOPT_RETURNTRANSFER, true); $responseData = curl_exec($ch); if(curl_errno($ch)) { return curl_error($ch); } curl_close($ch); return $responseData; } $responseData = request();
https://test.como.world/v1/payments/
function request() { $url = "https://test.como.world/v1/payments/{id}"; $data = "entityId=8ac7a4c7761cdc4a01761f34e767099c" . "&paymentType=RV"; $ch = curl_init(); curl_setopt($ch, CURLOPT_URL, $url); curl_setopt($ch, CURLOPT_HTTPHEADER, array( 'Authorization:Bearer OGFjN2E0Yzc3NjFjZGM0YTAxNzYxZjM0ZTc5YjA5YTB8V0duZ0Q4WGFYRg==')); curl_setopt($ch, CURLOPT_POST, 1); curl_setopt($ch, CURLOPT_POSTFIELDS, $data); curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, false);// this should be set to true in production curl_setopt($ch, CURLOPT_RETURNTRANSFER, true); $responseData = curl_exec($ch); if(curl_errno($ch)) { return curl_error($ch); } curl_close($ch); return $responseData; } $responseData = request();
https://test.como.world/v1/payments/
require 'net/https' require 'uri' require 'json' def request() uri = URI('https://test.como.world/v1/payments/{id}') http = Net::HTTP.new(uri.host, uri.port) http.use_ssl = true req = Net::HTTP::Post.new(uri.path) req.set_form_data({ 'entityId' => '8ac7a4c7761cdc4a01761f34e767099c', 'paymentType' => 'RV' }) res = http.request(req) return JSON.parse(res.body) end puts request()
https://test.como.world/v1/payments/
def initialPayment : String = { val url = "https://test.como.world/v1/payments/{id}" val data = ("" + "entityId=8ac7a4c7761cdc4a01761f34e767099c" + "&paymentType=RV" ) val conn = new URL(url).openConnection() conn match { case secureConn: HttpsURLConnection => secureConn.setRequestMethod("POST") case _ => throw new ClassCastException } conn.setDoInput(true) conn.setDoOutput(true) IOUtils.write(data, conn.getOutputStream()) conn.setRequestProperty("Authorization", "Bearer OGFjN2E0Yzc3NjFjZGM0YTAxNzYxZjM0ZTc5YjA5YTB8V0duZ0Q4WGFYRg==") conn.connect() if (conn.getResponseCode() >= 400) { return IOUtils.toString(conn.getErrorStream()) } else { return IOUtils.toString(conn.getInputStream()) } }
https://test.como.world/v1/payments/
Public Function Request() As Dictionary(Of String, Object) Dim url As String = "https://test.como.world/v1/payments/{id}" Dim data As String = "" + "entityId=8ac7a4c7761cdc4a01761f34e767099c" + "&paymentType=RV" Dim req As WebRequest = WebRequest.Create(url) req.Method = "POST" req.Headers.Add("Authorization", "Bearer OGFjN2E0Yzc3NjFjZGM0YTAxNzYxZjM0ZTc5YjA5YTB8V0duZ0Q4WGFYRg==") req.ContentType = "application/x-www-form-urlencoded" Dim byteArray As Byte() = Encoding.UTF8.GetBytes(data) req.ContentLength = byteArray.Length Dim dataStream As Stream = req.GetRequestStream() dataStream.Write(byteArray, 0, byteArray.Length) dataStream.Close() Dim res As WebResponse = req.GetResponse() Dim resStream = res.GetResponseStream() Dim reader As New StreamReader(resStream) Dim response As String = reader.ReadToEnd() reader.Close() resStream.Close() res.Close() Dim jss As New System.Web.Script.Serialization.JavaScriptSerializer() Dim dict As Dictionary(Of String, Object) = jss.Deserialize(Of Dictionary(Of String, Object))(response) Return dict End Function responseData = Request()("result")("description")
https://test.como.world/v1/payments/ 8a82944a4cc25ebf014cc2c782423202
Authorization | Bearer OGFjN2E0Yzc3NjFjZGM0YTAxNzYxZjM0ZTc5YjA5YTB8V0duZ0Q4WGFYRg== |
entityId=8ac7a4c7761cdc4a01761f34e767099c
paymentType=RV
Operation:
Receipt
https://test.como.world/v1/payments/
curl https://test.como.world/v1/payments/{id} \ -d "entityId=8ac7a4c7761cdc4a01761f34e767099c" \ -d "amount=10.00" \ -d "currency=EUR" \ -d "paymentType=RC" \ -H "Authorization: Bearer OGFjN2E0Yzc3NjFjZGM0YTAxNzYxZjM0ZTc5YjA5YTB8V0duZ0Q4WGFYRg=="
https://test.como.world/v1/payments/
public Dictionary<string, dynamic> Request() { Dictionary<string, dynamic> responseData; string data="entityId=8ac7a4c7761cdc4a01761f34e767099c" + "&amount=10.00" + "¤cy=EUR" + "&paymentType=RC"; string url = "https://test.como.world/v1/payments/{id}"; byte[] buffer = Encoding.ASCII.GetBytes(data); HttpWebRequest request = (HttpWebRequest)HttpWebRequest.Create(url); request.Method = "POST"; request.Headers["Authorization"] = "Bearer OGFjN2E0Yzc3NjFjZGM0YTAxNzYxZjM0ZTc5YjA5YTB8V0duZ0Q4WGFYRg=="; request.ContentType = "application/x-www-form-urlencoded"; Stream PostData = request.GetRequestStream(); PostData.Write(buffer, 0, buffer.Length); PostData.Close(); using (HttpWebResponse response = (HttpWebResponse)request.GetResponse()) { Stream dataStream = response.GetResponseStream(); StreamReader reader = new StreamReader(dataStream); var s = new JavaScriptSerializer(); responseData = s.Deserialize<Dictionary<string, dynamic>>(reader.ReadToEnd()); reader.Close(); dataStream.Close(); } return responseData; } responseData = Request()["result"]["description"];
https://test.como.world/v1/payments/
import groovy.json.JsonSlurper public static String request() { def data = "entityId=8ac7a4c7761cdc4a01761f34e767099c" + "&amount=10.00" + "¤cy=EUR" + "&paymentType=RC" def url = "https://test.como.world/v1/payments/{id}".toURL() def connection = url.openConnection() connection.setRequestMethod("POST") connection.setRequestProperty("Authorization","Bearer OGFjN2E0Yzc3NjFjZGM0YTAxNzYxZjM0ZTc5YjA5YTB8V0duZ0Q4WGFYRg==") connection.doOutput = true connection.outputStream << data def json = new JsonSlurper().parseText(connection.inputStream.text) json } println request()
https://test.como.world/v1/payments/
private String request() throws IOException { URL url = new URL("https://test.como.world/v1/payments/{id}"); HttpsURLConnection conn = (HttpsURLConnection) url.openConnection(); conn.setRequestMethod("POST"); conn.setRequestProperty("Authorization", "Bearer OGFjN2E0Yzc3NjFjZGM0YTAxNzYxZjM0ZTc5YjA5YTB8V0duZ0Q4WGFYRg=="); conn.setDoInput(true); conn.setDoOutput(true); String data = "" + "entityId=8ac7a4c7761cdc4a01761f34e767099c" + "&amount=10.00" + "¤cy=EUR" + "&paymentType=RC"; DataOutputStream wr = new DataOutputStream(conn.getOutputStream()); wr.writeBytes(data); wr.flush(); wr.close(); int responseCode = conn.getResponseCode(); InputStream is; if (responseCode >= 400) is = conn.getErrorStream(); else is = conn.getInputStream(); return IOUtils.toString(is); }
https://test.como.world/v1/payments/
const https = require('https'); const querystring = require('querystring'); const request = async () => { const path='/v1/payments/{id}'; const data = querystring.stringify({ 'entityId':'8ac7a4c7761cdc4a01761f34e767099c', 'amount':'10.00', 'currency':'EUR', 'paymentType':'RC' }); const options = { port: 443, host: 'test.como.world', path: path, method: 'POST', headers: { 'Content-Type': 'application/x-www-form-urlencoded', 'Content-Length': data.length, 'Authorization':'Bearer OGFjN2E0Yzc3NjFjZGM0YTAxNzYxZjM0ZTc5YjA5YTB8V0duZ0Q4WGFYRg==' } }; return new Promise((resolve, reject) => { const postRequest = https.request(options, function(res) { const buf = []; res.on('data', chunk => { buf.push(Buffer.from(chunk)); }); res.on('end', () => { const jsonString = Buffer.concat(buf).toString('utf8'); try { resolve(JSON.parse(jsonString)); } catch (error) { reject(error); } }); }); postRequest.on('error', reject); postRequest.write(data); postRequest.end(); }); }; request().then(console.log).catch(console.error);
https://test.como.world/v1/payments/
function request() { $url = "https://test.como.world/v1/payments/{id}"; $data = "entityId=8ac7a4c7761cdc4a01761f34e767099c" . "&amount=10.00" . "¤cy=EUR" . "&paymentType=RC"; $ch = curl_init(); curl_setopt($ch, CURLOPT_URL, $url); curl_setopt($ch, CURLOPT_HTTPHEADER, array( 'Authorization:Bearer OGFjN2E0Yzc3NjFjZGM0YTAxNzYxZjM0ZTc5YjA5YTB8V0duZ0Q4WGFYRg==')); curl_setopt($ch, CURLOPT_POST, 1); curl_setopt($ch, CURLOPT_POSTFIELDS, $data); curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, false);// this should be set to true in production curl_setopt($ch, CURLOPT_RETURNTRANSFER, true); $responseData = curl_exec($ch); if(curl_errno($ch)) { return curl_error($ch); } curl_close($ch); return $responseData; } $responseData = request();
https://test.como.world/v1/payments/
try: from urllib.parse import urlencode from urllib.request import build_opener, Request, HTTPHandler from urllib.error import HTTPError, URLError except ImportError: from urllib import urlencode from urllib2 import build_opener, Request, HTTPHandler, HTTPError, URLError import json def request(): url = "https://test.como.world/v1/payments/{id}" data = { 'entityId' : '8ac7a4c7761cdc4a01761f34e767099c', 'amount' : '10.00', 'currency' : 'EUR', 'paymentType' : 'RC' } try: opener = build_opener(HTTPHandler) request = Request(url, data=urlencode(data).encode('utf-8')) request.add_header('Authorization', 'Bearer OGFjN2E0Yzc3NjFjZGM0YTAxNzYxZjM0ZTc5YjA5YTB8V0duZ0Q4WGFYRg==') request.get_method = lambda: 'POST' response = opener.open(request) return json.loads(response.read()); except HTTPError as e: return json.loads(e.read()); except URLError as e: return e.reason; responseData = request(); print(responseData);
https://test.como.world/v1/payments/
require 'net/https' require 'uri' require 'json' def request() uri = URI('https://test.como.world/v1/payments/{id}') http = Net::HTTP.new(uri.host, uri.port) http.use_ssl = true req = Net::HTTP::Post.new(uri.path) req.set_form_data({ 'entityId' => '8ac7a4c7761cdc4a01761f34e767099c', 'amount' => '10.00', 'currency' => 'EUR', 'paymentType' => 'RC' }) res = http.request(req) return JSON.parse(res.body) end puts request()
https://test.como.world/v1/payments/
def initialPayment : String = { val url = "https://test.como.world/v1/payments/{id}" val data = ("" + "entityId=8ac7a4c7761cdc4a01761f34e767099c" + "&amount=10.00" + "¤cy=EUR" + "&paymentType=RC" ) val conn = new URL(url).openConnection() conn match { case secureConn: HttpsURLConnection => secureConn.setRequestMethod("POST") case _ => throw new ClassCastException } conn.setDoInput(true) conn.setDoOutput(true) IOUtils.write(data, conn.getOutputStream()) conn.setRequestProperty("Authorization", "Bearer OGFjN2E0Yzc3NjFjZGM0YTAxNzYxZjM0ZTc5YjA5YTB8V0duZ0Q4WGFYRg==") conn.connect() if (conn.getResponseCode() >= 400) { return IOUtils.toString(conn.getErrorStream()) } else { return IOUtils.toString(conn.getInputStream()) } }
https://test.como.world/v1/payments/
Public Function Request() As Dictionary(Of String, Object) Dim url As String = "https://test.como.world/v1/payments/{id}" Dim data As String = "" + "entityId=8ac7a4c7761cdc4a01761f34e767099c" + "&amount=10.00" + "¤cy=EUR" + "&paymentType=RC" Dim req As WebRequest = WebRequest.Create(url) req.Method = "POST" req.Headers.Add("Authorization", "Bearer OGFjN2E0Yzc3NjFjZGM0YTAxNzYxZjM0ZTc5YjA5YTB8V0duZ0Q4WGFYRg==") req.ContentType = "application/x-www-form-urlencoded" Dim byteArray As Byte() = Encoding.UTF8.GetBytes(data) req.ContentLength = byteArray.Length Dim dataStream As Stream = req.GetRequestStream() dataStream.Write(byteArray, 0, byteArray.Length) dataStream.Close() Dim res As WebResponse = req.GetResponse() Dim resStream = res.GetResponseStream() Dim reader As New StreamReader(resStream) Dim response As String = reader.ReadToEnd() reader.Close() resStream.Close() res.Close() Dim jss As New System.Web.Script.Serialization.JavaScriptSerializer() Dim dict As Dictionary(Of String, Object) = jss.Deserialize(Of Dictionary(Of String, Object))(response) Return dict End Function responseData = Request()("result")("description")
https://test.como.world/v1/payments/ 8a82944a4cc25ebf014cc2c782423202
Authorization | Bearer OGFjN2E0Yzc3NjFjZGM0YTAxNzYxZjM0ZTc5YjA5YTB8V0duZ0Q4WGFYRg== |
entityId=8ac7a4c7761cdc4a01761f34e767099c
amount=10.00
currency=EUR
paymentType=RC
Credit (stand-alone refund)
A credit is a independent transaction that results in a refund. The difference is that the credit is not associated with a previous transaction and so requires the full payment details to be included in the request.
Try it out
curl https://test.como.world/v1/payments \ -d "entityId=8ac7a4c7761cdc4a01761f34e767099c" \ -d "amount=92.00" \ -d "currency=EUR" \ -d "paymentBrand=VISA" \ -d "paymentType=CD" \ -d "card.number=4200000000000000" \ -d "card.expiryMonth=12" \ -d "card.expiryYear=2022" \ -d "card.holder=Jane Jones" \ -H "Authorization: Bearer OGFjN2E0Yzc3NjFjZGM0YTAxNzYxZjM0ZTc5YjA5YTB8V0duZ0Q4WGFYRg=="
public Dictionary<string, dynamic> Request() { Dictionary<string, dynamic> responseData; string data="entityId=8ac7a4c7761cdc4a01761f34e767099c" + "&amount=92.00" + "¤cy=EUR" + "&paymentBrand=VISA" + "&paymentType=CD" + "&card.number=4200000000000000" + "&card.expiryMonth=12" + "&card.expiryYear=2022" + "&card.holder=Jane Jones"; string url = "https://test.como.world/v1/payments"; byte[] buffer = Encoding.ASCII.GetBytes(data); HttpWebRequest request = (HttpWebRequest)HttpWebRequest.Create(url); request.Method = "POST"; request.Headers["Authorization"] = "Bearer OGFjN2E0Yzc3NjFjZGM0YTAxNzYxZjM0ZTc5YjA5YTB8V0duZ0Q4WGFYRg=="; request.ContentType = "application/x-www-form-urlencoded"; Stream PostData = request.GetRequestStream(); PostData.Write(buffer, 0, buffer.Length); PostData.Close(); using (HttpWebResponse response = (HttpWebResponse)request.GetResponse()) { Stream dataStream = response.GetResponseStream(); StreamReader reader = new StreamReader(dataStream); var s = new JavaScriptSerializer(); responseData = s.Deserialize<Dictionary<string, dynamic>>(reader.ReadToEnd()); reader.Close(); dataStream.Close(); } return responseData; } responseData = Request()["result"]["description"];
import groovy.json.JsonSlurper public static String request() { def data = "entityId=8ac7a4c7761cdc4a01761f34e767099c" + "&amount=92.00" + "¤cy=EUR" + "&paymentBrand=VISA" + "&paymentType=CD" + "&card.number=4200000000000000" + "&card.expiryMonth=12" + "&card.expiryYear=2022" + "&card.holder=Jane Jones" def url = "https://test.como.world/v1/payments".toURL() def connection = url.openConnection() connection.setRequestMethod("POST") connection.setRequestProperty("Authorization","Bearer OGFjN2E0Yzc3NjFjZGM0YTAxNzYxZjM0ZTc5YjA5YTB8V0duZ0Q4WGFYRg==") connection.doOutput = true connection.outputStream << data def json = new JsonSlurper().parseText(connection.inputStream.text) json } println request()
private String request() throws IOException { URL url = new URL("https://test.como.world/v1/payments"); HttpsURLConnection conn = (HttpsURLConnection) url.openConnection(); conn.setRequestMethod("POST"); conn.setRequestProperty("Authorization", "Bearer OGFjN2E0Yzc3NjFjZGM0YTAxNzYxZjM0ZTc5YjA5YTB8V0duZ0Q4WGFYRg=="); conn.setDoInput(true); conn.setDoOutput(true); String data = "" + "entityId=8ac7a4c7761cdc4a01761f34e767099c" + "&amount=92.00" + "¤cy=EUR" + "&paymentBrand=VISA" + "&paymentType=CD" + "&card.number=4200000000000000" + "&card.expiryMonth=12" + "&card.expiryYear=2022" + "&card.holder=Jane Jones"; DataOutputStream wr = new DataOutputStream(conn.getOutputStream()); wr.writeBytes(data); wr.flush(); wr.close(); int responseCode = conn.getResponseCode(); InputStream is; if (responseCode >= 400) is = conn.getErrorStream(); else is = conn.getInputStream(); return IOUtils.toString(is); }
const https = require('https'); const querystring = require('querystring'); const request = async () => { const path='/v1/payments'; const data = querystring.stringify({ 'entityId':'8ac7a4c7761cdc4a01761f34e767099c', 'amount':'92.00', 'currency':'EUR', 'paymentBrand':'VISA', 'paymentType':'CD', 'card.number':'4200000000000000', 'card.expiryMonth':'12', 'card.expiryYear':'2022', 'card.holder':'Jane Jones' }); const options = { port: 443, host: 'test.como.world', path: path, method: 'POST', headers: { 'Content-Type': 'application/x-www-form-urlencoded', 'Content-Length': data.length, 'Authorization':'Bearer OGFjN2E0Yzc3NjFjZGM0YTAxNzYxZjM0ZTc5YjA5YTB8V0duZ0Q4WGFYRg==' } }; return new Promise((resolve, reject) => { const postRequest = https.request(options, function(res) { const buf = []; res.on('data', chunk => { buf.push(Buffer.from(chunk)); }); res.on('end', () => { const jsonString = Buffer.concat(buf).toString('utf8'); try { resolve(JSON.parse(jsonString)); } catch (error) { reject(error); } }); }); postRequest.on('error', reject); postRequest.write(data); postRequest.end(); }); }; request().then(console.log).catch(console.error);
function request() { $url = "https://test.como.world/v1/payments"; $data = "entityId=8ac7a4c7761cdc4a01761f34e767099c" . "&amount=92.00" . "¤cy=EUR" . "&paymentBrand=VISA" . "&paymentType=CD" . "&card.number=4200000000000000" . "&card.expiryMonth=12" . "&card.expiryYear=2022" . "&card.holder=Jane Jones"; $ch = curl_init(); curl_setopt($ch, CURLOPT_URL, $url); curl_setopt($ch, CURLOPT_HTTPHEADER, array( 'Authorization:Bearer OGFjN2E0Yzc3NjFjZGM0YTAxNzYxZjM0ZTc5YjA5YTB8V0duZ0Q4WGFYRg==')); curl_setopt($ch, CURLOPT_POST, 1); curl_setopt($ch, CURLOPT_POSTFIELDS, $data); curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, false);// this should be set to true in production curl_setopt($ch, CURLOPT_RETURNTRANSFER, true); $responseData = curl_exec($ch); if(curl_errno($ch)) { return curl_error($ch); } curl_close($ch); return $responseData; } $responseData = request();
try: from urllib.parse import urlencode from urllib.request import build_opener, Request, HTTPHandler from urllib.error import HTTPError, URLError except ImportError: from urllib import urlencode from urllib2 import build_opener, Request, HTTPHandler, HTTPError, URLError import json def request(): url = "https://test.como.world/v1/payments" data = { 'entityId' : '8ac7a4c7761cdc4a01761f34e767099c', 'amount' : '92.00', 'currency' : 'EUR', 'paymentBrand' : 'VISA', 'paymentType' : 'CD', 'card.number' : '4200000000000000', 'card.expiryMonth' : '12', 'card.expiryYear' : '2022', 'card.holder' : 'Jane Jones' } try: opener = build_opener(HTTPHandler) request = Request(url, data=urlencode(data).encode('utf-8')) request.add_header('Authorization', 'Bearer OGFjN2E0Yzc3NjFjZGM0YTAxNzYxZjM0ZTc5YjA5YTB8V0duZ0Q4WGFYRg==') request.get_method = lambda: 'POST' response = opener.open(request) return json.loads(response.read()); except HTTPError as e: return json.loads(e.read()); except URLError as e: return e.reason; responseData = request(); print(responseData);
require 'net/https' require 'uri' require 'json' def request() uri = URI('https://test.como.world/v1/payments') http = Net::HTTP.new(uri.host, uri.port) http.use_ssl = true req = Net::HTTP::Post.new(uri.path) req.set_form_data({ 'entityId' => '8ac7a4c7761cdc4a01761f34e767099c', 'amount' => '92.00', 'currency' => 'EUR', 'paymentBrand' => 'VISA', 'paymentType' => 'CD', 'card.number' => '4200000000000000', 'card.expiryMonth' => '12', 'card.expiryYear' => '2022', 'card.holder' => 'Jane Jones' }) res = http.request(req) return JSON.parse(res.body) end puts request()
def initialPayment : String = { val url = "https://test.como.world/v1/payments" val data = ("" + "entityId=8ac7a4c7761cdc4a01761f34e767099c" + "&amount=92.00" + "¤cy=EUR" + "&paymentBrand=VISA" + "&paymentType=CD" + "&card.number=4200000000000000" + "&card.expiryMonth=12" + "&card.expiryYear=2022" + "&card.holder=Jane Jones" ) val conn = new URL(url).openConnection() conn match { case secureConn: HttpsURLConnection => secureConn.setRequestMethod("POST") case _ => throw new ClassCastException } conn.setDoInput(true) conn.setDoOutput(true) IOUtils.write(data, conn.getOutputStream()) conn.setRequestProperty("Authorization", "Bearer OGFjN2E0Yzc3NjFjZGM0YTAxNzYxZjM0ZTc5YjA5YTB8V0duZ0Q4WGFYRg==") conn.connect() if (conn.getResponseCode() >= 400) { return IOUtils.toString(conn.getErrorStream()) } else { return IOUtils.toString(conn.getInputStream()) } }
Public Function Request() As Dictionary(Of String, Object) Dim url As String = "https://test.como.world/v1/payments" Dim data As String = "" + "entityId=8ac7a4c7761cdc4a01761f34e767099c" + "&amount=92.00" + "¤cy=EUR" + "&paymentBrand=VISA" + "&paymentType=CD" + "&card.number=4200000000000000" + "&card.expiryMonth=12" + "&card.expiryYear=2022" + "&card.holder=Jane Jones" Dim req As WebRequest = WebRequest.Create(url) req.Method = "POST" req.Headers.Add("Authorization", "Bearer OGFjN2E0Yzc3NjFjZGM0YTAxNzYxZjM0ZTc5YjA5YTB8V0duZ0Q4WGFYRg==") req.ContentType = "application/x-www-form-urlencoded" Dim byteArray As Byte() = Encoding.UTF8.GetBytes(data) req.ContentLength = byteArray.Length Dim dataStream As Stream = req.GetRequestStream() dataStream.Write(byteArray, 0, byteArray.Length) dataStream.Close() Dim res As WebResponse = req.GetResponse() Dim resStream = res.GetResponseStream() Dim reader As New StreamReader(resStream) Dim response As String = reader.ReadToEnd() reader.Close() resStream.Close() res.Close() Dim jss As New System.Web.Script.Serialization.JavaScriptSerializer() Dim dict As Dictionary(Of String, Object) = jss.Deserialize(Of Dictionary(Of String, Object))(response) Return dict End Function responseData = Request()("result")("description")
Authorization | Bearer OGFjN2E0Yzc3NjFjZGM0YTAxNzYxZjM0ZTc5YjA5YTB8V0duZ0Q4WGFYRg== |
entityId=8ac7a4c7761cdc4a01761f34e767099c
amount=92.00
currency=EUR
paymentBrand=VISA
paymentType=CD
card.number=4200000000000000
card.expiryMonth=12
card.expiryYear=2022
card.holder=Jane Jones