POST
Customer.PaymentForms.Add
Assign a payment form template to a customer (customer profile + button). Copies payment_forms row into payment_forms_paid. Mirrors Extra::add_payment_form_data.
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
- Runs the Customer.PaymentForms.Add function and returns JSON.
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
- Send the bearer token on protected calls with Authorization: Bearer YOUR TOKEN.
- Send parameters as POST body fields exactly as documented.
- Send date/time values in UTC Y-m-d H:i:s format when a date or datetime field is used.
Required Parameters
| Name | Type | Sample | Explanation |
|---|---|---|---|
customer_idpost | int | 58 | Customer id. Alias: cust_id. |
payment_form_idpost | int | 342 | Template id from PaymentForms.List. |
Optional Parameters
No optional body parameters are defined for this function.
Authentication
Send the bearer token returned by Login in the request header.
Authorization: Bearer YOUR TOKEN
Sample Request
{
"url": "\/app\/Customer.PaymentForms.Add",
"method": "POST",
"headers": {
"Authorization": "Bearer YOUR TOKEN"
},
"body": {
"customer_id": "58",
"payment_form_id": "342"
},
"url_user": "https:\/\/{user}.bull36.com\/app\/Customer.PaymentForms.Add",
"url_domain": "https:\/\/{domain}\/app\/Customer.PaymentForms.Add"
}Endpoint
POST /app/Customer.PaymentForms.Add
POST https://{user}.bull36.com/app/Customer.PaymentForms.Add
POST https://{domain}/app/Customer.PaymentForms.AddSample Output
{
"success": 1,
"id": 6184,
"payment_forms_paid_id": 6184,
"message": "Payment form assigned to customer successfully."
}JavaScript Example
const token = 'YOUR TOKEN';
const body = new URLSearchParams();
body.set('customer_id', '58');
body.set('payment_form_id', '342');
const res = await fetch('/app/Customer.PaymentForms.Add', {
method: 'POST',
headers: { Authorization: `Bearer ${token}` },
body
});
const data = await res.json();
console.log(data);Error Example
{
"success": 0,
"message": "Payment form template not found."
}