> ## Documentation Index
> Fetch the complete documentation index at: https://docs.grogov.us/llms.txt
> Use this file to discover all available pages before exploring further.

# Introduction

> Accept payments from your application using GroGov's server-to-server API.

Use the Partner Payments API to create, refund, void, and retrieve payments from your backend. You can accept payments within your application without redirecting the payer to a GroGov checkout page. To let GroGov collect the card instead, use [hosted checkout](/guides/hosted-checkout/overview).

<CardGroup cols={2}>
  <Card title="Quickstart" icon="bolt" href="/guides/quickstart">
    Create your first sandbox payment.
  </Card>

  <Card title="Authentication" icon="lock" href="/guides/authentication">
    Authenticate requests with an API key or access token.
  </Card>

  <Card title="Payment lifecycle" icon="arrow-right" href="/guides/payment-lifecycle">
    Payment statuses and when to void or refund.
  </Card>

  <Card title="Sandbox access" icon="flask" href="/guides/sandbox-keys-and-portals">
    Request a sandbox API key, portal IDs, and test cards.
  </Card>

  <Card title="Hosted checkout" icon="credit-card" href="/guides/hosted-checkout/overview">
    Send the payer to a GroGov checkout page.
  </Card>
</CardGroup>

## What you can do in v1

* Quote the service fee before you charge.
* Create a payment containing one or more line items using card details or a supported card token.
* Refund all or part of a payment, optionally including the service fee.
* Void a payment before its batch settles.
* Retrieve a payment by its `id`.
* List payments associated with your API account, filtered by portal, status, and date range, with cursor pagination.
* Receive [webhook events](/guides/webhooks) when GroGov staff refund a payment or a cardholder disputes a payment.

<Note>
  Authorizing payments for later capture returns `501 CAPTURE_NOT_SUPPORTED`. Storing cards and charging stored cards return `501 VAULT_NOT_SUPPORTED`. Line-item refunds, ACH, e-check, Apple Pay, and Google Pay are not supported.

  The API does not expose settlement, batch, or deposit endpoints. Use the payment retrieval and listing endpoints for reconciliation.
</Note>

## Payments and portals

A **payment** is one charge, identified by its `id`. Its line items describe what the payer paid for. The **payer** is the person making the payment, and the **agency** receives the payment.

A **portal** is an agency's payment configuration in GroGov. It determines the payment gateway and service fee configuration used for a payment. GroGov provides the `portalId` values your API account can access.

The **service fee** is added to the payment amount. See [Amounts and fees](/guides/amounts-fees-pagination) for calculation details.

## Base URLs

| Environment | Base URL |
| - | - |
| Sandbox | `https://apistagepc.grogov.us` |
| Production | Contact support for live-payment access once your partner agreement is active. |

All examples use the sandbox at `https://apistagepc.grogov.us`. Sandbox payments do not move real money. Request credentials and test data through [Sandbox access](/guides/sandbox-keys-and-portals).

## Conventions

**Response envelope.** Responses use a JSON envelope. A successful call returns:

```json theme={null}
{ 
  "success": true, 
  "data": { ... } 
}
```

Payment errors include `details.code`. Authentication failures can omit `details`. See [Errors](/guides/errors).

A payment error returns:

```json theme={null}
{ 
  "success": false, 
  "message": "Human-readable description.", 
  "details": { 
    "code": "ERROR_CODE" 
  } 
}
```

**Amounts are integer minor units (cents).** Every money field's name ends in `Cents` (`amountCents`, `serviceFeeCents`, …) and holds an integer number of cents: `100` = $1.00, `10000` = $100.00. There are no decimals anywhere in the API.

**Currency.** `currency` is always `USD` in v1. Include it when creating a payment.


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.