B2B Ecommerce For WooCommerce Documentation - B2BWoo

Action and Filter Hook Reference

This is simply a list of action and filter hooks found within B2B Ecommerce For WooComerce files. View the source to see supported parameters and usage.

Filters, Actions

Filters

    Request for quote

  • b2be_quantity_input_step

    Description:

    Modify Quote Line item quantity.

    Parameters:

    (int) $quantity Quote Line Item Quantity.

    (object) $product Quote Line Item Object.

  • rfq_cart_url

    Description:

    Modify rfq cart url.

    Parameters:

    (string) $rfq_cart_url Default RFQ Cart Url.

  • Discount options

  • b2be_rules_categories

    Description:

    Modify Category List used for b2b discount rules.

    Parameters:

    (array) $b2be_categories Category List of site.

  • b2be_rules_users_id

    Description:

    Modify Users List used for b2b discount rules.

    Parameters:

    (array) $b2be_users Users list of site.

  • b2be_rules_roles

    Description:

    Modify Roles List used for b2b discount rules.

    Parameters:

    (array) $b2be_roles Roles list of site.

  • b2be_rules_products

    Description:

    Modify Products List used for b2b discount rules.

    Parameters:

    (array) $products_list Product list of site.

  • b2be_rules_products_id

    Description:

    Modify Products Ids List used for b2b discount rules.

    Parameters:

    (array) $products_id Product Ids list of site.

  • b2be_rules_variaiton_names

    Description:

    Modify Products Variation Name List used for b2b discount rules.

    Parameters:

    (array) $products_variration_array Product variations name list with id.

  • b2be_product_variation_price

    Description:

    Modify Products Variation Price.

    Parameters:

    (array) $products_variration_array Product variations price.

  • b2be_discount_rules_limit

    Description:

    Modify B2B Discount Rules applying on each product.

    Parameters:

    (array) $discounted_rule B2B Ecommerce Discount Rules Array.

  • b2be_varaition_table_title

    Description:

    Modify theh variation table title name.

    Parameters:

    (string) $table_name Variation Table Name.

  • b2be_varaition_table_all_variation_text

    Description:

    Modify the all variation text.

    Parameters:

    (string) $text All variation replacing text.

  • Minimum order quantity

  • b2b_mov_subtotal_check

    Description:

    Modify the quantity of current product in cart.

    Parameters:

    (string) $subtotal Quantity of product in cart.

  • Sign up form

  • b2be_sign_up_fields

    Description:

    Modify sign up form before rendering on page.

    Parameters:

    (array) $signup_fields Sign Up fields to render.

Actions

    Sign up form

  • sfg_signup_accepted

    Description:

    Runs after sign up request is accepted by admin.

    Parameters:

    (int) $user_id User Id of the user being registered.

    (object) $user Data of user being registered.

  • sfg_signup_rejected

    Description:

    Runs after sign up request is on hold by admin.

    Parameters:

    (int) $user_id User Id of the user being registered.

    (object) $user Data of user being registered.

  • sfg_signup_on_hold

    Description:

    Runs after sign up request is rejected by admin.

    Parameters:

    (int) $user_id User Id of the user being registered.

    (object) $user Data of user being registered.

  • b2be_after_sfg_form_submitted

    Description:

    Runs after Sign up form is submitted.

    Parameters:

    (object) $custom_signup_fields Sign form data filled by user.

  • sfg_signup_email_to_admin

    Description:

    Runs after Sign up form is submitted and requires admin approval.

    Parameters:

    (int) $user_id User Id of the user being registered.

    (object) $user Data of user being registered.

  • sfg_signup_pending

    Description:

    Runs after Sign up form is submitted and requires admin approval.

    Parameters:

    (int) $user_id User Id of the user being registered.

    (object) $user Data of user being registered.

API Documentation

Authentication

B2B Ecommerce For WooComerce use Basic Authentication ,which accept Consumer Key as Username and Consumer Secret as Password generated by Woocommerce Rest Api (WooCommerce > Settings > Advanced > REST API).

Request For Quotes

Get Quotes

Retrieve all quotes from the site.

HTTP Request

GET
{{Site Url}}wp-json/wc/v3/b2be/quotes

Sample Response:

