Get Payment
curl --request GET \
--url https://api.example.com/wp-json/latepoint-api/v1/payments/{id}import requests
url = "https://api.example.com/wp-json/latepoint-api/v1/payments/{id}"
response = requests.get(url)
print(response.text)const options = {method: 'GET'};
fetch('https://api.example.com/wp-json/latepoint-api/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.example.com/wp-json/latepoint-api/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",
]);
$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.example.com/wp-json/latepoint-api/v1/payments/{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://api.example.com/wp-json/latepoint-api/v1/payments/{id}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.example.com/wp-json/latepoint-api/v1/payments/{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{
"id": "<string>",
"token": "<string>",
"invoice_id": "<string>",
"order_id": "<string>",
"customer_id": "<string>",
"processor": "<string>",
"payment_method": "<string>",
"payment_portion": "<string>",
"kind": "<string>",
"amount": "<string>",
"status": "<string>",
"notes": "<string>",
"receipt_number": "<string>",
"access_key": "<string>",
"created_at": "<string>",
"updated_at": "<string>"
}Payments
Get Payment
Retrieve a specific payment by ID.
GET
/
wp-json
/
latepoint-api
/
v1
/
payments
/
{id}
Get Payment
curl --request GET \
--url https://api.example.com/wp-json/latepoint-api/v1/payments/{id}import requests
url = "https://api.example.com/wp-json/latepoint-api/v1/payments/{id}"
response = requests.get(url)
print(response.text)const options = {method: 'GET'};
fetch('https://api.example.com/wp-json/latepoint-api/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.example.com/wp-json/latepoint-api/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",
]);
$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.example.com/wp-json/latepoint-api/v1/payments/{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://api.example.com/wp-json/latepoint-api/v1/payments/{id}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.example.com/wp-json/latepoint-api/v1/payments/{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{
"id": "<string>",
"token": "<string>",
"invoice_id": "<string>",
"order_id": "<string>",
"customer_id": "<string>",
"processor": "<string>",
"payment_method": "<string>",
"payment_portion": "<string>",
"kind": "<string>",
"amount": "<string>",
"status": "<string>",
"notes": "<string>",
"receipt_number": "<string>",
"access_key": "<string>",
"created_at": "<string>",
"updated_at": "<string>"
}Path Parameters
integer
required
The unique identifier of the payment
Example Request
GET /wp-json/latepoint-api/v1/payments/1
X-API-Key: YOUR_API_KEY
Content-Type: application/json
Example Response
{
"success": true,
"data": {
"id": "1",
"token": "TXN123456",
"invoice_id": "5",
"order_id": "10",
"customer_id": "3",
"processor": "stripe",
"payment_method": "credit_card",
"payment_portion": "full",
"kind": "capture",
"amount": "150.00",
"status": "completed",
"notes": "Payment processed successfully",
"receipt_number": "RCP12345",
"access_key": "ak_1234567890abcdef",
"created_at": "2024-01-15 10:30:00",
"updated_at": "2024-01-15 10:30:00"
}
}
Response Fields
string
Unique identifier for the payment
string
Payment transaction token
string
Associated invoice ID
string
Associated order ID
string
Customer who made the payment
string
Payment processor used (stripe, paypal, etc.)
string
Payment method used (credit_card, paypal, etc.)
string
Portion of payment (full, deposit, balance)
string
Type of transaction (capture, refund, etc.)
string
Payment amount
string
Payment status (succeeded, processing, failed)
string
Additional notes about the payment
string
Receipt number for the payment
string
Access key for payment verification
string
Payment creation timestamp
string
Payment last update timestamp
