Skip to content

Commit b623602

Browse files
committed
Merge branch 'cashier-document-create-stripe-customer-method' of https://github.com/driesvints/docs into driesvints-cashier-document-create-stripe-customer-method
2 parents d14daa3 + c812273 commit b623602

File tree

1 file changed

+14
-0
lines changed

1 file changed

+14
-0
lines changed

billing.md

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,8 @@
1818
- [Subscription Trials](#subscription-trials)
1919
- [With Credit Card Up Front](#with-credit-card-up-front)
2020
- [Without Credit Card Up Front](#without-credit-card-up-front)
21+
- [Customers](#customers)
22+
- [Creating Customers](#create-customers)
2123
- [Handling Stripe Webhooks](#handling-stripe-webhooks)
2224
- [Defining Webhook Event Handlers](#defining-webhook-event-handlers)
2325
- [Failed Subscriptions](#handling-failed-subscriptions)
@@ -450,6 +452,18 @@ Once you are ready to create an actual subscription for the user, you may use th
450452

451453
$user->newSubscription('main', 'monthly')->create($stripeToken);
452454

455+
<a name="customers"></a>
456+
## Customers
457+
458+
<a name="creating-customers"></a>
459+
### Creating Customers
460+
461+
Besides creating subscriptions with a token you can also directly create a customer with a card token. This is handy when you already want to add the user as a customer in your payment provider without starting a subscription.
462+
463+
$user->createAsStripeCustomer($stripeToken);
464+
465+
The Braintree equivalent is the `createAsBraintreeCustomer` method.
466+
453467
<a name="handling-stripe-webhooks"></a>
454468
## Handling Stripe Webhooks
455469

0 commit comments

Comments
 (0)