{
    "status": 200,
    "message": "Success",
    "data": [
        {
            "ID": 4065,
            "post_author": "1",
            "post_date": "2021-02-22 15:16:04",
            "post_date_gmt": "2021-02-22 10:16:04",
            "post_content": "",
            "post_title": "#4065 Shaheer Sheikh",
            "post_excerpt": "",
            "post_status": "quoted",
            "comment_status": "open",
            "ping_status": "closed",
            "post_password": "",
            "post_name": "quote-from-shaheer-13",
            "to_ping": "",
            "pinged": "",
            "post_modified": "2021-02-23 13:05:49",
            "post_modified_gmt": "2021-02-23 08:05:49",
            "post_content_filtered": "",
            "post_parent": 0,
            "guid": "https://localhost/wordpress/quote/quote-from-shaheer-13/",
            "menu_order": 0,
            "post_type": "quote",
            "post_mime_type": "",
            "comment_count": "0",
            "filter": "raw"
        },
        {
            "ID": 4061,
            "post_author": "1",
            "post_date": "2021-02-22 13:04:46",
            "post_date_gmt": "2021-02-22 08:04:46",
            "post_content": "",
            "post_title": "#4061 Shaheer Sheikh",
            "post_excerpt": "",
            "post_status": "requested",
            "comment_status": "open",
            "ping_status": "closed",
            "post_password": "",
            "post_name": "quote-from-shaheer-9",
            "to_ping": "",
            "pinged": "",
            "post_modified": "2021-02-22 13:04:47",
            "post_modified_gmt": "2021-02-22 08:04:47",
            "post_content_filtered": "",
            "post_parent": 0,
            "guid": "https://localhost/wordpress/quote/quote-from-shaheer-9/",
            "menu_order": 0,
            "post_type": "quote",
            "post_mime_type": "",
            "comment_count": "0",
            "filter": "raw"
        },
        {
            "ID": 4060,
            "post_author": "1",
            "post_date": "2021-02-22 12:59:49",
            "post_date_gmt": "2021-02-22 07:59:49",
            "post_content": "",
            "post_title": "#4060 Shaheer Sheikh",
            "post_excerpt": "",
            "post_status": "requested",
            "comment_status": "open",
            "ping_status": "closed",
            "post_password": "",
            "post_name": "quote-from-shaheer-8",
            "to_ping": "",
            "pinged": "",
            "post_modified": "2021-02-22 12:59:49",
            "post_modified_gmt": "2021-02-22 07:59:49",
            "post_content_filtered": "",
            "post_parent": 0,
            "guid": "https://localhost/wordpress/quote/quote-from-shaheer-8/",
            "menu_order": 0,
            "post_type": "quote",
            "post_mime_type": "",
            "comment_count": "0",
            "filter": "raw"
        },
        {
            "ID": 4058,
            "post_author": "1",
            "post_date": "2021-02-22 12:58:18",
            "post_date_gmt": "2021-02-22 07:58:18",
            "post_content": "",
            "post_title": "#4058 Shaheer Sheikh",
            "post_excerpt": "",
            "post_status": "requested",
            "comment_status": "open",
            "ping_status": "closed",
            "post_password": "",
            "post_name": "quote-from-shaheer-6",
            "to_ping": "",
            "pinged": "",
            "post_modified": "2021-02-22 12:58:18",
            "post_modified_gmt": "2021-02-22 07:58:18",
            "post_content_filtered": "",
            "post_parent": 0,
            "guid": "https://localhost/wordpress/quote/quote-from-shaheer-6/",
            "menu_order": 0,
            "post_type": "quote",
            "post_mime_type": "",
            "comment_count": "0",
            "filter": "raw"
        },
        {
            "ID": 4057,
            "post_author": "1",
            "post_date": "2021-02-21 17:39:22",
            "post_date_gmt": "2021-02-21 12:39:22",
            "post_content": "",
            "post_title": "#4057 Shaheer Sheikh",
            "post_excerpt": "",
            "post_status": "requested",
            "comment_status": "open",
            "ping_status": "closed",
            "post_password": "",
            "post_name": "quote-from-shaheer-5",
            "to_ping": "",
            "pinged": "",
            "post_modified": "2021-02-21 17:39:22",
            "post_modified_gmt": "2021-02-21 12:39:22",
            "post_content_filtered": "",
            "post_parent": 0,
            "guid": "http://localhost/wordpress/quote/quote-from-shaheer-5/",
            "menu_order": 0,
            "post_type": "quote",
            "post_mime_type": "",
            "comment_count": "0",
            "filter": "raw"
        },
        {
            "ID": 4056,
            "post_author": "1",
            "post_date": "2021-02-21 17:37:14",
            "post_date_gmt": "2021-02-21 12:37:14",
            "post_content": "",
            "post_title": "#4056 Shaheer Sheikh",
            "post_excerpt": "",
            "post_status": "requested",
            "comment_status": "open",
            "ping_status": "closed",
            "post_password": "",
            "post_name": "quote-from-shaheer-4",
            "to_ping": "",
            "pinged": "",
            "post_modified": "2021-02-21 17:37:14",
            "post_modified_gmt": "2021-02-21 12:37:14",
            "post_content_filtered": "",
            "post_parent": 0,
            "guid": "https://localhost/wordpress/quote/quote-from-shaheer-4/",
            "menu_order": 0,
            "post_type": "quote",
            "post_mime_type": "",
            "comment_count": "0",
            "filter": "raw"
        },
        {
            "ID": 3896,
            "post_author": "1",
            "post_date": "2021-01-07 21:01:54",
            "post_date_gmt": "2021-01-07 16:01:54",
            "post_content": "",
            "post_title": "#3896 Shaheer Sheikh",
            "post_excerpt": "",
            "post_status": "requested",
            "comment_status": "open",
            "ping_status": "closed",
            "post_password": "",
            "post_name": "quote-from-shaheer-3",
            "to_ping": "",
            "pinged": "",
            "post_modified": "2021-01-07 21:01:55",
            "post_modified_gmt": "2021-01-07 16:01:55",
            "post_content_filtered": "",
            "post_parent": 0,
            "guid": "http://localhost/wordpress/quote/quote-from-shaheer-3/",
            "menu_order": 0,
            "post_type": "quote",
            "post_mime_type": "",
            "comment_count": "0",
            "filter": "raw"
        },
        {
            "ID": 3798,
            "post_author": "1",
            "post_date": "2020-12-01 14:33:34",
            "post_date_gmt": "2020-12-01 09:33:34",
            "post_content": "",
            "post_title": "#3798 Shaheer Ahmed",
            "post_excerpt": "",
            "post_status": "requested",
            "comment_status": "open",
            "ping_status": "closed",
            "post_password": "",
            "post_name": "quote-from-shaheer-2",
            "to_ping": "",
            "pinged": "",
            "post_modified": "2020-12-01 14:33:34",
            "post_modified_gmt": "2020-12-01 09:33:34",
            "post_content_filtered": "",
            "post_parent": 0,
            "guid": "http://localhost/wordpress/quote/quote-from-shaheer-2/",
            "menu_order": 0,
            "post_type": "quote",
            "post_mime_type": "",
            "comment_count": "0",
            "filter": "raw"
        },
        {
            "ID": 3797,
            "post_author": "1",
            "post_date": "2020-12-01 14:03:36",
            "post_date_gmt": "2020-12-01 09:03:36",
            "post_content": "",
            "post_title": "#3797 Shaheer Ahmed",
            "post_excerpt": "",
            "post_status": "quoted",
            "comment_status": "open",
            "ping_status": "closed",
            "post_password": "",
            "post_name": "quote-from-shaheer",
            "to_ping": "",
            "pinged": "",
            "post_modified": "2020-12-04 12:04:57",
            "post_modified_gmt": "2020-12-04 07:04:57",
            "post_content_filtered": "",
            "post_parent": 0,
            "guid": "http://localhost/wordpress/quote/quote-from-shaheer/",
            "menu_order": 0,
            "post_type": "quote",
            "post_mime_type": "",
            "comment_count": "0",
            "filter": "raw"
        }
    ]
}

Count Quote

Retrieve the count of quotes.

HTTP Request

GET
{{Site Url}}wp-json/wc/v3/b2be/quotes/count

Sample Response:

{
    "status": 200,
    "message": "Success",
    "data": {
        "count": 9
    }
}

Create Quote

Create Quote for customer according to email.

HTTP Request

POST
{{Site Url}}wp-json/wc/v3/b2be/quotes

Available Parameters

Parameter Description
customer_email Required
items Required
message Optional

Sample Response:

{
    "status": 200,
    "message": "Quote created successfully."
}

Update Quote

Update Quote details provided by user.

HTTP Request

POST
{{Site Url}}wp-json/wc/v3/b2be/quotes/update/

Available Parameters

Parameter Description
quote_id Required
email Optional
items Optional
message Optional
status Optional

Sample Response:

{
    "status": 200,
    "message": "Quote Updated successfully."
}

Delete Quote

Delete the Quote according to the given quote id

HTTP Request

DELETE
{{Site Url}}wp-json/wc/v3/b2be/quotes/delete/

Available Parameters

Parameter Description
quote_id Required

Sample Response:

{
    "status": 200,
    "message": "Quote Deleted successfully."
}

Delete Quote Line Item

Delete Line Item for Quote whose id is provided.

HTTP Request

DELETE
{{Site Url}}wp-json/wc/v3/b2be/quotes/line-item/delete/

Available Parameters

Parameter Description
quote_id Required
product_id Required
variation_id Required (For variation product)

Sample Response:

{
    "status": 200,
    "message": "Quote Line Item Deleted successfully."
}

User Roles

Create Role

Create Role and update the given the settings accordingly.

HTTP Request

POST
{{Site Url}}wp-json/wc/v3/b2be/roles/

Available Parameters

Parameter Description
name Required
enable_rfq Optional
disable_add_to_cart Optional
tax_exempt Optional
shipping_exempt Optional
enable_b2b_credit_payment Optional
ccr_credit_value Optional
b2be_role_woocomerce_payment_method Optional
b2be_role_based_payment_method Optional

Sample Response:

{
    "status": 200,
    "message": "Role Created Successfully."
}

Update Role

Update Role according to role id.

HTTP Request

POST
{{Site Url}}wp-json/wc/v3/b2be/roles/update/

Available Parameters

Parameter Description
name Required
enable_rfq Optional
disable_add_to_cart Optional
tax_exempt Optional
shipping_exempt Optional
enable_b2b_credit_payment Optional
ccr_credit_value Optional
b2be_role_woocomerce_payment_method Optional
b2be_role_based_payment_method Optional

Sample Response:

{
    "status": 200,
    "message": "Role Updated Successfully."
}

Delete Role

Delete Role according to the given role name.

HTTP Request

DELETE
{{Site Url}}wp-json/wc/v3/b2be/roles/delete/

