diff --git a/CHANGELOG.md b/CHANGELOG.md
index 7126e89a5..5cbf25e0a 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -1,5 +1,12 @@
# Changelog
+## 8.10.0 - 2022-07-07
+* [#1319](https://github.com/stripe/stripe-php/pull/1319) API Updates
+ * Add support for `currency_options` on `Coupon` and `Price`
+ * Add support for `currency` on `Subscription`
+* [#1318](https://github.com/stripe/stripe-php/pull/1318) API Updates
+ * Add support for new values financial_connections.account.created, financial_connections.account.deactivated, financial_connections.account.disconnected, financial_connections.account.reactivated, and financial_connections.account.refreshed_balance on `Event`.
+
## 8.9.0 - 2022-06-29
* [#1316](https://github.com/stripe/stripe-php/pull/1316) API Updates
* Add support for `deliver_card`, `fail_card`, `return_card`, and `ship_card` test helper methods on resource `Issuing.Card`
@@ -9,7 +16,7 @@
* Change type of `PaymentLink.payment_method_types[]` from `literal('card')` to `enum`
* Add support for `promptpay` on `PaymentMethod`
* Add support for new value `promptpay` on enum `PaymentMethod.type`
- * Add support for `hosted_regulatory_receipt_url` and `reversal_details` on `Treasury.ReceivedCredit` and `Treasury.ReceivedDebit`
+ * Add support for `hosted_regulatory_receipt_url` and `reversal_details` on `Treasury.ReceivedCredit` and `Treasury.ReceivedDebit`
## 8.8.0 - 2022-06-23
* [#1302](https://github.com/stripe/stripe-php/pull/1302) API Updates
@@ -47,7 +54,6 @@
* Add support for `id_number_secondary_provided` on `Person`
* [#1295](https://github.com/stripe/stripe-php/pull/1295) API Updates
-
## 8.3.0 - 2022-05-23
* [#1294](https://github.com/stripe/stripe-php/pull/1294) API Updates
* Add support for new resource `Apps.Secret`
@@ -87,7 +93,6 @@
* Add support for `default_price` on `Product`
* Add support for `instructions_email` on `Refund`
-
## 7.127.0 - 2022-05-05
* [#1281](https://github.com/stripe/stripe-php/pull/1281) API Updates
* Add support for new resources `FinancialConnections.AccountOwner`, `FinancialConnections.AccountOwnership`, `FinancialConnections.Account`, and `FinancialConnections.Session`
@@ -118,7 +123,6 @@
* Add support for new value `customer_balance` on enum `PaymentMethod.type`
* Add support for `configuration_overrides` on `Terminal.Location`
-
## 7.123.0 - 2022-04-13
* [#1263](https://github.com/stripe/stripe-php/pull/1263) API Updates
* Add support for `increment_authorization` method on resource `PaymentIntent`
@@ -156,7 +160,6 @@
* Add support for new values `bg_uic`, `hu_tin`, and `si_tin` on enum `TaxId.type`
* Add `test_helpers.test_clock.advancing`, `test_helpers.test_clock.created`, `test_helpers.test_clock.deleted`, `test_helpers.test_clock.internal_failure`, and `test_helpers.test_clock.ready` events.
-
## 7.117.0 - 2022-03-18
* [#1254](https://github.com/stripe/stripe-php/pull/1254) API Updates
* Add support for `status` on `Card`
@@ -167,7 +170,6 @@
* [#1248](https://github.com/stripe/stripe-php/pull/1248) API Updates
* Add support for `proration_details` on `InvoiceLineItem`
-
## 7.115.0 - 2022-03-01
* [#1245](https://github.com/stripe/stripe-php/pull/1245) [#1247](https://github.com/stripe/stripe-php/pull/1247) API Updates
* Add support for new resource `TestHelpers.TestClock`
@@ -192,7 +194,6 @@
* Add support for `phone_number_collection` on `PaymentLink`
* Add support for new value `is_vat` on enum `TaxId.type`
-
## 7.111.0 - 2022-01-20
* [#1233](https://github.com/stripe/stripe-php/pull/1233) API Updates
* Add support for new resource `PaymentLink`
@@ -337,7 +338,6 @@
* [#1141](https://github.com/stripe/stripe-php/pull/1141) Update PHPDocs
* Add support for `url` on `Checkout\Session`
-
## 7.83.0 - 2021-06-07
* [#1140](https://github.com/stripe/stripe-php/pull/1140) API Updates
* Added support for `tax_id_collection` on `Checkout\Session` and `Checkout\Session#create`
@@ -405,7 +405,6 @@
* Add support for `nationality` on `Person`
* Add member `gb_vat` of `TaxID` enum
-
## 7.69.0 - 2021-01-21
* [#1079](https://github.com/stripe/stripe-php/pull/1079) Update PHPDocs
@@ -1727,3 +1726,4 @@ Pull requests included in this release:
- Add new Transfer resource
- Switch from using HTTP Basic auth to Bearer auth. (Note: Stripe will support Basic auth for the indefinite future, but recommends Bearer auth when possible going forward)
- Numerous test suite improvements
+
diff --git a/OPENAPI_VERSION b/OPENAPI_VERSION
index 515f433c0..1f7b99f73 100644
--- a/OPENAPI_VERSION
+++ b/OPENAPI_VERSION
@@ -1 +1 @@
-v161
\ No newline at end of file
+v163
\ No newline at end of file
diff --git a/lib/CashBalance.php b/lib/CashBalance.php
index c63f272f1..3e7396157 100644
--- a/lib/CashBalance.php
+++ b/lib/CashBalance.php
@@ -10,7 +10,7 @@
* for payment and can eventually be paid out to your bank account.
*
* @property string $object String representing the object's type. Objects of the same type share the same value.
- * @property null|\Stripe\StripeObject $available A hash of all cash balances available to this customer. You cannot delete a customer with any cash balances, even if the balance is 0.
+ * @property null|\Stripe\StripeObject $available A hash of all cash balances available to this customer. You cannot delete a customer with any cash balances, even if the balance is 0. Amounts are represented in the smallest currency unit.
* @property string $customer The ID of the customer whose cash balance this object represents.
* @property bool $livemode Has the value true
if the object exists in live mode or the value false
if the object exists in test mode.
* @property \Stripe\StripeObject $settings
diff --git a/lib/Coupon.php b/lib/Coupon.php
index 424c22226..ce9b611d5 100644
--- a/lib/Coupon.php
+++ b/lib/Coupon.php
@@ -21,6 +21,7 @@
* @property \Stripe\StripeObject $applies_to
* @property int $created Time at which the object was created. Measured in seconds since the Unix epoch.
* @property null|string $currency If amount_off
has been set, the three-letter ISO code for the currency of the amount to take off.
+ * @property \Stripe\StripeObject $currency_options Coupons defined in each available currency option. Each key must be a three-letter ISO currency code and a supported currency.
* @property string $duration One of forever
, once
, and repeating
. Describes how long a customer who applies this coupon will get the discount.
* @property null|int $duration_in_months If duration
is repeating
, the number of months the coupon applies. Null if coupon duration
is forever
or once
.
* @property bool $livemode Has the value true
if the object exists in live mode or the value false
if the object exists in test mode.
diff --git a/lib/Event.php b/lib/Event.php
index 91a39dd6c..e4c2ce3eb 100644
--- a/lib/Event.php
+++ b/lib/Event.php
@@ -118,6 +118,11 @@ class Event extends ApiResource
const CUSTOMER_TAX_ID_UPDATED = 'customer.tax_id.updated';
const CUSTOMER_UPDATED = 'customer.updated';
const FILE_CREATED = 'file.created';
+ const FINANCIAL_CONNECTIONS_ACCOUNT_CREATED = 'financial_connections.account.created';
+ const FINANCIAL_CONNECTIONS_ACCOUNT_DEACTIVATED = 'financial_connections.account.deactivated';
+ const FINANCIAL_CONNECTIONS_ACCOUNT_DISCONNECTED = 'financial_connections.account.disconnected';
+ const FINANCIAL_CONNECTIONS_ACCOUNT_REACTIVATED = 'financial_connections.account.reactivated';
+ const FINANCIAL_CONNECTIONS_ACCOUNT_REFRESHED_BALANCE = 'financial_connections.account.refreshed_balance';
const IDENTITY_VERIFICATION_SESSION_CANCELED = 'identity.verification_session.canceled';
const IDENTITY_VERIFICATION_SESSION_CREATED = 'identity.verification_session.created';
const IDENTITY_VERIFICATION_SESSION_PROCESSING = 'identity.verification_session.processing';
diff --git a/lib/PaymentIntent.php b/lib/PaymentIntent.php
index b7d777abc..eafb9244c 100644
--- a/lib/PaymentIntent.php
+++ b/lib/PaymentIntent.php
@@ -49,6 +49,7 @@
* @property null|\Stripe\StripeObject $processing If present, this property tells you about the processing state of the payment.
* @property null|string $receipt_email Email address that the receipt for the resulting payment will be sent to. If receipt_email
is specified for a payment in live mode, a receipt will be sent regardless of your email settings.
* @property null|string|\Stripe\Review $review ID of the review associated with this PaymentIntent, if any.
+ * @property string $secret_key_confirmation Indicates whether confirmation for this PaymentIntent using a secret key is required
or optional
.
* @property null|string $setup_future_usage
Indicates that you intend to make future payments with this PaymentIntent's payment method.
Providing this parameter will attach the payment method to the PaymentIntent's Customer, if present, after the PaymentIntent is confirmed and any required actions from the user are complete. If no Customer was provided, the payment method can still be attached to a Customer after the transaction completes.
When processing card payments, Stripe also uses setup_future_usage
to dynamically optimize your payment flow and comply with regional legislation and network rules, such as SCA.
per_unit
or tiered
. per_unit
indicates that the fixed amount (specified in unit_amount
or unit_amount_decimal
) will be charged per unit in quantity
(for prices with usage_type=licensed
), or per unit of total usage (for prices with usage_type=metered
). tiered
indicates that the unit pricing will be computed using a tiering strategy as defined using the tiers
and tiers_mode
attributes.
* @property int $created Time at which the object was created. Measured in seconds since the Unix epoch.
* @property string $currency Three-letter ISO currency code, in lowercase. Must be a supported currency.
+ * @property \Stripe\StripeObject $currency_options Prices defined in each available currency option. Each key must be a three-letter ISO currency code and a supported currency.
* @property null|\Stripe\StripeObject $custom_unit_amount When set, provides configuration for the amount to be adjusted by the customer during Checkout Sessions and Payment Links.
* @property bool $livemode Has the value true
if the object exists in live mode or the value false
if the object exists in test mode.
* @property null|string $lookup_key A lookup key used to retrieve prices dynamically from a static string. This may be up to 200 characters.
diff --git a/lib/Service/CustomerService.php b/lib/Service/CustomerService.php
index 0b717130e..f7a9980f2 100644
--- a/lib/Service/CustomerService.php
+++ b/lib/Service/CustomerService.php
@@ -410,7 +410,7 @@ public function updateBalanceTransaction($parentId, $id, $params = null, $opts =
}
/**
- * Updates a customer’s cash balance.
+ * Changes the settings on a customer’s cash balance.
*
* @param string $parentId
* @param null|array $params
diff --git a/lib/Subscription.php b/lib/Subscription.php
index 648504130..3166e6d40 100644
--- a/lib/Subscription.php
+++ b/lib/Subscription.php
@@ -23,6 +23,7 @@
* @property null|int $canceled_at If the subscription has been canceled, the date of that cancellation. If the subscription was canceled with cancel_at_period_end
, canceled_at
will reflect the time of the most recent update request, not the end of the subscription period when the subscription is automatically moved to a canceled state.
* @property string $collection_method Either charge_automatically
, or send_invoice
. When charging automatically, Stripe will attempt to pay this subscription at the end of the cycle using the default source attached to the customer. When sending an invoice, Stripe will email your customer an invoice with payment instructions.
* @property int $created Time at which the object was created. Measured in seconds since the Unix epoch.
+ * @property string $currency Three-letter ISO currency code, in lowercase. Must be a supported currency.
* @property int $current_period_end End of the current period that the subscription has been invoiced for. At the end of this period, a new invoice will be created.
* @property int $current_period_start Start of the current period that the subscription has been invoiced for.
* @property string|\Stripe\Customer $customer ID of the customer who owns the subscription.
diff --git a/lib/Util/ApiVersion.php b/lib/Util/ApiVersion.php
index 178b8d4ba..3d2f87f38 100644
--- a/lib/Util/ApiVersion.php
+++ b/lib/Util/ApiVersion.php
@@ -6,5 +6,5 @@
class ApiVersion
{
- const CURRENT = '2020-08-27';
+ const CURRENT = '2020-08-27; server_side_confirmation_beta=v1';
}
diff --git a/tests/Stripe/GeneratedExamplesTest.php b/tests/Stripe/GeneratedExamplesTest.php
index f21033f1f..5e30052c9 100644
--- a/tests/Stripe/GeneratedExamplesTest.php
+++ b/tests/Stripe/GeneratedExamplesTest.php
@@ -211,6 +211,15 @@ public function testRetrieveSession()
static::assertInstanceOf(\Stripe\FinancialConnections\Session::class, $result);
}
+ public function testUpcomingInvoice()
+ {
+ $this->expectsRequest('get', '/v1/invoices/upcoming');
+ $result = $this->client->invoices->upcoming(
+ ['customer' => 'cus_9utnxg47pWjV1e']
+ );
+ static::assertInstanceOf(\Stripe\Invoice::class, $result);
+ }
+
public function testCreateOrder()
{
$this->expectsRequest('post', '/v1/orders');
@@ -320,6 +329,24 @@ public function testListLineItemsPaymentLink()
static::assertInstanceOf(\Stripe\LineItem::class, $result->data[0]);
}
+ public function testCreatePrice()
+ {
+ $this->expectsRequest('post', '/v1/prices');
+ $result = $this->client->prices->create(
+ [
+ 'unit_amount' => 2000,
+ 'currency' => 'usd',
+ 'currency_options' => [
+ 'uah' => ['unit_amount' => 5000],
+ 'eur' => ['unit_amount' => 1800],
+ ],
+ 'recurring' => ['interval' => 'month'],
+ 'product' => 'prod_xxxxxxxxxxxxx',
+ ]
+ );
+ static::assertInstanceOf(\Stripe\Price::class, $result);
+ }
+
public function testListSetupAttempt()
{
$this->expectsRequest('get', '/v1/setup_attempts');
@@ -2303,7 +2330,7 @@ public function testListPrice()
static::assertInstanceOf(\Stripe\Price::class, $result->data[0]);
}
- public function testCreatePrice()
+ public function testCreatePrice2()
{
$this->expectsRequest('post', '/v1/prices');
$result = $this->client->prices->create(