Amounts
All monetary values are integer cents inUSD. There is no decimal representation.
Every money field, in requests and responses, is an integer number of cents and its name ends in
Cents. A request that sends a field named amount is refused with 400 VALIDATION_ERROR.
When creating a payment, amountCents must equal the sum of all lineItems[].amountCents values, and every amount must be a positive integer. A mismatch returns 400 VALIDATION_ERROR. A payment has between 1 and 50 line items.
Service fees
GroGov calculates the service fee from the portal’s configuration and adds it toamountCents. You cannot override the agency’s service fee configuration.
A portal is an agency’s payment configuration, selected with portalId. The principal is the payment amount before the service fee.
Quote the fee before charging
GET /fees/quote?portalId=<your-portal-id>&amountCents=<amount> returns the service fee for the specified portal and payment amount. The quote uses the same calculation as the payment.
portalId or amountCents returns 400 VALIDATION_ERROR; a portal your account may not use returns 403 PORTAL_ACCESS_DENIED. The quote is not a reservation: if the portal’s fee configuration changes before you charge, the charge uses the new fee.
The payment response includes these amounts:
Each line item carries its pro-rated share of the fee in
serviceFeeCents; the shares add up to the payment’s serviceFeeCents.
Listing payments
GET /payments returns payments associated with your API account, newest first.
Query parameters
Paging
Each response carriesnextCursor. While it is not null, pass it back as cursor, with the same filters, to get the next page. On the last page nextCursor is null. Treat the cursor as opaque: an invalid cursor returns 400 VALIDATION_ERROR, as does an unknown status.
There is no referenceId filter; filter on lineItems[].referenceId in your own code.