Get one-time-payment checkout details (public)
curl --request GET \
--url https://demo-api-harmony.compago.com/api/one-time-payment/{id}import requests
url = "https://demo-api-harmony.compago.com/api/one-time-payment/{id}"
response = requests.get(url)
print(response.text)const options = {method: 'GET'};
fetch('https://demo-api-harmony.compago.com/api/one-time-payment/{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://demo-api-harmony.compago.com/api/one-time-payment/{id}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
]);
$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://demo-api-harmony.compago.com/api/one-time-payment/{id}"
req, _ := http.NewRequest("GET", url, nil)
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://demo-api-harmony.compago.com/api/one-time-payment/{id}")
.asString();require 'uri'
require 'net/http'
url = URI("https://demo-api-harmony.compago.com/api/one-time-payment/{id}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
response = http.request(request)
puts response.read_body{
"status": "PENDING",
"expired": true,
"id": "aaaaaaaa-bbbb-cccc-dddd-eeeeeeeeeeee",
"amount": 123,
"currency": "<string>",
"expiresAt": "2023-11-07T05:31:56Z",
"homepageUrl": "<string>",
"organization": {
"name": "<string>",
"business": {
"websiteURL": "<string>"
}
}
}One-time payments
Find by ID
The checkout view of a one-time payment, used by the hosted payment page. This endpoint is PUBLIC: it takes no API key, because the customer’s browser has to load it before paying. Anyone holding the id can read it, and once the payment is no longer payable it returns only the fields needed to render an expired or completed state.
For the merchant view of a one-time payment, scoped to your organization and authenticated with your API key, use GET /v1/one-time-payment/{id} instead.
GET
/
one-time-payment
/
{id}
Get one-time-payment checkout details (public)
curl --request GET \
--url https://demo-api-harmony.compago.com/api/one-time-payment/{id}import requests
url = "https://demo-api-harmony.compago.com/api/one-time-payment/{id}"
response = requests.get(url)
print(response.text)const options = {method: 'GET'};
fetch('https://demo-api-harmony.compago.com/api/one-time-payment/{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://demo-api-harmony.compago.com/api/one-time-payment/{id}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
]);
$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://demo-api-harmony.compago.com/api/one-time-payment/{id}"
req, _ := http.NewRequest("GET", url, nil)
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://demo-api-harmony.compago.com/api/one-time-payment/{id}")
.asString();require 'uri'
require 'net/http'
url = URI("https://demo-api-harmony.compago.com/api/one-time-payment/{id}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
response = http.request(request)
puts response.read_body{
"status": "PENDING",
"expired": true,
"id": "aaaaaaaa-bbbb-cccc-dddd-eeeeeeeeeeee",
"amount": 123,
"currency": "<string>",
"expiresAt": "2023-11-07T05:31:56Z",
"homepageUrl": "<string>",
"organization": {
"name": "<string>",
"business": {
"websiteURL": "<string>"
}
}
}Path Parameters
Response
Details of the one-time payment