Available Parameters

Parameter Description
name Required

Sample Response:

{
    "status": 200,
    "message": "Role Deleted successfully."
}

Get Roles

Retrive all roles on your site.

HTTP Request

GET
{{Site Url}}wp-json/wc/v3/b2be/roles/

Sample Response:

{
    "status": 200,
    "message": "Success",
    "data": [
        {
            "ID": 4089,
            "post_author": "1",
            "post_date": "2021-02-25 18:33:32",
            "post_date_gmt": "2021-02-25 13:33:32",
            "post_content": "",
            "post_title": "Developer",
            "post_excerpt": "",
            "post_status": "publish",
            "comment_status": "closed",
            "ping_status": "closed",
            "post_password": "",
            "post_name": "developer",
            "to_ping": "",
            "pinged": "",
            "post_modified": "2021-02-25 18:33:32",
            "post_modified_gmt": "2021-02-25 13:33:32",
            "post_content_filtered": "",
            "post_parent": 0,
            "guid": "https://localhost/wordpress/cc-roles/developer/",
            "menu_order": 0,
            "post_type": "codup-custom-roles",
            "post_mime_type": "",
            "comment_count": "0",
            "filter": "raw"
        },
        {
            "ID": 4085,
            "post_author": "1",
            "post_date": "2021-02-24 13:18:57",
            "post_date_gmt": "2021-02-24 08:18:57",
            "post_content": "",
            "post_title": "Guddu Gulab Chatri",
            "post_excerpt": "",
            "post_status": "publish",
            "comment_status": "closed",
            "ping_status": "closed",
            "post_password": "",
            "post_name": "guddu_gulab_chatri",
            "to_ping": "",
            "pinged": "",
            "post_modified": "2021-02-25 14:18:09",
            "post_modified_gmt": "2021-02-25 09:18:09",
            "post_content_filtered": "",
            "post_parent": 0,
            "guid": "https://localhost/wordpress/cc-roles/guddu_gulab_chatri/",
            "menu_order": 0,
            "post_type": "codup-custom-roles",
            "post_mime_type": "",
            "comment_count": "0",
            "filter": "raw"
        },
        {
            "ID": 3935,
            "post_author": "1",
            "post_date": "2021-02-17 20:35:50",
            "post_date_gmt": "2021-02-17 15:35:50",
            "post_content": "",
            "post_title": "Test",
            "post_excerpt": "",
            "post_status": "publish",
            "comment_status": "closed",
            "ping_status": "closed",
            "post_password": "",
            "post_name": "test",
            "to_ping": "",
            "pinged": "",
            "post_modified": "2021-02-23 16:25:03",
            "post_modified_gmt": "2021-02-23 11:25:03",
            "post_content_filtered": "",
            "post_parent": 0,
            "guid": "http://localhost/wordpress/?post_type=codup-custom-roles&p=3935",
            "menu_order": 0,
            "post_type": "codup-custom-roles",
            "post_mime_type": "",
            "comment_count": "0",
            "filter": "raw"
        },
        {
            "ID": 3930,
            "post_author": "1",
            "post_date": "2021-02-11 15:18:48",
            "post_date_gmt": "2021-02-11 10:18:48",
            "post_content": "",
            "post_title": "Catalogue Role",
            "post_excerpt": "",
            "post_status": "publish",
            "comment_status": "closed",
            "ping_status": "closed",
            "post_password": "",
            "post_name": "catalogue_role",
            "to_ping": "",
            "pinged": "",
            "post_modified": "2021-02-11 15:18:48",
            "post_modified_gmt": "2021-02-11 10:18:48",
            "post_content_filtered": "",
            "post_parent": 0,
            "guid": "http://localhost/wordpress/catalogue_role/",
            "menu_order": 0,
            "post_type": "codup-custom-roles",
            "post_mime_type": "",
            "comment_count": "0",
            "filter": "raw"
        },
        {
            "ID": 14,
            "post_author": "4",
            "post_date": "2020-11-17 10:32:13",
            "post_date_gmt": "2020-11-17 10:32:13",
            "post_content": "",
            "post_title": "Translator",
            "post_excerpt": "",
            "post_status": "publish",
            "comment_status": "closed",
            "ping_status": "closed",
            "post_password": "",
            "post_name": "translator",
            "to_ping": "",
            "pinged": "",
            "post_modified": "2020-11-17 10:32:13",
            "post_modified_gmt": "2020-11-17 10:32:13",
            "post_content_filtered": "",
            "post_parent": 0,
            "guid": "http://localhost/wordpress/cc-roles/translator/",
            "menu_order": 0,
            "post_type": "codup-custom-roles",
            "post_mime_type": "",
            "comment_count": "0",
            "filter": "raw"
        },
        {
            "ID": 13,
            "post_author": "4",
            "post_date": "2020-11-17 10:32:13",
            "post_date_gmt": "2020-11-17 10:32:13",
            "post_content": "",
            "post_title": "demo",
            "post_excerpt": "",
            "post_status": "publish",
            "comment_status": "closed",
            "ping_status": "closed",
            "post_password": "",
            "post_name": "demo",
            "to_ping": "",
            "pinged": "",
            "post_modified": "2020-11-17 10:32:13",
            "post_modified_gmt": "2020-11-17 10:32:13",
            "post_content_filtered": "",
            "post_parent": 0,
            "guid": "http://localhost/wordpress/cc-roles/demo/",
            "menu_order": 0,
            "post_type": "codup-custom-roles",
            "post_mime_type": "",
            "comment_count": "0",
            "filter": "raw"
        },
        {
            "ID": 12,
            "post_author": "4",
            "post_date": "2020-11-17 10:32:13",
            "post_date_gmt": "2020-11-17 10:32:13",
            "post_content": "",
            "post_title": "WholesalerPro",
            "post_excerpt": "",
            "post_status": "publish",
            "comment_status": "closed",
            "ping_status": "closed",
            "post_password": "",
            "post_name": "wholesaler",
            "to_ping": "",
            "pinged": "",
            "post_modified": "2020-11-17 10:32:13",
            "post_modified_gmt": "2020-11-17 10:32:13",
            "post_content_filtered": "",
            "post_parent": 0,
            "guid": "http://localhost/wordpress/cc-roles/wholesaler/",
            "menu_order": 0,
            "post_type": "codup-custom-roles",
            "post_mime_type": "",
            "comment_count": "0",
            "filter": "raw"
        },
        {
            "ID": 11,
            "post_author": "4",
            "post_date": "2020-11-17 10:32:13",
            "post_date_gmt": "2020-11-17 10:32:13",
            "post_content": "",
            "post_title": "QA",
            "post_excerpt": "",
            "post_status": "publish",
            "comment_status": "closed",
            "ping_status": "closed",
            "post_password": "",
            "post_name": "qa-budhiya",
            "to_ping": "",
            "pinged": "",
            "post_modified": "2020-11-17 10:32:13",
            "post_modified_gmt": "2020-11-17 10:32:13",
            "post_content_filtered": "",
            "post_parent": 0,
            "guid": "http://localhost/wordpress/cc-roles/qa-budhiya/",
            "menu_order": 0,
            "post_type": "codup-custom-roles",
            "post_mime_type": "",
            "comment_count": "0",
            "filter": "raw"
        },
        {
            "ID": 10,
            "post_author": "4",
            "post_date": "2020-11-17 10:32:13",
            "post_date_gmt": "2020-11-17 10:32:13",
            "post_content": "",
            "post_title": "Shop manager",
            "post_excerpt": "",
            "post_status": "publish",
            "comment_status": "closed",
            "ping_status": "closed",
            "post_password": "",
            "post_name": "shop_manager",
            "to_ping": "",
            "pinged": "",
            "post_modified": "2020-11-17 10:32:13",
            "post_modified_gmt": "2020-11-17 10:32:13",
            "post_content_filtered": "",
            "post_parent": 0,
            "guid": "http://localhost/wordpress/cc-roles/shop_manager/",
            "menu_order": 0,
            "post_type": "codup-custom-roles",
            "post_mime_type": "",
            "comment_count": "0",
            "filter": "raw"
        },
        {
            "ID": 9,
            "post_author": "4",
            "post_date": "2020-11-17 10:32:13",
            "post_date_gmt": "2020-11-17 10:32:13",
            "post_content": "",
            "post_title": "Customer",
            "post_excerpt": "",
            "post_status": "publish",
            "comment_status": "closed",
            "ping_status": "closed",
            "post_password": "",
            "post_name": "customer",
            "to_ping": "",
            "pinged": "",
            "post_modified": "2021-02-25 14:05:01",
            "post_modified_gmt": "2021-02-25 09:05:01",
            "post_content_filtered": "",
            "post_parent": 0,
            "guid": "http://localhost/wordpress/cc-roles/customer/",
            "menu_order": 0,
            "post_type": "codup-custom-roles",
            "post_mime_type": "",
            "comment_count": "0",
            "filter": "raw"
        },
        {
            "ID": 8,
            "post_author": "4",
            "post_date": "2020-11-17 10:32:13",
            "post_date_gmt": "2020-11-17 10:32:13",
            "post_content": "",
            "post_title": "Subscriber",
            "post_excerpt": "",
            "post_status": "publish",
            "comment_status": "closed",
            "ping_status": "closed",
            "post_password": "",
            "post_name": "subscriber",
            "to_ping": "",
            "pinged": "",
            "post_modified": "2020-11-17 10:32:13",
            "post_modified_gmt": "2020-11-17 10:32:13",
            "post_content_filtered": "",
            "post_parent": 0,
            "guid": "http://localhost/wordpress/cc-roles/subscriber/",
            "menu_order": 0,
            "post_type": "codup-custom-roles",
            "post_mime_type": "",
            "comment_count": "0",
            "filter": "raw"
        },
        {
            "ID": 7,
            "post_author": "4",
            "post_date": "2020-11-17 10:32:13",
            "post_date_gmt": "2020-11-17 10:32:13",
            "post_content": "",
            "post_title": "Contributor",
            "post_excerpt": "",
            "post_status": "publish",
            "comment_status": "closed",
            "ping_status": "closed",
            "post_password": "",
            "post_name": "contributor",
            "to_ping": "",
            "pinged": "",
            "post_modified": "2020-11-17 10:32:13",
            "post_modified_gmt": "2020-11-17 10:32:13",
            "post_content_filtered": "",
            "post_parent": 0,
            "guid": "http://localhost/wordpress/cc-roles/contributor/",
            "menu_order": 0,
            "post_type": "codup-custom-roles",
            "post_mime_type": "",
            "comment_count": "0",
            "filter": "raw"
        },
        {
            "ID": 6,
            "post_author": "4",
            "post_date": "2020-11-17 10:32:13",
            "post_date_gmt": "2020-11-17 10:32:13",
            "post_content": "",
            "post_title": "Author",
            "post_excerpt": "",
            "post_status": "publish",
            "comment_status": "closed",
            "ping_status": "closed",
            "post_password": "",
            "post_name": "author",
            "to_ping": "",
            "pinged": "",
            "post_modified": "2020-11-17 10:32:13",
            "post_modified_gmt": "2020-11-17 10:32:13",
            "post_content_filtered": "",
            "post_parent": 0,
            "guid": "http://localhost/wordpress/cc-roles/author/",
            "menu_order": 0,
            "post_type": "codup-custom-roles",
            "post_mime_type": "",
            "comment_count": "0",
            "filter": "raw"
        },
        {
            "ID": 5,
            "post_author": "4",
            "post_date": "2020-11-17 10:32:13",
            "post_date_gmt": "2020-11-17 10:32:13",
            "post_content": "",
            "post_title": "Editor",
            "post_excerpt": "",
            "post_status": "publish",
            "comment_status": "closed",
            "ping_status": "closed",
            "post_password": "",
            "post_name": "editor",
            "to_ping": "",
            "pinged": "",
            "post_modified": "2020-11-17 10:32:13",
            "post_modified_gmt": "2020-11-17 10:32:13",
            "post_content_filtered": "",
            "post_parent": 0,
            "guid": "http://localhost/wordpress/cc-roles/editor/",
            "menu_order": 0,
            "post_type": "codup-custom-roles",
            "post_mime_type": "",
            "comment_count": "0",
            "filter": "raw"
        },
        {
            "ID": 4,
            "post_author": "4",
            "post_date": "2020-11-17 10:32:13",
            "post_date_gmt": "2020-11-17 10:32:13",
            "post_content": "",
            "post_title": "Administrator",
            "post_excerpt": "",
            "post_status": "publish",
            "comment_status": "closed",
            "ping_status": "closed",
            "post_password": "",
            "post_name": "administrator",
            "to_ping": "",
            "pinged": "",
            "post_modified": "2021-01-28 03:07:21",
            "post_modified_gmt": "2021-01-27 22:07:21",
            "post_content_filtered": "",
            "post_parent": 0,
            "guid": "http://localhost/wordpress/cc-roles/administrator/",
            "menu_order": 0,
            "post_type": "codup-custom-roles",
            "post_mime_type": "",
            "comment_count": "0",
            "filter": "raw"
        }
    ]
}

