Get a payment
curl --request GET \
--url https://demo-api-harmony.compago.com/api/developer/v1/payment/{id} \
--header 'x-api-key: <api-key>'import requests
url = "https://demo-api-harmony.compago.com/api/developer/v1/payment/{id}"
headers = {"x-api-key": "<api-key>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {'x-api-key': '<api-key>'}};
fetch('https://demo-api-harmony.compago.com/api/developer/v1/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/developer/v1/payment/{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 => [
"x-api-key: <api-key>"
],
]);
$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/developer/v1/payment/{id}"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("x-api-key", "<api-key>")
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/developer/v1/payment/{id}")
.header("x-api-key", "<api-key>")
.asString();require 'uri'
require 'net/http'
url = URI("https://demo-api-harmony.compago.com/api/developer/v1/payment/{id}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["x-api-key"] = '<api-key>'
response = http.request(request)
puts response.read_body{
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"status": "CONFIRMED",
"amount": 123,
"currency": "<string>",
"createdAt": "2023-11-07T05:31:56Z",
"operationCode": 123,
"type": "<string>",
"fee": 123,
"terms": 123,
"paidTerms": 123,
"periodicity": "<string>",
"financingMethod": "<string>",
"source": "<string>",
"refundedAt": "2023-11-07T05:31:56Z",
"heldAmount": 123,
"heldAt": "2023-11-07T05:31:56Z",
"capturedAt": "2023-11-07T05:31:56Z",
"holdReleasedAt": "2023-11-07T05:31:56Z",
"holdExpiresAt": "2023-11-07T05:31:56Z",
"holdExpired": true,
"holdDaysRemaining": 123,
"card": {
"lastFourDigits": "<string>",
"network": "<string>",
"fundingSource": "<string>",
"issuingBank": "<string>"
},
"customer": {
"firstName": "<string>",
"lastName": "<string>",
"email": "<string>",
"phoneNumber": "<string>"
},
"paymentLinkId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"paymentIntentId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"oneTimePaymentId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"paymentMethodId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"subscriptionId": "3c90c3cc-0d44-4b50-8888-8dd25736052a"
}{
"message": "<string>",
"code": "<string>"
}{
"message": "<string>",
"code": "<string>"
}{
"message": "<string>",
"code": "<string>"
}{
"message": "<string>",
"code": "<string>"
}{
"message": "<string>",
"code": "<string>"
}Payments
Get a payment
A single payment. Answers 404 when the id belongs to another organization.
GET
/
developer
/
v1
/
payment
/
{id}
Get a payment
curl --request GET \
--url https://demo-api-harmony.compago.com/api/developer/v1/payment/{id} \
--header 'x-api-key: <api-key>'import requests
url = "https://demo-api-harmony.compago.com/api/developer/v1/payment/{id}"
headers = {"x-api-key": "<api-key>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {'x-api-key': '<api-key>'}};
fetch('https://demo-api-harmony.compago.com/api/developer/v1/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/developer/v1/payment/{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 => [
"x-api-key: <api-key>"
],
]);
$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/developer/v1/payment/{id}"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("x-api-key", "<api-key>")
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/developer/v1/payment/{id}")
.header("x-api-key", "<api-key>")
.asString();require 'uri'
require 'net/http'
url = URI("https://demo-api-harmony.compago.com/api/developer/v1/payment/{id}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["x-api-key"] = '<api-key>'
response = http.request(request)
puts response.read_body{
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"status": "CONFIRMED",
"amount": 123,
"currency": "<string>",
"createdAt": "2023-11-07T05:31:56Z",
"operationCode": 123,
"type": "<string>",
"fee": 123,
"terms": 123,
"paidTerms": 123,
"periodicity": "<string>",
"financingMethod": "<string>",
"source": "<string>",
"refundedAt": "2023-11-07T05:31:56Z",
"heldAmount": 123,
"heldAt": "2023-11-07T05:31:56Z",
"capturedAt": "2023-11-07T05:31:56Z",
"holdReleasedAt": "2023-11-07T05:31:56Z",
"holdExpiresAt": "2023-11-07T05:31:56Z",
"holdExpired": true,
"holdDaysRemaining": 123,
"card": {
"lastFourDigits": "<string>",
"network": "<string>",
"fundingSource": "<string>",
"issuingBank": "<string>"
},
"customer": {
"firstName": "<string>",
"lastName": "<string>",
"email": "<string>",
"phoneNumber": "<string>"
},
"paymentLinkId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"paymentIntentId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"oneTimePaymentId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"paymentMethodId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"subscriptionId": "3c90c3cc-0d44-4b50-8888-8dd25736052a"
}{
"message": "<string>",
"code": "<string>"
}{
"message": "<string>",
"code": "<string>"
}{
"message": "<string>",
"code": "<string>"
}{
"message": "<string>",
"code": "<string>"
}{
"message": "<string>",
"code": "<string>"
}Authorizations
Path Parameters
Response
Success.
Available options:
CONFIRMED, CANCELLED, REFUNDED, HELD, HOLD_RELEASED, HOLD_EXPIRED The reference printed on receipts and shown in the dashboard.
CARD_PRESENT or CARD_NOT_PRESENT.
The percentage fee charged to this merchant on this payment.
Installments agreed. 1 for a single payment.
Installments already settled to the merchant.
Where the payment originated, e.g. SHAREPAY_PAYMENT_LINK.
What the bank authorized. Differs from amount after a partial capture.
When the authorization lapses.
Only meaningful while the payment is HELD.
Only set while the payment is HELD.
The card, masked. The full number and the stored token are never returned.
Show child attributes
Show child attributes
Show child attributes
Show child attributes