API reference / Admin

post/v1/admin/applications/{id}/government-payment

Hand the government its fee

Operation
adminRequestGovernmentPayment
Authentication
API key

Queues the second money movement: the applicant has already paid Haavisa the government fee plus our service fee, and this hands the government’s share over.

**Nothing is charged by this call.** The worker logs into the portal and opens a Stripe Checkout session against the application’s government reference, recording the session id on the application detail. The card is entered by an operator on the government’s own Stripe page — that page cannot be driven by an API, and we do not store cards.

Refused with a 400 when the application has no government reference: nothing has been filed, so no portal holds a fee for it.

Request

Parameters

idpathrequiredstring

Responses

202Requested. The worker has not opened the session yet.
idstringnullrequired

The `government_payments` row. Null only if it was already paid.

statusstringrequired

Always `requested`: the worker has not opened the Stripe session yet, and nothing has been charged — the card is entered by an operator on the government’s own Stripe page.

400The request body or query failed validation.
errorobjectrequired
401No key, an unknown key, a revoked key, or a key whose tenant is not active. All four return an identical body on purpose: distinguishing them would let a caller discover which partners we have.
errorobjectrequired
403`projects:write` is required. No partner key is ever issued this scope.
errorobjectrequired
404Not found, or not yours. A resource belonging to another tenant answers 404 rather than 403, because 403 would confirm the record exists.
errorobjectrequired

Example

curl
curl -X POST https://api.haavisa.com/v1/admin/applications/<id>/government-payment \
  -H "Authorization: Bearer $HAAVISA_API_KEY"

More in Admin

Something unclear? The eligibility guide explains the model behind the answers; the errors guide covers the envelope.