Get Specific Role

Retrieve Role by given role name or role id

HTTP Request

GET
{{Site Url}}wp-json/wc/v3/b2be/roles/

Available Parameters

Parameter Description
name Required

Sample Response:

{
    "status": 200,
    "message": "Success",
    "data": [
        {
            "ID": 4089,
            "post_author": "1",
            "post_date": "2021-02-25 18:33:32",
            "post_date_gmt": "2021-02-25 13:33:32",
            "post_content": "",
            "post_title": "Developer",
            "post_excerpt": "",
            "post_status": "publish",
            "comment_status": "closed",
            "ping_status": "closed",
            "post_password": "",
            "post_name": "developer",
            "to_ping": "",
            "pinged": "",
            "post_modified": "2021-02-25 18:33:32",
            "post_modified_gmt": "2021-02-25 13:33:32",
            "post_content_filtered": "",
            "post_parent": 0,
            "guid": "https://localhost/wordpress/cc-roles/developer/",
            "menu_order": 0,
            "post_type": "codup-custom-roles",
            "post_mime_type": "",
            "comment_count": "0",
            "filter": "raw"
        }
    ]
}

Get Roles Count

Retrieve the count of the roles on your site.

HTTP Request

GET
{{Site Url}}wp-json/wc/v3/b2be/roles/count

Sample Response:

{
    "status": 200,
    "message": "Success",
    "data": {
        "count": 15
    }
}

Price Visibility

Update Settings

Update Settings for Price Visibilty

HTTP Request

POST
{{Site Url}}wp-json/wc/v3/b2be/price-visibility/update

Available Parameters

Parameter Description
codup_enable_hide_catalogue Optional
codup_hide_by_category Optional
codup_hide_by_product Optional
codup_hide_by_pages Optional
codup_restrict_store Optional
codup_hide_for_all Optional

Sample Response:

{
    "status": 200,
    "message": "Settings Updated Successfully."
}

