curl --request POST \
--url https://apistagepc.grogov.us/api/partner/v1/vault \
--header 'Authorization: <api-key>' \
--header 'Content-Type: application/json' \
--data '
{
"portalId": "a1b2c3d4-e5f6-7890-abcd-ef1234567890",
"paymentMethod": {
"type": "card",
"cardNumber": "4111111111111111",
"expirationDate": "12/30",
"cvv": "123"
},
"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"
}
}
}
'import requests
url = "https://apistagepc.grogov.us/api/partner/v1/vault"
payload = {
"portalId": "a1b2c3d4-e5f6-7890-abcd-ef1234567890",
"paymentMethod": {
"type": "card",
"cardNumber": "4111111111111111",
"expirationDate": "12/30",
"cvv": "123"
},
"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"
}
}
}
headers = {
"Authorization": "<api-key>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({
portalId: 'a1b2c3d4-e5f6-7890-abcd-ef1234567890',
paymentMethod: {
type: 'card',
cardNumber: '4111111111111111',
expirationDate: '12/30',
cvv: '123'
},
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'
}
}
})
};
fetch('https://apistagepc.grogov.us/api/partner/v1/vault', 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/vault",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'portalId' => 'a1b2c3d4-e5f6-7890-abcd-ef1234567890',
'paymentMethod' => [
'type' => 'card',
'cardNumber' => '4111111111111111',
'expirationDate' => '12/30',
'cvv' => '123'
],
'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'
]
]
]),
CURLOPT_HTTPHEADER => [
"Authorization: <api-key>",
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://apistagepc.grogov.us/api/partner/v1/vault"
payload := strings.NewReader("{\n \"portalId\": \"a1b2c3d4-e5f6-7890-abcd-ef1234567890\",\n \"paymentMethod\": {\n \"type\": \"card\",\n \"cardNumber\": \"4111111111111111\",\n \"expirationDate\": \"12/30\",\n \"cvv\": \"123\"\n },\n \"payer\": {\n \"firstName\": \"Jane\",\n \"lastName\": \"Doe\",\n \"email\": \"jane.doe@example.com\",\n \"phone\": \"+15551234567\",\n \"address\": {\n \"line1\": \"<string>\",\n \"line2\": \"<string>\",\n \"city\": \"<string>\",\n \"state\": \"<string>\",\n \"zip\": \"<string>\",\n \"country\": \"US\"\n }\n }\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "<api-key>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://apistagepc.grogov.us/api/partner/v1/vault")
.header("Authorization", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"portalId\": \"a1b2c3d4-e5f6-7890-abcd-ef1234567890\",\n \"paymentMethod\": {\n \"type\": \"card\",\n \"cardNumber\": \"4111111111111111\",\n \"expirationDate\": \"12/30\",\n \"cvv\": \"123\"\n },\n \"payer\": {\n \"firstName\": \"Jane\",\n \"lastName\": \"Doe\",\n \"email\": \"jane.doe@example.com\",\n \"phone\": \"+15551234567\",\n \"address\": {\n \"line1\": \"<string>\",\n \"line2\": \"<string>\",\n \"city\": \"<string>\",\n \"state\": \"<string>\",\n \"zip\": \"<string>\",\n \"country\": \"US\"\n }\n }\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://apistagepc.grogov.us/api/partner/v1/vault")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"portalId\": \"a1b2c3d4-e5f6-7890-abcd-ef1234567890\",\n \"paymentMethod\": {\n \"type\": \"card\",\n \"cardNumber\": \"4111111111111111\",\n \"expirationDate\": \"12/30\",\n \"cvv\": \"123\"\n },\n \"payer\": {\n \"firstName\": \"Jane\",\n \"lastName\": \"Doe\",\n \"email\": \"jane.doe@example.com\",\n \"phone\": \"+15551234567\",\n \"address\": {\n \"line1\": \"<string>\",\n \"line2\": \"<string>\",\n \"city\": \"<string>\",\n \"state\": \"<string>\",\n \"zip\": \"<string>\",\n \"country\": \"US\"\n }\n }\n}"
response = http.request(request)
puts response.read_body{
"success": false,
"message": "Payment was declined.",
"details": {
"code": "PAYMENT_DECLINED",
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a"
}
}Store a card (not supported)
Storing cards is not supported. Every request returns 501 VAULT_NOT_SUPPORTED. Charging a stored card with paymentMethod.type: "vault" on POST /payments also returns 501 VAULT_NOT_SUPPORTED.
curl --request POST \
--url https://apistagepc.grogov.us/api/partner/v1/vault \
--header 'Authorization: <api-key>' \
--header 'Content-Type: application/json' \
--data '
{
"portalId": "a1b2c3d4-e5f6-7890-abcd-ef1234567890",
"paymentMethod": {
"type": "card",
"cardNumber": "4111111111111111",
"expirationDate": "12/30",
"cvv": "123"
},
"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"
}
}
}
'import requests
url = "https://apistagepc.grogov.us/api/partner/v1/vault"
payload = {
"portalId": "a1b2c3d4-e5f6-7890-abcd-ef1234567890",
"paymentMethod": {
"type": "card",
"cardNumber": "4111111111111111",
"expirationDate": "12/30",
"cvv": "123"
},
"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"
}
}
}
headers = {
"Authorization": "<api-key>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({
portalId: 'a1b2c3d4-e5f6-7890-abcd-ef1234567890',
paymentMethod: {
type: 'card',
cardNumber: '4111111111111111',
expirationDate: '12/30',
cvv: '123'
},
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'
}
}
})
};
fetch('https://apistagepc.grogov.us/api/partner/v1/vault', 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/vault",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'portalId' => 'a1b2c3d4-e5f6-7890-abcd-ef1234567890',
'paymentMethod' => [
'type' => 'card',
'cardNumber' => '4111111111111111',
'expirationDate' => '12/30',
'cvv' => '123'
],
'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'
]
]
]),
CURLOPT_HTTPHEADER => [
"Authorization: <api-key>",
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://apistagepc.grogov.us/api/partner/v1/vault"
payload := strings.NewReader("{\n \"portalId\": \"a1b2c3d4-e5f6-7890-abcd-ef1234567890\",\n \"paymentMethod\": {\n \"type\": \"card\",\n \"cardNumber\": \"4111111111111111\",\n \"expirationDate\": \"12/30\",\n \"cvv\": \"123\"\n },\n \"payer\": {\n \"firstName\": \"Jane\",\n \"lastName\": \"Doe\",\n \"email\": \"jane.doe@example.com\",\n \"phone\": \"+15551234567\",\n \"address\": {\n \"line1\": \"<string>\",\n \"line2\": \"<string>\",\n \"city\": \"<string>\",\n \"state\": \"<string>\",\n \"zip\": \"<string>\",\n \"country\": \"US\"\n }\n }\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "<api-key>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://apistagepc.grogov.us/api/partner/v1/vault")
.header("Authorization", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"portalId\": \"a1b2c3d4-e5f6-7890-abcd-ef1234567890\",\n \"paymentMethod\": {\n \"type\": \"card\",\n \"cardNumber\": \"4111111111111111\",\n \"expirationDate\": \"12/30\",\n \"cvv\": \"123\"\n },\n \"payer\": {\n \"firstName\": \"Jane\",\n \"lastName\": \"Doe\",\n \"email\": \"jane.doe@example.com\",\n \"phone\": \"+15551234567\",\n \"address\": {\n \"line1\": \"<string>\",\n \"line2\": \"<string>\",\n \"city\": \"<string>\",\n \"state\": \"<string>\",\n \"zip\": \"<string>\",\n \"country\": \"US\"\n }\n }\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://apistagepc.grogov.us/api/partner/v1/vault")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"portalId\": \"a1b2c3d4-e5f6-7890-abcd-ef1234567890\",\n \"paymentMethod\": {\n \"type\": \"card\",\n \"cardNumber\": \"4111111111111111\",\n \"expirationDate\": \"12/30\",\n \"cvv\": \"123\"\n },\n \"payer\": {\n \"firstName\": \"Jane\",\n \"lastName\": \"Doe\",\n \"email\": \"jane.doe@example.com\",\n \"phone\": \"+15551234567\",\n \"address\": {\n \"line1\": \"<string>\",\n \"line2\": \"<string>\",\n \"city\": \"<string>\",\n \"state\": \"<string>\",\n \"zip\": \"<string>\",\n \"country\": \"US\"\n }\n }\n}"
response = http.request(request)
puts response.read_body{
"success": false,
"message": "Payment was declined.",
"details": {
"code": "PAYMENT_DECLINED",
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a"
}
}Authorizations
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.
Body
The ID of an agency's payment configuration in GroGov. The portal determines the payment gateway and service fee configuration. GroGov provides the portal IDs your API account can access.
"a1b2c3d4-e5f6-7890-abcd-ef1234567890"
- Option 1
- Option 2
Show child attributes
Show child attributes
Show child attributes
Show child attributes