---
title: "Generate form data to redirect the customer to the gateway"
method: POST
path: "/1.0/kb/paymentGateways/hosted/form/{accountId}"
tags: ["PaymentGateway"]
---

# Generate form data to redirect the customer to the gateway

`POST /1.0/kb/paymentGateways/hosted/form/{accountId}`

## Path parameters

- `accountId` string, uuid, required

## Query parameters

- `paymentMethodId` string, uuid
- `controlPluginName` string[]
- `pluginProperty` string[]

## Headers

- `X-Killbill-CreatedBy` string, required
- `X-Killbill-Reason` string
- `X-Killbill-Comment` string

## Request body

- HostedPaymentPageFields
  - `formFields` PluginProperty[]
    - `key` string
    - `value` string
    - `isUpdatable` boolean

## Response `200`

successful operation

- HostedPaymentPageFormDescriptor
  - `kbAccountId` string, uuid
  - `formMethod` string
  - `formUrl` string
  - `formFields` object
  - `properties` object
  - `auditLogs` AuditLog[]
    - `changeType` string
    - `changeDate` string, date-time
    - `objectType` 'ACCOUNT' | 'ACCOUNT_EMAIL' | 'BLOCKING_STATES' | 'BUNDLE' | 'CUSTOM_FIELD' | 'INVOICE' | 'PAYMENT' | 'TRANSACTION' | 'INVOICE_ITEM' | 'INVOICE_PAYMENT' | 'SUBSCRIPTION' | 'SUBSCRIPTION_EVENT' | 'SERVICE_BROADCAST' | 'PAYMENT_ATTEMPT' | 'PAYMENT_METHOD' | 'TAG' | 'TAG_DEFINITION' | 'TENANT' | 'TENANT_KVS'
    - `objectId` string, uuid
    - `changedBy` string
    - `reasonCode` string
    - `comments` string
    - `userToken` string
    - `history` Entity
      - `id` string, uuid
      - `updatedDate` string, date-time
      - `createdDate` string, date-time

## Other responses

- `404` — Account not found

---

[API](https://skmtc.net/killbill/apis/kill-bill.md) · [All operations](https://skmtc.net/killbill/apis/kill-bill/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/killbill/kill-bill/revisions/0fb95d23caf5/schema)