Payment Gateways

Get Payment Gateways

Retrieve Payment Gateways of your site.

HTTP Request

GET
{{Site Url}}wp-json/wc/v3/b2be/payment-gateways

Sample Response:

{
    "status": 200,
    "message": "Success.",
    "data": {
        "bacs": {
            "locale": null,
            "order_button_text": null,
            "enabled": "yes",
            "title": "Direct bank transfer",
            "description": "Make your payment directly into our bank account. Please use your Order ID as the payment reference. Your order will not be shipped until the funds have cleared in our account.",
            "chosen": null,
            "method_title": "Direct bank transfer",
            "method_description": "Take payments in person via BACS. More commonly known as direct bank/wire transfer",
            "has_fields": false,
            "countries": null,
            "availability": null,
            "icon": "",
            "supports": [
                "products"
            ],
            "max_amount": 0,
            "view_transaction_url": "",
            "new_method_label": "",
            "pay_button_id": "",
            "plugin_id": "woocommerce_",
            "id": "bacs",
            "errors": [],
            "settings": {
                "enabled": "yes",
                "title": "Direct bank transfer",
                "description": "Make your payment directly into our bank account. Please use your Order ID as the payment reference. Your order will not be shipped until the funds have cleared in our account.",
                "instructions": "",
                "account_details": "",
                "account_name": "",
                "account_number": "",
                "sort_code": "",
                "bank_name": "",
                "iban": "",
                "bic": ""
            },
            "form_fields": {
                "enabled": {
                    "title": "Enable/Disable",
                    "type": "checkbox",
                    "label": "Enable bank transfer",
                    "default": "no"
                },
                "title": {
                    "title": "Title",
                    "type": "text",
                    "description": "This controls the title which the user sees during checkout.",
                    "default": "Direct bank transfer",
                    "desc_tip": true
                },
                "description": {
                    "title": "Description",
                    "type": "textarea",
                    "description": "Payment method description that the customer will see on your checkout.",
                    "default": "Make your payment directly into our bank account. Please use your Order ID as the payment reference. Your order will not be shipped until the funds have cleared in our account.",
                    "desc_tip": true
                },
                "instructions": {
                    "title": "Instructions",
                    "type": "textarea",
                    "description": "Instructions that will be added to the thank you page and emails.",
                    "default": "",
                    "desc_tip": true
                },
                "account_details": {
                    "type": "account_details"
                }
            },
            "instructions": "",
            "account_details": [
                {
                    "account_name": "",
                    "account_number": "",
                    "sort_code": "",
                    "bank_name": "",
                    "iban": "",
                    "bic": ""
                }
            ]
        },
        "cheque": {
            "order_button_text": null,
            "enabled": "yes",
            "title": "Check payments",
            "description": "Please send a check to Store Name, Store Street, Store Town, Store State / County, Store Postcode.",
            "chosen": null,
            "method_title": "Check payments",
            "method_description": "Take payments in person via checks. This offline gateway can also be useful to test purchases.",
            "has_fields": false,
            "countries": null,
            "availability": null,
            "icon": "",
            "supports": [
                "products"
            ],
            "max_amount": 0,
            "view_transaction_url": "",
            "new_method_label": "",
            "pay_button_id": "",
            "plugin_id": "woocommerce_",
            "id": "cheque",
            "errors": [],
            "settings": {
                "enabled": "yes",
                "title": "Check payments",
                "description": "Please send a check to Store Name, Store Street, Store Town, Store State / County, Store Postcode.",
                "instructions": ""
            },
            "form_fields": {
                "enabled": {
                    "title": "Enable/Disable",
                    "type": "checkbox",
                    "label": "Enable check payments",
                    "default": "no"
                },
                "title": {
                    "title": "Title",
                    "type": "text",
                    "description": "This controls the title which the user sees during checkout.",
                    "default": "Check payments",
                    "desc_tip": true
                },
                "description": {
                    "title": "Description",
                    "type": "textarea",
                    "description": "Payment method description that the customer will see on your checkout.",
                    "default": "Please send a check to Store Name, Store Street, Store Town, Store State / County, Store Postcode.",
                    "desc_tip": true
                },
                "instructions": {
                    "title": "Instructions",
                    "type": "textarea",
                    "description": "Instructions that will be added to the thank you page and emails.",
                    "default": "",
                    "desc_tip": true
                }
            },
            "instructions": ""
        },
        "cod": {
            "order_button_text": null,
            "enabled": "yes",
            "title": "Cash on delivery",
            "description": "Pay with cash upon delivery.",
            "chosen": null,
            "method_title": "Cash on delivery",
            "method_description": "Have your customers pay with cash (or by other means) upon delivery.",
            "has_fields": false,
            "countries": null,
            "availability": null,
            "icon": "",
            "supports": [
                "products"
            ],
            "max_amount": 0,
            "view_transaction_url": "",
            "new_method_label": "",
            "pay_button_id": "",
            "plugin_id": "woocommerce_",
            "id": "cod",
            "errors": [],
            "settings": {
                "enabled": "yes",
                "title": "Cash on delivery",
                "description": "Pay with cash upon delivery.",
                "instructions": "Pay with cash upon delivery.",
                "enable_for_methods": [],
                "enable_for_virtual": "yes"
            },
            "form_fields": {
                "enabled": {
                    "title": "Enable/Disable",
                    "label": "Enable cash on delivery",
                    "type": "checkbox",
                    "description": "",
                    "default": "no"
                },
                "title": {
                    "title": "Title",
                    "type": "text",
                    "description": "Payment method description that the customer will see on your checkout.",
                    "default": "Cash on delivery",
                    "desc_tip": true
                },
                "description": {
                    "title": "Description",
                    "type": "textarea",
                    "description": "Payment method description that the customer will see on your website.",
                    "default": "Pay with cash upon delivery.",
                    "desc_tip": true
                },
                "instructions": {
                    "title": "Instructions",
                    "type": "textarea",
                    "description": "Instructions that will be added to the thank you page.",
                    "default": "Pay with cash upon delivery.",
                    "desc_tip": true
                },
                "enable_for_methods": {
                    "title": "Enable for shipping methods",
                    "type": "multiselect",
                    "class": "wc-enhanced-select",
                    "css": "width: 400px;",
                    "default": "",
                    "description": "If COD is only available for certain methods, set it up here. Leave blank to enable for all methods.",
                    "options": [],
                    "desc_tip": true,
                    "custom_attributes": {
                        "data-placeholder": "Select shipping methods"
                    }
                },
                "enable_for_virtual": {
                    "title": "Accept for virtual orders",
                    "label": "Accept COD if the order is virtual",
                    "type": "checkbox",
                    "default": "yes"
                }
            },
            "instructions": "Pay with cash upon delivery.",
            "enable_for_methods": [],
            "enable_for_virtual": true
        },
        "net_20": {
            "order_button_text": null,
            "enabled": "yes",
            "title": "Net 20",
            "description": "",
            "chosen": null,
            "method_title": "Net 20",
            "method_description": "",
            "has_fields": true,
            "countries": null,
            "availability": null,
            "icon": "",
            "supports": [
                "products"
            ],
            "max_amount": 0,
            "view_transaction_url": "",
            "new_method_label": "",
            "pay_button_id": "",
            "plugin_id": "woocommerce_",
            "id": "net_20",
            "errors": [],
            "settings": {
                "enabled": "yes",
                "title": "Net 20",
                "description": "",
                "instructions": ""
            },
            "form_fields": {
                "enabled": {
                    "title": "Enable/Disable",
                    "type": "checkbox",
                    "label": "Enable Net 20",
                    "default": "yes"
                },
                "title": {
                    "title": "Title",
                    "type": "text",
                    "description": "This controls the title for the payment method the customer sees during checkout.",
                    "default": "Net 20",
                    "desc_tip": true
                },
                "description": {
                    "title": "Description",
                    "type": "textarea",
                    "description": "Payment method description that the customer will see on your checkout.",
                    "default": null,
                    "desc_tip": true
                }
            },
            "instructions": ""
        }
    }
}

