diff --git a/lib/PaymentIntent.php b/lib/PaymentIntent.php index 63f30bd0e..ee6f4224a 100644 --- a/lib/PaymentIntent.php +++ b/lib/PaymentIntent.php @@ -124,4 +124,21 @@ public function confirm($params = null, $opts = null) return $this; } + + /** + * @param null|array $params + * @param null|array|string $opts + * + * @throws \Stripe\Exception\ApiErrorException if the request fails + * + * @return \Stripe\PaymentIntent the verified payment intent + */ + public function verifyMicrodeposits($params = null, $opts = null) + { + $url = $this->instanceUrl() . '/verify_microdeposits'; + list($response, $opts) = $this->_request('post', $url, $params, $opts); + $this->refreshFrom($response, $opts); + + return $this; + } } diff --git a/lib/Plan.php b/lib/Plan.php index 2a818e474..c3621fa6c 100644 --- a/lib/Plan.php +++ b/lib/Plan.php @@ -22,7 +22,7 @@ * Related guides: Set up * a subscription and more about products and prices. + * href="https://stripe.com/docs/products-prices/overview">products and prices. * * @property string $id Unique identifier for the object. * @property string $object String representing the object's type. Objects of the same type share the same value. diff --git a/lib/Price.php b/lib/Price.php index 878a7a2c4..f2f31b20d 100644 --- a/lib/Price.php +++ b/lib/Price.php @@ -20,8 +20,8 @@ * href="https://stripe.com/docs/billing/subscriptions/set-up-subscription">Set up * a subscription, create an invoice, - * and more about products - * and prices. + * and more about products and prices. * * @property string $id Unique identifier for the object. * @property string $object String representing the object's type. Objects of the same type share the same value. diff --git a/lib/Product.php b/lib/Product.php index 316409692..5ea23eab8 100644 --- a/lib/Product.php +++ b/lib/Product.php @@ -9,14 +9,16 @@ * For example, you might offer a Standard and Premium version of your goods or * service; each version would be a separate Product. They can be used in * conjunction with Prices to - * configure pricing in Checkout and Subscriptions. + * configure pricing in Payment Links, Checkout, and Subscriptions. * * Related guides: Set up - * a subscription or accept one-time - * payments with Checkout and more about Products and Prices + * a subscription, share a Payment + * Link, accept + * payments with Checkout, and more about Products and Prices * * @property string $id Unique identifier for the object. * @property string $object String representing the object's type. Objects of the same type share the same value. diff --git a/lib/Service/PaymentIntentService.php b/lib/Service/PaymentIntentService.php index 21935c7ea..3bfe708df 100644 --- a/lib/Service/PaymentIntentService.php +++ b/lib/Service/PaymentIntentService.php @@ -179,4 +179,20 @@ public function update($id, $params = null, $opts = null) { return $this->request('post', $this->buildPath('/v1/payment_intents/%s', $id), $params, $opts); } + + /** + * Verifies microdeposits on a PaymentIntent object. + * + * @param string $id + * @param null|array $params + * @param null|array|\Stripe\Util\RequestOptions $opts + * + * @throws \Stripe\Exception\ApiErrorException if the request fails + * + * @return \Stripe\PaymentIntent + */ + public function verifyMicrodeposits($id, $params = null, $opts = null) + { + return $this->request('post', $this->buildPath('/v1/payment_intents/%s/verify_microdeposits', $id), $params, $opts); + } } diff --git a/lib/Service/SetupIntentService.php b/lib/Service/SetupIntentService.php index 99a06c825..3dea24cbc 100644 --- a/lib/Service/SetupIntentService.php +++ b/lib/Service/SetupIntentService.php @@ -124,4 +124,20 @@ public function update($id, $params = null, $opts = null) { return $this->request('post', $this->buildPath('/v1/setup_intents/%s', $id), $params, $opts); } + + /** + * Verifies microdeposits on a SetupIntent object. + * + * @param string $id + * @param null|array $params + * @param null|array|\Stripe\Util\RequestOptions $opts + * + * @throws \Stripe\Exception\ApiErrorException if the request fails + * + * @return \Stripe\SetupIntent + */ + public function verifyMicrodeposits($id, $params = null, $opts = null) + { + return $this->request('post', $this->buildPath('/v1/setup_intents/%s/verify_microdeposits', $id), $params, $opts); + } } diff --git a/lib/SetupIntent.php b/lib/SetupIntent.php index 081bb2d47..13ba54193 100644 --- a/lib/SetupIntent.php +++ b/lib/SetupIntent.php @@ -111,4 +111,21 @@ public function confirm($params = null, $opts = null) return $this; } + + /** + * @param null|array $params + * @param null|array|string $opts + * + * @throws \Stripe\Exception\ApiErrorException if the request fails + * + * @return \Stripe\SetupIntent the verified setup intent + */ + public function verifyMicrodeposits($params = null, $opts = null) + { + $url = $this->instanceUrl() . '/verify_microdeposits'; + list($response, $opts) = $this->_request('post', $url, $params, $opts); + $this->refreshFrom($response, $opts); + + return $this; + } } diff --git a/lib/SubscriptionItem.php b/lib/SubscriptionItem.php index b900b3fd2..36afdf831 100644 --- a/lib/SubscriptionItem.php +++ b/lib/SubscriptionItem.php @@ -13,8 +13,8 @@ * @property null|\Stripe\StripeObject $billing_thresholds Define thresholds at which an invoice will be sent, and the related subscription advanced to a new billing period * @property int $created Time at which the object was created. Measured in seconds since the Unix epoch. * @property \Stripe\StripeObject $metadata Set of key-value pairs that you can attach to an object. This can be useful for storing additional information about the object in a structured format. - * @property \Stripe\Plan $plan
You can now model subscriptions more flexibly using the Prices API. It replaces the Plans API and is backwards compatible to simplify your migration.
Plans define the base price, currency, and billing cycle for recurring purchases of products. Products help you track inventory or provisioning, and plans help you track pricing. Different physical goods or levels of service should be represented by products, and pricing options should be represented by plans. This approach lets you change prices without having to change your provisioning scheme.
For example, you might have a single "gold" product that has plans for $10/month, $100/year, €9/month, and €90/year.
Related guides: Set up a subscription and more about products and prices.
- * @property \Stripe\Price $pricePrices define the unit cost, currency, and (optional) billing cycle for both recurring and one-time purchases of products. Products help you track inventory or provisioning, and prices help you track payment terms. Different physical goods or levels of service should be represented by products, and pricing options should be represented by prices. This approach lets you change prices without having to change your provisioning scheme.
For example, you might have a single "gold" product that has prices for $10/month, $100/year, and €9 once.
Related guides: Set up a subscription, create an invoice, and more about products and prices.
+ * @property \Stripe\Plan $planYou can now model subscriptions more flexibly using the Prices API. It replaces the Plans API and is backwards compatible to simplify your migration.
Plans define the base price, currency, and billing cycle for recurring purchases of products. Products help you track inventory or provisioning, and plans help you track pricing. Different physical goods or levels of service should be represented by products, and pricing options should be represented by plans. This approach lets you change prices without having to change your provisioning scheme.
For example, you might have a single "gold" product that has plans for $10/month, $100/year, €9/month, and €90/year.
Related guides: Set up a subscription and more about products and prices.
+ * @property \Stripe\Price $pricePrices define the unit cost, currency, and (optional) billing cycle for both recurring and one-time purchases of products. Products help you track inventory or provisioning, and prices help you track payment terms. Different physical goods or levels of service should be represented by products, and pricing options should be represented by prices. This approach lets you change prices without having to change your provisioning scheme.
For example, you might have a single "gold" product that has prices for $10/month, $100/year, and €9 once.
Related guides: Set up a subscription, create an invoice, and more about products and prices.
* @property int $quantity The quantity of the plan to which the customer should be subscribed. * @property string $subscription Thesubscription
this subscription_item
belongs to.
* @property null|\Stripe\TaxRate[] $tax_rates The tax rates which apply to this subscription_item
. When set, the default_tax_rates
on the subscription do not apply to this subscription_item
.