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

NameTypeSampleExplanation
form_name
post
stringLevel transition paymentForm name. Alias: name.
amount
post
string65Default amount. Must be > 0 unless ask_to_customer=1.
invoice_setting_id
post
int3Invoice company id from InvoiceSettings.List.
payment_gatway
post
int7Payment gateway id. Alias: payment_gateway.
iteam_type
post
stringproductItem type. Alias: item_type.
iteam_id
post
int120Linked item id. Aliases: payment_item_id, item_id. Optional for product when allow_wild_card_product=1.

Optional Parameters

NameTypeSampleWhat it gives
document_type
post
stringreceiptLegacy/subscription document type (payment_forms.document_type column).
regular_installments_document_type
post
stringreceiptDocument type for product/order flows (stored in payment_type_data JSON).
ask_to_customer
post
int0Let customer enter amount.
change_value_with_customer
post
int0Allow customer to change amount.
need_to_show_company_id
post
int0Do not let create document without company id.
allow_wild_card_product
post
int0Allow wildcard product (product type only).
required_fields
post
json["name","mobile"]Required public fields: name, email, mobile.
allow_installments
post
int0Allow installments.
max_installments
post
int12Max installments when allow_installments=1.
make_monthly_invoice
post
int0Make monthly invoice for installments.
allow_standing_order_hk
post
int0Allow standing order HK (kesher/nedarim).
max_installments_hk
post
int12Max HK installments.
first_month_document_type
post
stringinvoiceHK first month document type.
every_month_document_type
post
stringreceiptHK every month document type.
charge_date
post
string01HK charge day of month (01-31).
payment_type_data
post
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.Add

Sample 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"
}