Get Formatted Payment Gateway

Retrieve Payment Gatways according to given format eg:woocommerce or b2be_ecommerce

HTTP Request

GET
{{Site Url}}wp-json/wc/v3/b2be/payment-gateways

Available Parameters

Parameter Description
format Optional

Sample Response:

{
    "status": 200,
    "message": "Success.",
    "data": {
        "bacs": {
            "locale": null,
            "order_button_text": null,
            "enabled": "yes",
            "title": "Direct bank transfer",
            "description": "Make your payment directly into our bank account. Please use your Order ID as the payment reference. Your order will not be shipped until the funds have cleared in our account.",
            "chosen": null,
            "method_title": "Direct bank transfer",
            "method_description": "Take payments in person via BACS. More commonly known as direct bank/wire transfer",
            "has_fields": false,
            "countries": null,
            "availability": null,
            "icon": "",
            "supports": [
                "products"
            ],
            "max_amount": 0,
            "view_transaction_url": "",
            "new_method_label": "",
            "pay_button_id": "",
            "plugin_id": "woocommerce_",
            "id": "bacs",
            "errors": [],
            "settings": {
                "enabled": "yes",
                "title": "Direct bank transfer",
                "description": "Make your payment directly into our bank account. Please use your Order ID as the payment reference. Your order will not be shipped until the funds have cleared in our account.",
                "instructions": "",
                "account_details": "",
                "account_name": "",
                "account_number": "",
                "sort_code": "",
                "bank_name": "",
                "iban": "",
                "bic": ""
            },
            "form_fields": {
                "enabled": {
                    "title": "Enable/Disable",
                    "type": "checkbox",
                    "label": "Enable bank transfer",
                    "default": "no"
                },
                "title": {
                    "title": "Title",
                    "type": "text",
                    "description": "This controls the title which the user sees during checkout.",
                    "default": "Direct bank transfer",
                    "desc_tip": true
                },
                "description": {
                    "title": "Description",
                    "type": "textarea",
                    "description": "Payment method description that the customer will see on your checkout.",
                    "default": "Make your payment directly into our bank account. Please use your Order ID as the payment reference. Your order will not be shipped until the funds have cleared in our account.",
                    "desc_tip": true
                },
                "instructions": {
                    "title": "Instructions",
                    "type": "textarea",
                    "description": "Instructions that will be added to the thank you page and emails.",
                    "default": "",
                    "desc_tip": true
                },
                "account_details": {
                    "type": "account_details"
                }
            },
            "instructions": "",
            "account_details": [
                {
                    "account_name": "",
                    "account_number": "",
                    "sort_code": "",
                    "bank_name": "",
                    "iban": "",
                    "bic": ""
                }
            ]
        },
        "cheque": {
            "order_button_text": null,
            "enabled": "yes",
            "title": "Check payments",
            "description": "Please send a check to Store Name, Store Street, Store Town, Store State / County, Store Postcode.",
            "chosen": null,
            "method_title": "Check payments",
            "method_description": "Take payments in person via checks. This offline gateway can also be useful to test purchases.",
            "has_fields": false,
            "countries": null,
            "availability": null,
            "icon": "",
            "supports": [
                "products"
            ],
            "max_amount": 0,
            "view_transaction_url": "",
            "new_method_label": "",
            "pay_button_id": "",
            "plugin_id": "woocommerce_",
            "id": "cheque",
            "errors": [],
            "settings": {
                "enabled": "yes",
                "title": "Check payments",
                "description": "Please send a check to Store Name, Store Street, Store Town, Store State / County, Store Postcode.",
                "instructions": ""
            },
            "form_fields": {
                "enabled": {
                    "title": "Enable/Disable",
                    "type": "checkbox",
                    "label": "Enable check payments",
                    "default": "no"
                },
                "title": {
                    "title": "Title",
                    "type": "text",
                    "description": "This controls the title which the user sees during checkout.",
                    "default": "Check payments",
                    "desc_tip": true
                },
                "description": {
                    "title": "Description",
                    "type": "textarea",
                    "description": "Payment method description that the customer will see on your checkout.",
                    "default": "Please send a check to Store Name, Store Street, Store Town, Store State / County, Store Postcode.",
                    "desc_tip": true
                },
                "instructions": {
                    "title": "Instructions",
                    "type": "textarea",
                    "description": "Instructions that will be added to the thank you page and emails.",
                    "default": "",
                    "desc_tip": true
                }
            },
            "instructions": ""
        },
        "cod": {
            "order_button_text": null,
            "enabled": "yes",
            "title": "Cash on delivery",
            "description": "Pay with cash upon delivery.",
            "chosen": null,
            "method_title": "Cash on delivery",
            "method_description": "Have your customers pay with cash (or by other means) upon delivery.",
            "has_fields": false,
            "countries": null,
            "availability": null,
            "icon": "",
            "supports": [
                "products"
            ],
            "max_amount": 0,
            "view_transaction_url": "",
            "new_method_label": "",
            "pay_button_id": "",
            "plugin_id": "woocommerce_",
            "id": "cod",
            "errors": [],
            "settings": {
                "enabled": "yes",
                "title": "Cash on delivery",
                "description": "Pay with cash upon delivery.",
                "instructions": "Pay with cash upon delivery.",
                "enable_for_methods": [],
                "enable_for_virtual": "yes"
            },
            "form_fields": {
                "enabled": {
                    "title": "Enable/Disable",
                    "label": "Enable cash on delivery",
                    "type": "checkbox",
                    "description": "",
                    "default": "no"
                },
                "title": {
                    "title": "Title",
                    "type": "text",
                    "description": "Payment method description that the customer will see on your checkout.",
                    "default": "Cash on delivery",
                    "desc_tip": true
                },
                "description": {
                    "title": "Description",
                    "type": "textarea",
                    "description": "Payment method description that the customer will see on your website.",
                    "default": "Pay with cash upon delivery.",
                    "desc_tip": true
                },
                "instructions": {
                    "title": "Instructions",
                    "type": "textarea",
                    "description": "Instructions that will be added to the thank you page.",
                    "default": "Pay with cash upon delivery.",
                    "desc_tip": true
                },
                "enable_for_methods": {
                    "title": "Enable for shipping methods",
                    "type": "multiselect",
                    "class": "wc-enhanced-select",
                    "css": "width: 400px;",
                    "default": "",
                    "description": "If COD is only available for certain methods, set it up here. Leave blank to enable for all methods.",
                    "options": [],
                    "desc_tip": true,
                    "custom_attributes": {
                        "data-placeholder": "Select shipping methods"
                    }
                },
                "enable_for_virtual": {
                    "title": "Accept for virtual orders",
                    "label": "Accept COD if the order is virtual",
                    "type": "checkbox",
                    "default": "yes"
                }
            },
            "instructions": "Pay with cash upon delivery.",
            "enable_for_methods": [],
            "enable_for_virtual": true
        }
    }
}

Get Payment Methods By User

Retrieve Payment Gateways that are to be shown on specific user.

HTTP Request

