POST
PaymentForms.Add
Create a payment form template (Settings → Payment forms + modal). Mirrors dashboard Setting2::add_payment_form insert. Requires owner or member-admin.
Permissions
- User must be logged in with a valid bearer token.
- Returned or changed records are limited by the user permissions, team access, folder access, and account settings.
Action
- Creates a PaymentForms record or sends the requested data after validation.
Push Service
No push is sent because this function only reads data or returns helper information.
Automation
No automation is run for this function.
Special Instructions
- Required: form_name, amount, invoice_setting_id, payment_gatway, iteam_type, iteam_id (unless allow_wild_card_product=1 for product).
- iteam_type: product, order, appointment_type, appointment_group, subscription.
- required_fields must include at least email or mobile (default name+mobile).
- payment_type_data is built from installment/HK flags when omitted, same as dashboard.
- For product/order flows send regular_installments_document_type; kesher product without installments stores document in document_type column.
- Use PaymentForms.DocumentTypes.List for allowed document dropdown values.
- Use InvoiceSettings.List for invoice_setting_id and account payment gateways for payment_gatway.
Required Parameters
| Name | Type | Sample | Explanation |
|---|---|---|---|
form_namepost | string | Level transition payment | Form name. Alias: name. |
amountpost | string | 65 | Default amount. Must be > 0 unless ask_to_customer=1. |
invoice_setting_idpost | int | 3 | Invoice company id from InvoiceSettings.List. |
payment_gatwaypost | int | 7 | Payment gateway id. Alias: payment_gateway. |
iteam_typepost | string | product | Item type. Alias: item_type. |
iteam_idpost | int | 120 | Linked item id. Aliases: payment_item_id, item_id. Optional for product when allow_wild_card_product=1. |
Optional Parameters
| Name | Type | Sample | What it gives |
|---|---|---|---|
document_typepost | string | receipt | Legacy/subscription document type (payment_forms.document_type column). |
regular_installments_document_typepost | string | receipt | Document type for product/order flows (stored in payment_type_data JSON). |
ask_to_customerpost | int | 0 | Let customer enter amount. |
change_value_with_customerpost | int | 0 | Allow customer to change amount. |
need_to_show_company_idpost | int | 0 | Do not let create document without company id. |
allow_wild_card_productpost | int | 0 | Allow wildcard product (product type only). |
required_fieldspost | json | ["name","mobile"] | Required public fields: name, email, mobile. |
allow_installmentspost | int | 0 | Allow installments. |
max_installmentspost | int | 12 | Max installments when allow_installments=1. |
make_monthly_invoicepost | int | 0 | Make monthly invoice for installments. |
allow_standing_order_hkpost | int | 0 | Allow standing order HK (kesher/nedarim). |
max_installments_hkpost | int | 12 | Max HK installments. |
first_month_document_typepost | string | invoice | HK first month document type. |
every_month_document_typepost | string | receipt | HK every month document type. |
charge_datepost | string | 01 | HK charge day of month (01-31). |
payment_type_datapost | json | {"type":"regular"} | Advanced payment type JSON. Built automatically when omitted. |
Authentication
Send the bearer token returned by Login in the request header.
Authorization: Bearer YOUR TOKEN
Sample Request
{
"url": "\/app\/PaymentForms.Add",
"method": "POST",
"headers": {
"Authorization": "Bearer YOUR TOKEN"
},
"body": {
"form_name": "Level transition payment",
"amount": "65",
"invoice_setting_id": "3",
"payment_gatway": "7",
"iteam_type": "product",
"iteam_id": "120"
},
"url_user": "https:\/\/{user}.bull36.com\/app\/PaymentForms.Add",
"url_domain": "https:\/\/{domain}\/app\/PaymentForms.Add"
}Endpoint
POST /app/PaymentForms.Add
POST https://{user}.bull36.com/app/PaymentForms.Add
POST https://{domain}/app/PaymentForms.AddSample Output
{
"success": 1,
"id": 350,
"payment_form_id": 350,
"message": "Payment form added successfully."
}JavaScript Example
const token = 'YOUR TOKEN';
const body = new URLSearchParams();
body.set('form_name', 'Level transition payment');
body.set('amount', '65');
body.set('invoice_setting_id', '3');
body.set('payment_gatway', '7');
body.set('iteam_type', 'product');
body.set('iteam_id', '120');
const res = await fetch('/app/PaymentForms.Add', {
method: 'POST',
headers: { Authorization: `Bearer ${token}` },
body
});
const data = await res.json();
console.log(data);Error Example
{
"success": 0,
"message": "Missing required parameter: form_name"
}