Update session (e.g. amount changed)
const url = 'https://api.govifi.com/v1/hosted-sessions/example';const options = { method: 'PATCH', headers: { 'X-Payment-Account-Uid': 'example', Authorization: 'Bearer <token>', 'Content-Type': 'application/json' }, body: '{"amount":1,"line_items":[{"description":"example","amount":1,"quantity":1,"metadata":{}}]}'};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}curl --request PATCH \ --url https://api.govifi.com/v1/hosted-sessions/example \ --header 'Authorization: Bearer <token>' \ --header 'Content-Type: application/json' \ --header 'X-Payment-Account-Uid: example' \ --data '{ "amount": 1, "line_items": [ { "description": "example", "amount": 1, "quantity": 1, "metadata": {} } ] }'Authorizations
Section titled “Authorizations ”Parameters
Section titled “ Parameters ”Path Parameters
Section titled “Path Parameters ”Header Parameters
Section titled “Header Parameters ”Identifies the tenant (payment account) for the server-side, Cognito-admin-authenticated operations (create / update / expire). Same header /api/paymentaccounts uses.
Request Body required
Section titled “Request Body required ”object
object
Cents
object
Responses
Section titled “ Responses ”Updated
Sanitized config returned to the component (session-credential safe)
object
Capability scope of the credential reading this session.
object
Cents
object
object
Hydrated only when customer_id is set. Sanitized — no full PAN.
object
Visa | mastercard | amex | discover (cards only)
ACH only
HTML allowed
Server-decided fraud challenge the payer must satisfy before confirm (RFC rfc-fraud-challenges.md). Null = no challenge required. Browser-safe — site_key is public and delivery_hint is masked; contains no PII.
object
Public key for hcaptcha/turnstile.
Masked destination for sms/email, e.g. --1234.
Sms/email: whether a verification code has already been dispatched.
Example
{ "status": "active", "scope": "payment", "line_items": [ { "quantity": 1 } ], "layout": "hosted", "setup_future_usage": "off", "saved_methods": [ { "type": "card", "account_type": "checking" } ], "challenge": { "type": "hcaptcha" }}