Get a payment
curl --request GET \
--url https://apistagepc.grogov.us/api/partner/v1/payments/{id} \
--header 'Authorization: <api-key>'import requests
url = "https://apistagepc.grogov.us/api/partner/v1/payments/{id}"
headers = {"Authorization": "<api-key>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: '<api-key>'}};
fetch('https://apistagepc.grogov.us/api/partner/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://apistagepc.grogov.us/api/partner/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: <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://apistagepc.grogov.us/api/partner/v1/payments/{id}"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("Authorization", "<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://apistagepc.grogov.us/api/partner/v1/payments/{id}")
.header("Authorization", "<api-key>")
.asString();require 'uri'
require 'net/http'
url = URI("https://apistagepc.grogov.us/api/partner/v1/payments/{id}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["Authorization"] = '<api-key>'
response = http.request(request)
puts response.read_body{
"success": true,
"data": {
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"status": "succeeded",
"captureMode": "sale",
"currency": "USD",
"amountCents": 10000,
"serviceFeeCents": 300,
"totalChargedCents": 10300,
"refundedAmountCents": 0,
"remainingRefundableAmountCents": 10300,
"authorizedAmountCents": 10300,
"capturedAmountCents": 0,
"confirmationNumber": "PP-1710000000000",
"portalId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"payer": {
"firstName": "Jane",
"lastName": "Doe",
"email": "jane.doe@example.com",
"phone": "+15551234567",
"address": {
"line1": "<string>",
"line2": "<string>",
"city": "<string>",
"state": "<string>",
"zip": "<string>",
"country": "US"
}
},
"paymentMethod": {
"type": "card_token",
"brand": "Visa",
"last4": "4242"
},
"gateway": {
"transactionId": "4938271649",
"authCode": "123456"
},
"lineItems": [
{
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"amountCents": 5000,
"serviceFeeCents": 150,
"status": "succeeded",
"refundedAmountCents": 0,
"remainingRefundableAmountCents": 5000,
"referenceId": "CASE-2024-00123",
"description": "Court filing fee",
"metadata": {}
}
],
"expiresAt": "2023-11-07T05:31:56Z",
"capturedAt": "2023-11-07T05:31:56Z",
"createdAt": "2023-11-07T05:31:56Z",
"updatedAt": "2023-11-07T05:31:56Z"
},
"message": "<string>"
}{
"success": false,
"message": "Payment was declined.",
"details": {
"code": "PAYMENT_DECLINED",
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a"
}
}Payments
Get a payment
Retrieve a payment by its id.
GET
/
api
/
partner
/
v1
/
payments
/
{id}
Get a payment
curl --request GET \
--url https://apistagepc.grogov.us/api/partner/v1/payments/{id} \
--header 'Authorization: <api-key>'import requests
url = "https://apistagepc.grogov.us/api/partner/v1/payments/{id}"
headers = {"Authorization": "<api-key>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: '<api-key>'}};
fetch('https://apistagepc.grogov.us/api/partner/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://apistagepc.grogov.us/api/partner/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: <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://apistagepc.grogov.us/api/partner/v1/payments/{id}"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("Authorization", "<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://apistagepc.grogov.us/api/partner/v1/payments/{id}")
.header("Authorization", "<api-key>")
.asString();require 'uri'
require 'net/http'
url = URI("https://apistagepc.grogov.us/api/partner/v1/payments/{id}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["Authorization"] = '<api-key>'
response = http.request(request)
puts response.read_body{
"success": true,
"data": {
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"status": "succeeded",
"captureMode": "sale",
"currency": "USD",
"amountCents": 10000,
"serviceFeeCents": 300,
"totalChargedCents": 10300,
"refundedAmountCents": 0,
"remainingRefundableAmountCents": 10300,
"authorizedAmountCents": 10300,
"capturedAmountCents": 0,
"confirmationNumber": "PP-1710000000000",
"portalId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"payer": {
"firstName": "Jane",
"lastName": "Doe",
"email": "jane.doe@example.com",
"phone": "+15551234567",
"address": {
"line1": "<string>",
"line2": "<string>",
"city": "<string>",
"state": "<string>",
"zip": "<string>",
"country": "US"
}
},
"paymentMethod": {
"type": "card_token",
"brand": "Visa",
"last4": "4242"
},
"gateway": {
"transactionId": "4938271649",
"authCode": "123456"
},
"lineItems": [
{
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"amountCents": 5000,
"serviceFeeCents": 150,
"status": "succeeded",
"refundedAmountCents": 0,
"remainingRefundableAmountCents": 5000,
"referenceId": "CASE-2024-00123",
"description": "Court filing fee",
"metadata": {}
}
],
"expiresAt": "2023-11-07T05:31:56Z",
"capturedAt": "2023-11-07T05:31:56Z",
"createdAt": "2023-11-07T05:31:56Z",
"updatedAt": "2023-11-07T05:31:56Z"
},
"message": "<string>"
}{
"success": false,
"message": "Payment was declined.",
"details": {
"code": "PAYMENT_DECLINED",
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a"
}
}Authorizations
ApiKeyAuthBearerAuth
Send your API key as Authorization: ApiKey pc_<your-key>. The API also accepts the key without the ApiKey prefix. API keys authenticate requests to /api/partner/v1/*. Contact GroGov support to rotate your key or deactivate your API account. Rotation invalidates the previous key. Account deactivation blocks both API keys and access tokens.