Start a hosted checkout
Creates a checkout and sends the payer to it. Submit it as an HTML form post from the payer’s browser, which follows the redirect. Or send it as JSON from your server without following redirects, and send the payer to the Location it returns. The answer is always a 303 redirect, never a JSON body: to the checkout page or to a failure address.
Each request creates a new checkout. Its link works until it is paid or expires_at passes, whichever comes first.
Body
Starts a hosted checkout. In a form post, nest fields with brackets: items[0][id], items[0][amount], metadata[account].
The portal GroGov gave you for hosted checkout
Your reference for this checkout. It comes back on the result.
1 - 64"INV-10293"
1 - 100 elementsA heading shown to the payer. Must not contain a URL.
1 - 80"Court fees"
Shown on the confirm step and pre-fills the cardholder name, which the payer can change. The payment records the name the payer submits.
200Stored with the payment when the payer does not enter an email of their own. Not shown to the payer; the emailed receipt goes to the address the payer enters.
Stored with the payment when the payer does not enter a phone of their own. Not shown to the payer.
50Where the payer goes after paying. Must be https and on the portal's allowlist. Defaults to the portal's configured return address.
"https://partner.example.com/checkout/return"
Where the payer goes on cancellation or a failed request. Must be https and on the portal's allowlist. Defaults to the portal's configured cancel address.
"https://partner.example.com/checkout/cancel"
When the checkout link stops working. An ISO 8601 time in the future, ending in Z or a UTC offset. Defaults to the portal's link lifetime, 24 hours unless the agency set another; a later time is shortened to that lifetime, not refused.
Your own data, at most 8 KB as JSON. It is stored with the checkout and not shown to the payer.
Response
Always a redirect. On success, to the checkout page. On failure, to cancel_url with HostedCheckoutFailedResult parameters, or to the GroGov error page with ?code=<HostedCheckoutErrorCode> when there is no usable cancel_url.