Skip to content

Using Strikeout

BitcoinBuki edited this page Jul 7, 2023 · 5 revisions

There are two ways to utilize StrikeOut: through a webform or by using the Static Invoice form. Both methods offer convenience and flexibility for creating invoices.

Webforms

By using the webform, you can generate dynamic invoices directly on your website. This allows for real-time calculation of amounts and provides a seamless payment experience for your customers. Simply embed the webform on your website, and customers can fill in the required details to generate an invoice.

Form Fields

Name

This field represents the payee name that will be displayed in the invoice description. If left blank, it will default to Customer.

POST & GET value: name

Reference

Use this field to reference a transaction. Webhook plugins, such as the frontaccounting one, utilize this field to apply payments to a specific customer.

POST & GET value: custId

Action URL

This field allows you to specify the URL where the customer should be redirected after completing the payment. If no value is set, the customer will be redirected to the default URL you configured on the StrikeOut page.

POST & GET value: action_url

Amount

This is the only required field to generate an invoice. Enter the amount in USD. If a non-numeric value is entered, StrikeOut will not generate an invoice.

POST & GET value: amount

You can send these values to the installation's root checkout.php page, which will display active payment options for the client. Alternatively, you can send them directly to a specific payment method's page, for example, your-hostname/strikeout/methods/paypal. You can refer to the following HTML form examples to understand how to generate a transaction from your website.

HTML

HTML form Example 1

This is the create invoice form with class info stripped

<form action="your-hostname.com/strikeout/checkout.php" method="post">
  <h1>Create Invoice</h1>
  <label for="name">Name:</label>
  <input type="text" id="name" name="name">
  <label for="custId">Reference:</label>
  <input type="text" id="custId" name="custId" >
  <label for="amount">Amount:</label>
  <input type="text"  id="amount" name="amount" required>
  <input type="submit" value="Invoice">
</form>

HTML form Example 2

Donate form with only amount set as a number input type

<form action="your-hostname.com/strikeout/checkout.php" method="post">
  <h1>Donate</h1>
  <label for="amount">Amount:</label>
  <input type="number"  id="amount" name="amount" required>
  <input type="submit" value="Donate">
</form>

HTML form Example 3

This example demonstrates a pay button with the amount hidden, using a Pay With Bitcoin button that directly calls LNbits.

<form action="your-hostname/strikeout/methods/lnbits" method="post">
  <input type="hidden"  id="amount" name="amount" value="5.00">
  <input type="submit" value="Pay With Bitcoin">
</form>

Static Invoice

Client Invoice

Alternatively, you can use the Static Invoice form to create a static preset invoice. This generates a URL link and a corresponding QR code that you can copy and paste anywhere you need. This method is ideal for scenarios where you want to provide a pre-determined invoice, such as paper invoices, in-store displays, or emails.

By leveraging these options, StrikeOut enables you to create invoices efficiently and cater to different use cases based on your specific requirements. Choose the method that best suits your needs and seamlessly generate invoices for your customers.