GET
{{Site Url}}wp-json/wc/v3/b2be/payment-gateways

Available Parameters

Parameter Description
user_id Required

Sample Response:

{
    "status": 200,
    "message": "Success.",
    "data": {
        "bacs": {
            "locale": null,
            "order_button_text": null,
            "enabled": "yes",
            "title": "Direct bank transfer",
            "description": "Make your payment directly into our bank account. Please use your Order ID as the payment reference. Your order will not be shipped until the funds have cleared in our account.",
            "chosen": null,
            "method_title": "Direct bank transfer",
            "method_description": "Take payments in person via BACS. More commonly known as direct bank/wire transfer",
            "has_fields": false,
            "countries": null,
            "availability": null,
            "icon": "",
            "supports": [
                "products"
            ],
            "max_amount": 0,
            "view_transaction_url": "",
            "new_method_label": "",
            "pay_button_id": "",
            "plugin_id": "woocommerce_",
            "id": "bacs",
            "errors": [],
            "settings": {
                "enabled": "yes",
                "title": "Direct bank transfer",
                "description": "Make your payment directly into our bank account. Please use your Order ID as the payment reference. Your order will not be shipped until the funds have cleared in our account.",
                "instructions": "",
                "account_details": "",
                "account_name": "",
                "account_number": "",
                "sort_code": "",
                "bank_name": "",
                "iban": "",
                "bic": ""
            },
            "form_fields": {
                "enabled": {
                    "title": "Enable/Disable",
                    "type": "checkbox",
                    "label": "Enable bank transfer",
                    "default": "no"
                },
                "title": {
                    "title": "Title",
                    "type": "text",
                    "description": "This controls the title which the user sees during checkout.",
                    "default": "Direct bank transfer",
                    "desc_tip": true
                },
                "description": {
                    "title": "Description",
                    "type": "textarea",
                    "description": "Payment method description that the customer will see on your checkout.",
                    "default": "Make your payment directly into our bank account. Please use your Order ID as the payment reference. Your order will not be shipped until the funds have cleared in our account.",
                    "desc_tip": true
                },
                "instructions": {
                    "title": "Instructions",
                    "type": "textarea",
                    "description": "Instructions that will be added to the thank you page and emails.",
                    "default": "",
                    "desc_tip": true
                },
                "account_details": {
                    "type": "account_details"
                }
            },
            "instructions": "",
            "account_details": [
                {
                    "account_name": "",
                    "account_number": "",
                    "sort_code": "",
                    "bank_name": "",
                    "iban": "",
                    "bic": ""
                }
            ]
        },
        "cheque": {
            "order_button_text": null,
            "enabled": "yes",
            "title": "Check payments",
            "description": "Please send a check to Store Name, Store Street, Store Town, Store State / County, Store Postcode.",
            "chosen": null,
            "method_title": "Check payments",
            "method_description": "Take payments in person via checks. This offline gateway can also be useful to test purchases.",
            "has_fields": false,
            "countries": null,
            "availability": null,
            "icon": "",
            "supports": [
                "products"
            ],
            "max_amount": 0,
            "view_transaction_url": "",
            "new_method_label": "",
            "pay_button_id": "",
            "plugin_id": "woocommerce_",
            "id": "cheque",
            "errors": [],
            "settings": {
                "enabled": "yes",
                "title": "Check payments",
                "description": "Please send a check to Store Name, Store Street, Store Town, Store State / County, Store Postcode.",
                "instructions": ""
            },
            "form_fields": {
                "enabled": {
                    "title": "Enable/Disable",
                    "type": "checkbox",
                    "label": "Enable check payments",
                    "default": "no"
                },
                "title": {
                    "title": "Title",
                    "type": "text",
                    "description": "This controls the title which the user sees during checkout.",
                    "default": "Check payments",
                    "desc_tip": true
                },
                "description": {
                    "title": "Description",
                    "type": "textarea",
                    "description": "Payment method description that the customer will see on your checkout.",
                    "default": "Please send a check to Store Name, Store Street, Store Town, Store State / County, Store Postcode.",
                    "desc_tip": true
                },
                "instructions": {
                    "title": "Instructions",
                    "type": "textarea",
                    "description": "Instructions that will be added to the thank you page and emails.",
                    "default": "",
                    "desc_tip": true
                }
            },
            "instructions": ""
        },
        "cod": {
            "order_button_text": null,
            "enabled": "yes",
            "title": "Cash on delivery",
            "description": "Pay with cash upon delivery.",
            "chosen": null,
            "method_title": "Cash on delivery",
            "method_description": "Have your customers pay with cash (or by other means) upon delivery.",
            "has_fields": false,
            "countries": null,
            "availability": null,
            "icon": "",
            "supports": [
                "products"
            ],
            "max_amount": 0,
            "view_transaction_url": "",
            "new_method_label": "",
            "pay_button_id": "",
            "plugin_id": "woocommerce_",
            "id": "cod",
            "errors": [],
            "settings": {
                "enabled": "yes",
                "title": "Cash on delivery",
                "description": "Pay with cash upon delivery.",
                "instructions": "Pay with cash upon delivery.",
                "enable_for_methods": [],
                "enable_for_virtual": "yes"
            },
            "form_fields": {
                "enabled": {
                    "title": "Enable/Disable",
                    "label": "Enable cash on delivery",
                    "type": "checkbox",
                    "description": "",
                    "default": "no"
                },
                "title": {
                    "title": "Title",
                    "type": "text",
                    "description": "Payment method description that the customer will see on your checkout.",
                    "default": "Cash on delivery",
                    "desc_tip": true
                },
                "description": {
                    "title": "Description",
                    "type": "textarea",
                    "description": "Payment method description that the customer will see on your website.",
                    "default": "Pay with cash upon delivery.",
                    "desc_tip": true
                },
                "instructions": {
                    "title": "Instructions",
                    "type": "textarea",
                    "description": "Instructions that will be added to the thank you page.",
                    "default": "Pay with cash upon delivery.",
                    "desc_tip": true
                },
                "enable_for_methods": {
                    "title": "Enable for shipping methods",
                    "type": "multiselect",
                    "class": "wc-enhanced-select",
                    "css": "width: 400px;",
                    "default": "",
                    "description": "If COD is only available for certain methods, set it up here. Leave blank to enable for all methods.",
                    "options": [],
                    "desc_tip": true,
                    "custom_attributes": {
                        "data-placeholder": "Select shipping methods"
                    }
                },
                "enable_for_virtual": {
                    "title": "Accept for virtual orders",
                    "label": "Accept COD if the order is virtual",
                    "type": "checkbox",
                    "default": "yes"
                }
            },
            "instructions": "Pay with cash upon delivery.",
            "enable_for_methods": [],
            "enable_for_virtual": true
        },
        "net_20": {
            "order_button_text": null,
            "enabled": "yes",
            "title": "Net 20",
            "description": "",
            "chosen": null,
            "method_title": "Net 20",
            "method_description": "",
            "has_fields": true,
            "countries": null,
            "availability": null,
            "icon": "",
            "supports": [
                "products"
            ],
            "max_amount": 0,
            "view_transaction_url": "",
            "new_method_label": "",
            "pay_button_id": "",
            "plugin_id": "woocommerce_",
            "id": "net_20",
            "errors": [],
            "settings": {
                "enabled": "yes",
                "title": "Net 20",
                "description": "",
                "instructions": ""
            },
            "form_fields": {
                "enabled": {
                    "title": "Enable/Disable",
                    "type": "checkbox",
                    "label": "Enable Net 20",
                    "default": "yes"
                },
                "title": {
                    "title": "Title",
                    "type": "text",
                    "description": "This controls the title for the payment method the customer sees during checkout.",
                    "default": "Net 20",
                    "desc_tip": true
                },
                "description": {
                    "title": "Description",
                    "type": "textarea",
                    "description": "Payment method description that the customer will see on your checkout.",
                    "default": null,
                    "desc_tip": true
                }
            },
            "instructions": ""
        }
    }
}

