Buy B2BKing
$299 $199
The invoice payment gateway allows customers to check out without immediate payment by selecting the "Invoice Payment" option.
Once a customer checks out, they will receive an email notifying them to expect an invoice.
B2BKing does not generate invoices directly — it is not an invoicing solution. You can send invoices to customers manually or by using a free invoicing plugin.
B2BKing is compatible with most invoicing plugins, but we generally recommend the free PDF Invoices & Packing Slips plugin. To learn how to send invoices to customers automatically using this plugin, read further below.
Enabling the invoice payment gateway is simple. Go to WooCommerce -> Settings -> Payments and activate the "Invoice Payment" option.
The gateway can also be configured further by clicking on it, after which you will see the following settings panel:
Here you can control the title and description that customers see during checkout.
After you enable the payment gateway, make sure to also enable it for each group in B2BKing -> Groups. This functionality allows you to control payment methods by group. For example, you can enable invoice payments for B2B users only in a B2B + B2C hybrid store.
The invoice payment gateway is fully editable, and you can display any text you want to your customers. For example, if you're using Net 30 terms, you could set it up as follows.
Edit the invoice method by going to WooCommerce -> Settings -> Payments and entering any text you'd like, such as:
Customers will then see it as follows during checkout:
You may want to send an invoice automatically and immediately when a customer places an order via the B2BKing Invoice gateway.
To do this, you can use the following invoicing plugin (free version):
PDF Invoices & Packing Slips for WooCommerce
Then go to this plugin's settings and enable "Attach to: Order on-hold":
Finally, you may want to add the following PHP code snippet to your site:
add_filter('wpo_wcpdf_document_is_allowed', function( $allowed, $document ) { if ( ! empty( $order = $document->order ) && $document->get_type() == 'invoice' ) { $payment_method_title = is_callable( array( $order,'get_payment_method' ) ) ? $order->get_payment_method() : ''; if ( stripos( $payment_method_title, 'b2bking-invoice-gateway' ) === false ) { $allowed = false; } } return $allowed; }, 10, 2 );
This snippet ensures that the invoice is only attached when the customer uses the invoice payment gateway.
By default, the invoice gateway sets orders to the "On Hold" status. If you'd like to change this, you can do so by adding a PHP code snippet to your site.
For example, to change this to the "Processing" status, add the following:
add_filter('b2bking_invoice_payment_order_status', function($status, $order){ return 'processing'; }, 10, 2);
Powered by BetterDocs