From 3c8d8b4d7b611328e158439ee57fb43cd538785b Mon Sep 17 00:00:00 2001
From: Khalil Bouzidi <49455868+Safemood@users.noreply.github.com>
Date: Fri, 8 Apr 2022 15:50:32 +0100
Subject: [PATCH 1/4] add tabPrice for multiple items
add the `tabPrice` method to the documentation for multiple items per invoice.
---
billing.md | 10 ++++++++--
1 file changed, 8 insertions(+), 2 deletions(-)
diff --git a/billing.md b/billing.md
index b4bc82f7fcc..ef199f8be84 100644
--- a/billing.md
+++ b/billing.md
@@ -1513,9 +1513,15 @@ Alternatively, you may use the `invoiceFor` method to make a "one-off" charge ag
$user->invoiceFor('One Time Fee', 500);
-Although the `invoiceFor` method is available for you to use, it is recommendeded that you use the `invoicePrice` method with pre-defined prices. By doing so, you will have access to better analytics and data within your Stripe dashboard regarding your sales on a per-product basis.
+Similarly to `invoicePrice` you can make a one-time charge for multiple items (up to 250 items per invoice) and generate a PDF receipt as well. The `tabPrice` method
+enables you to do so. For example, let's invoice a customer for two different products five shirts and 2 mugs:
-> {note} The `invoicePrice` and `invoiceFor` methods will create a Stripe invoice which will retry failed billing attempts. If you do not want invoices to retry failed charges, you will need to close them using the Stripe API after the first failed charge.
+ $user->tabPrice('price_tshirt', 5);
+ $user->tabPrice('price_mug', 2);
+
+Although the `invoiceFor` method is available for you to use, it is recommendeded that you use the `invoicePrice` and `tabPrice` methods with pre-defined prices. By doing so, you will have access to better analytics and data within your Stripe dashboard regarding your sales on a per-product basis.
+
+> {note} The `invoiceFor`, `invoicePrice` and `tabPrice` methods will create a Stripe invoice which will retry failed billing attempts. If you do not want invoices to retry failed charges, you will need to close them using the Stripe API after the first failed charge.
### Refunding Charges
From 6cf38f07242a8ea6cc3db0271c7465613b42792c Mon Sep 17 00:00:00 2001
From: Taylor Otwell
Date: Fri, 8 Apr 2022 14:15:37 -0500
Subject: [PATCH 2/4] Update billing.md
---
billing.md | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/billing.md b/billing.md
index ef199f8be84..e8cddc84482 100644
--- a/billing.md
+++ b/billing.md
@@ -1513,12 +1513,12 @@ Alternatively, you may use the `invoiceFor` method to make a "one-off" charge ag
$user->invoiceFor('One Time Fee', 500);
-Similarly to `invoicePrice` you can make a one-time charge for multiple items (up to 250 items per invoice) and generate a PDF receipt as well. The `tabPrice` method
-enables you to do so. For example, let's invoice a customer for two different products five shirts and 2 mugs:
+Similarly to `invoicePrice`, you may use the `tabPrice` method to create a one-time charge for multiple items (up to 250 items per invoice) by adding them to the customer's "tab" and then invoicing the customer. For example, we may invoice a customer for two different products five shirts and two mugs:
$user->tabPrice('price_tshirt', 5);
$user->tabPrice('price_mug', 2);
-
+ $user->invoice();
+
Although the `invoiceFor` method is available for you to use, it is recommendeded that you use the `invoicePrice` and `tabPrice` methods with pre-defined prices. By doing so, you will have access to better analytics and data within your Stripe dashboard regarding your sales on a per-product basis.
> {note} The `invoiceFor`, `invoicePrice` and `tabPrice` methods will create a Stripe invoice which will retry failed billing attempts. If you do not want invoices to retry failed charges, you will need to close them using the Stripe API after the first failed charge.
From 19128e6d1549a01ad8db64b0a98a5cd41c813d07 Mon Sep 17 00:00:00 2001
From: Taylor Otwell
Date: Fri, 8 Apr 2022 14:17:14 -0500
Subject: [PATCH 3/4] Update billing.md
---
billing.md | 10 +++++-----
1 file changed, 5 insertions(+), 5 deletions(-)
diff --git a/billing.md b/billing.md
index e8cddc84482..b364d1c8e60 100644
--- a/billing.md
+++ b/billing.md
@@ -1509,19 +1509,19 @@ The invoice will be immediately charged against the user's default payment metho
'default_tax_rates' => ['txr_id'],
]);
-Alternatively, you may use the `invoiceFor` method to make a "one-off" charge against the customer's default payment method:
-
- $user->invoiceFor('One Time Fee', 500);
-
Similarly to `invoicePrice`, you may use the `tabPrice` method to create a one-time charge for multiple items (up to 250 items per invoice) by adding them to the customer's "tab" and then invoicing the customer. For example, we may invoice a customer for two different products five shirts and two mugs:
$user->tabPrice('price_tshirt', 5);
$user->tabPrice('price_mug', 2);
$user->invoice();
+Alternatively, you may use the `invoiceFor` method to make a "one-off" charge against the customer's default payment method:
+
+ $user->invoiceFor('One Time Fee', 500);
+
Although the `invoiceFor` method is available for you to use, it is recommendeded that you use the `invoicePrice` and `tabPrice` methods with pre-defined prices. By doing so, you will have access to better analytics and data within your Stripe dashboard regarding your sales on a per-product basis.
-> {note} The `invoiceFor`, `invoicePrice` and `tabPrice` methods will create a Stripe invoice which will retry failed billing attempts. If you do not want invoices to retry failed charges, you will need to close them using the Stripe API after the first failed charge.
+> {note} The `invoice`, `invoicePrice`, and `invoiceFor` methods will create a Stripe invoice which will retry failed billing attempts. If you do not want invoices to retry failed charges, you will need to close them using the Stripe API after the first failed charge.
### Refunding Charges
From ff51bf7d133a94daf21a68ae01eb71fac95078af Mon Sep 17 00:00:00 2001
From: Taylor Otwell
Date: Fri, 8 Apr 2022 14:18:03 -0500
Subject: [PATCH 4/4] Update billing.md
---
billing.md | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/billing.md b/billing.md
index b364d1c8e60..66bf568cdfe 100644
--- a/billing.md
+++ b/billing.md
@@ -1509,7 +1509,7 @@ The invoice will be immediately charged against the user's default payment metho
'default_tax_rates' => ['txr_id'],
]);
-Similarly to `invoicePrice`, you may use the `tabPrice` method to create a one-time charge for multiple items (up to 250 items per invoice) by adding them to the customer's "tab" and then invoicing the customer. For example, we may invoice a customer for two different products five shirts and two mugs:
+Similarly to `invoicePrice`, you may use the `tabPrice` method to create a one-time charge for multiple items (up to 250 items per invoice) by adding them to the customer's "tab" and then invoicing the customer. For example, we may invoice a customer for five shirts and two mugs:
$user->tabPrice('price_tshirt', 5);
$user->tabPrice('price_mug', 2);