Get Payment Gateways By Role Id

Retrieve Payment Gateways to be shown on specfic user role

HTTP Request

GET
{{Site Url}}wp-json/wc/v3/b2be/payment-gateways

Available Parameters

Parameter Description
role_name -

Sample Response:

{
    "status": 200,
    "message": "Success.",
    "data": {
        "bacs": {
            "locale": null,
            "order_button_text": null,
            "enabled": "yes",
            "title": "Direct bank transfer",
            "description": "Make your payment directly into our bank account. Please use your Order ID as the payment reference. Your order will not be shipped until the funds have cleared in our account.",
            "chosen": null,
            "method_title": "Direct bank transfer",
            "method_description": "Take payments in person via BACS. More commonly known as direct bank/wire transfer",
            "has_fields": false,
            "countries": null,
            "availability": null,
            "icon": "",
            "supports": [
                "products"
            ],
            "max_amount": 0,
            "view_transaction_url": "",
            "new_method_label": "",
            "pay_button_id": "",
            "plugin_id": "woocommerce_",
            "id": "bacs",
            "errors": [],
            "settings": {
                "enabled": "yes",
                "title": "Direct bank transfer",
                "description": "Make your payment directly into our bank account. Please use your Order ID as the payment reference. Your order will not be shipped until the funds have cleared in our account.",
                "instructions": "",
                "account_details": "",
                "account_name": "",
                "account_number": "",
                "sort_code": "",
                "bank_name": "",
                "iban": "",
                "bic": ""
            },
            "form_fields": {
                "enabled": {
                    "title": "Enable/Disable",
                    "type": "checkbox",
                    "label": "Enable bank transfer",
                    "default": "no"
                },
                "title": {
                    "title": "Title",
                    "type": "text",
                    "description": "This controls the title which the user sees during checkout.",
                    "default": "Direct bank transfer",
                    "desc_tip": true
                },
                "description": {
                    "title": "Description",
                    "type": "textarea",
                    "description": "Payment method description that the customer will see on your checkout.",
                    "default": "Make your payment directly into our bank account. Please use your Order ID as the payment reference. Your order will not be shipped until the funds have cleared in our account.",
                    "desc_tip": true
                },
                "instructions": {
                    "title": "Instructions",
                    "type": "textarea",
                    "description": "Instructions that will be added to the thank you page and emails.",
                    "default": "",
                    "desc_tip": true
                },
                "account_details": {
                    "type": "account_details"
                }
            },
            "instructions": "",
            "account_details": [
                {
                    "account_name": "",
                    "account_number": "",
                    "sort_code": "",
                    "bank_name": "",
                    "iban": "",
                    "bic": ""
                }
            ]
        },
        "cod": {
            "order_button_text": null,
            "enabled": "yes",
            "title": "Cash on delivery",
            "description": "Pay with cash upon delivery.",
            "chosen": null,
            "method_title": "Cash on delivery",
            "method_description": "Have your customers pay with cash (or by other means) upon delivery.",
            "has_fields": false,
            "countries": null,
            "availability": null,
            "icon": "",
            "supports": [
                "products"
            ],
            "max_amount": 0,
            "view_transaction_url": "",
            "new_method_label": "",
            "pay_button_id": "",
            "plugin_id": "woocommerce_",
            "id": "cod",
            "errors": [],
            "settings": {
                "enabled": "yes",
                "title": "Cash on delivery",
                "description": "Pay with cash upon delivery.",
                "instructions": "Pay with cash upon delivery.",
                "enable_for_methods": [],
                "enable_for_virtual": "yes"
            },
            "form_fields": {
                "enabled": {
                    "title": "Enable/Disable",
                    "label": "Enable cash on delivery",
                    "type": "checkbox",
                    "description": "",
                    "default": "no"
                },
                "title": {
                    "title": "Title",
                    "type": "text",
                    "description": "Payment method description that the customer will see on your checkout.",
                    "default": "Cash on delivery",
                    "desc_tip": true
                },
                "description": {
                    "title": "Description",
                    "type": "textarea",
                    "description": "Payment method description that the customer will see on your website.",
                    "default": "Pay with cash upon delivery.",
                    "desc_tip": true
                },
                "instructions": {
                    "title": "Instructions",
                    "type": "textarea",
                    "description": "Instructions that will be added to the thank you page.",
                    "default": "Pay with cash upon delivery.",
                    "desc_tip": true
                },
                "enable_for_methods": {
                    "title": "Enable for shipping methods",
                    "type": "multiselect",
                    "class": "wc-enhanced-select",
                    "css": "width: 400px;",
                    "default": "",
                    "description": "If COD is only available for certain methods, set it up here. Leave blank to enable for all methods.",
                    "options": [],
                    "desc_tip": true,
                    "custom_attributes": {
                        "data-placeholder": "Select shipping methods"
                    }
                },
                "enable_for_virtual": {
                    "title": "Accept for virtual orders",
                    "label": "Accept COD if the order is virtual",
                    "type": "checkbox",
                    "default": "yes"
                }
            },
            "instructions": "Pay with cash upon delivery.",
            "enable_for_methods": [],
            "enable_for_virtual": true
        },
        "net_20": {
            "order_button_text": null,
            "enabled": "yes",
            "title": "Net 20",
            "description": "",
            "chosen": null,
            "method_title": "Net 20",
            "method_description": "",
            "has_fields": true,
            "countries": null,
            "availability": null,
            "icon": "",
            "supports": [
                "products"
            ],
            "max_amount": 0,
            "view_transaction_url": "",
            "new_method_label": "",
            "pay_button_id": "",
            "plugin_id": "woocommerce_",
            "id": "net_20",
            "errors": [],
            "settings": {
                "enabled": "yes",
                "title": "Net 20",
                "description": "",
                "instructions": ""
            },
            "form_fields": {
                "enabled": {
                    "title": "Enable/Disable",
                    "type": "checkbox",
                    "label": "Enable Net 20",
                    "default": "yes"
                },
                "title": {
                    "title": "Title",
                    "type": "text",
                    "description": "This controls the title for the payment method the customer sees during checkout.",
                    "default": "Net 20",
                    "desc_tip": true
                },
                "description": {
                    "title": "Description",
                    "type": "textarea",
                    "description": "Payment method description that the customer will see on your checkout.",
                    "default": null,
                    "desc_tip": true
                }
            },
            "instructions": ""
        }
    }
}

Template Overriding

How To Edit

Edit files in an upgrade-safe way using overrides. Copy the template into a directory within your theme named
/b2b-ecommerce-for-woocommerce keeping the same file structure but removing the /templates/ subdirectory.

The copied file will now override the B2B Ecommerce For WooComerce default template file.

Warning: Do not edit these files within the core plugin itself as they are overwritten during the upgrade process and any customizations will be lost.

Template list

Template files can be found within the /b2b-ecommerce-for-woocommerce/templates/ directory:

  • bulk-discount
  • credit-payment
  • request-for-quote
  • signup-form
B2B Ecommerce For WooComerce hooks documentation generated by Codup

Let’s Talk

We’re currently seeking beta testers for our managed cloud offering. Interested?