Retrieve a payment
curl --request GET \
--url https://api.vori.com/v1/payments/{id} \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.vori.com/v1/payments/{id}"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api.vori.com/v1/payments/{id}', 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 => "https://api.vori.com/v1/payments/{id}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://api.vori.com/v1/payments/{id}"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("Authorization", "Bearer <token>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://api.vori.com/v1/payments/{id}")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.vori.com/v1/payments/{id}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["Authorization"] = 'Bearer <token>'
response = http.request(request)
puts response.read_body{
"id": "<string>",
"amount": "199.99",
"amount_details": {
"line_items": [
{
"quantity": 2,
"unit_cost": "199.99",
"commodity_code": "50131700",
"product_code": "SKU002",
"product_name": "Organic bananas",
"unit_of_measure": "box"
}
],
"tax": {
"total_tax_amount": "199.99"
}
},
"amount_refunded": "199.99",
"created_at": "2023-11-07T05:31:56Z",
"idempotency_key": "<string>",
"metadata": {
"order_source": "shopify",
"fulfillment_id": "88213"
},
"mode": "live",
"payment_details": {
"order_reference": "PO15938"
},
"payment_method": {
"brand": "american_express",
"last4": "1111",
"type": "ach_debit"
},
"processor": "datacap",
"status": "authorized",
"store_id": "<string>",
"updated_at": "2023-11-07T05:31:56Z"
}{
"error_code": "insufficient_permissions",
"error_details": {
"action": "*",
"resource": "*"
}
}Payments
Retrieve a payment
Reads a payment back, including the status of the charge and the card it was taken from.
GET
/
v1
/
payments
/
{id}
Retrieve a payment
curl --request GET \
--url https://api.vori.com/v1/payments/{id} \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.vori.com/v1/payments/{id}"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api.vori.com/v1/payments/{id}', 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 => "https://api.vori.com/v1/payments/{id}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://api.vori.com/v1/payments/{id}"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("Authorization", "Bearer <token>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://api.vori.com/v1/payments/{id}")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.vori.com/v1/payments/{id}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["Authorization"] = 'Bearer <token>'
response = http.request(request)
puts response.read_body{
"id": "<string>",
"amount": "199.99",
"amount_details": {
"line_items": [
{
"quantity": 2,
"unit_cost": "199.99",
"commodity_code": "50131700",
"product_code": "SKU002",
"product_name": "Organic bananas",
"unit_of_measure": "box"
}
],
"tax": {
"total_tax_amount": "199.99"
}
},
"amount_refunded": "199.99",
"created_at": "2023-11-07T05:31:56Z",
"idempotency_key": "<string>",
"metadata": {
"order_source": "shopify",
"fulfillment_id": "88213"
},
"mode": "live",
"payment_details": {
"order_reference": "PO15938"
},
"payment_method": {
"brand": "american_express",
"last4": "1111",
"type": "ach_debit"
},
"processor": "datacap",
"status": "authorized",
"store_id": "<string>",
"updated_at": "2023-11-07T05:31:56Z"
}{
"error_code": "insufficient_permissions",
"error_details": {
"action": "*",
"resource": "*"
}
}Payments and refunds are in beta. Contact Vori Support to enable them for your account. Until they are enabled, these endpoints answer
403 Forbidden.Authorizations
Response
A card payment taken through the Vori API on behalf of a store. One payment is one charge attempt, and a payment is never edited once the processor has answered.
Where the payment stands: captured once the amount was taken from the card, authorized while the processor only holds it, and failed when the card was refused. A payment the processor has not answered for yet is not served at all: sending the same request again with the same idempotency_key and the same token settles it.
Available options:
authorized, captured, failed Was this page helpful?