diff --git a/CHANGELOG.md b/CHANGELOG.md
index 1b522e997..f19df3883 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -1,5 +1,18 @@
# Changelog
+## 13.7.0 - 2023-12-22
+* [#1621](https://github.com/stripe/stripe-php/pull/1621) Update generated code
+ * Add support for new resource `FinancialConnections.Transaction`
+ * Add support for `all` and `retrieve` methods on resource `Transaction`
+ * Add support for `subscribe` and `unsubscribe` methods on resource `FinancialConnections.Account`
+ * Add support for new value `financial_connections.account.refreshed_transactions` on enum `Event.type`
+ * Add support for `subscriptions` and `transaction_refresh` on `FinancialConnections.Account`
+ * Add support for new value `transactions` on enum `FinancialConnections.Session.prefetch[]`
+ * Add support for `revolut_pay` on `PaymentMethodConfiguration`
+ * Remove support for `id_bank_transfer`, `multibanco`, `netbanking`, `pay_by_bank`, and `upi` on `PaymentMethodConfiguration`
+ * Change type of `Quote.invoice_settings` from `nullable(InvoiceSettingQuoteSetting)` to `InvoiceSettingQuoteSetting`
+ * Add support for `destination_details` on `Refund`
+
## 13.7.0-beta.1 - 2023-12-08
* [#1617](https://github.com/stripe/stripe-php/pull/1617) Update generated code for beta
* Add support for `retrieve` method on resource `FinancialConnections.Transaction`
diff --git a/OPENAPI_VERSION b/OPENAPI_VERSION
index 2689ae6f7..8f5da3930 100644
--- a/OPENAPI_VERSION
+++ b/OPENAPI_VERSION
@@ -1 +1 @@
-v710
\ No newline at end of file
+v737
\ No newline at end of file
diff --git a/lib/Checkout/Session.php b/lib/Checkout/Session.php
index 5b0b0e974..531a74e78 100644
--- a/lib/Checkout/Session.php
+++ b/lib/Checkout/Session.php
@@ -67,7 +67,7 @@
* @property null|\Stripe\StripeObject $shipping_details Shipping information for this Checkout Session.
* @property \Stripe\StripeObject[] $shipping_options The shipping rate options applied to this Session.
* @property null|string $status The status of the Checkout Session, one of open
, complete
, or expired
.
- * @property null|string $submit_type Describes the type of transaction being performed by Checkout in order to customize relevant text on the page, such as the submit button. submit_type
can only be specified on Checkout Sessions in payment
mode, but not Checkout Sessions in subscription
or setup
mode.
+ * @property null|string $submit_type Describes the type of transaction being performed by Checkout in order to customize relevant text on the page, such as the submit button. submit_type
can only be specified on Checkout Sessions in payment
mode, but not Checkout Sessions in subscription
or setup
mode. Possible values are auto
, pay
, book
, donate
. If blank or auto
, pay
is used.
* @property null|string|\Stripe\Subscription $subscription The ID of the subscription for Checkout Sessions in subscription
mode.
* @property null|string $success_url The URL the customer will be directed to after the payment or subscription creation is successful.
* @property null|\Stripe\StripeObject $tax_id_collection
diff --git a/lib/ConfirmationToken.php b/lib/ConfirmationToken.php
index 2d9fbacef..e86ed6685 100644
--- a/lib/ConfirmationToken.php
+++ b/lib/ConfirmationToken.php
@@ -9,6 +9,8 @@
* to your server for confirming a PaymentIntent or SetupIntent. If the confirmation
* is successful, values present on the ConfirmationToken are written onto the Intent.
*
+ * To learn more or request access, visit the related guided: Finalize payments on the server using Confirmation Tokens.
+ *
* @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.
* @property int $created Time at which the object was created. Measured in seconds since the Unix epoch.
diff --git a/lib/ErrorObject.php b/lib/ErrorObject.php
index 6e94a2041..87650e290 100644
--- a/lib/ErrorObject.php
+++ b/lib/ErrorObject.php
@@ -190,6 +190,7 @@ class ErrorObject extends StripeObject
const CODE_SETUP_INTENT_MANDATE_INVALID = 'setup_intent_mandate_invalid';
const CODE_SETUP_INTENT_SETUP_ATTEMPT_EXPIRED = 'setup_intent_setup_attempt_expired';
const CODE_SETUP_INTENT_UNEXPECTED_STATE = 'setup_intent_unexpected_state';
+ const CODE_SHIPPING_ADDRESS_INVALID = 'shipping_address_invalid';
const CODE_SHIPPING_CALCULATION_FAILED = 'shipping_calculation_failed';
const CODE_SKU_INACTIVE = 'sku_inactive';
const CODE_STATE_UNSUPPORTED = 'state_unsupported';
diff --git a/lib/File.php b/lib/File.php
index a5d2b9e27..b64c77a5c 100644
--- a/lib/File.php
+++ b/lib/File.php
@@ -8,7 +8,7 @@
* This object represents files hosted on Stripe's servers. You can upload
* files with the create file request
* (for example, when uploading dispute evidence). Stripe also
- * creates files independetly (for example, the results of a Sigma scheduled
+ * creates files independently (for example, the results of a Sigma scheduled
* query).
*
* Related guide: File upload guide
diff --git a/lib/Invoice.php b/lib/Invoice.php
index 74ae66b04..f984bdb06 100644
--- a/lib/Invoice.php
+++ b/lib/Invoice.php
@@ -82,7 +82,7 @@
* @property null|\Stripe\StripeObject $from_invoice Details of the invoice that was cloned. See the revision documentation for more details.
* @property null|string $hosted_invoice_url The URL for the hosted invoice page, which allows customers to view and pay an invoice. If the invoice has not been finalized yet, this will be null.
* @property null|string $invoice_pdf The link to download the PDF for the invoice. If the invoice has not been finalized yet, this will be null.
- * @property null|\Stripe\StripeObject $issuer The connected account that issues the invoice. The invoice is presented with the branding and support information of the specified account.
+ * @property null|\Stripe\StripeObject $issuer
* @property null|\Stripe\StripeObject $last_finalization_error The error encountered during the previous attempt to finalize the invoice. This field is cleared when the invoice is successfully finalized.
* @property null|string|\Stripe\Invoice $latest_revision The ID of the most recent non-draft revision of this invoice
* @property \Stripe\Collection<\Stripe\InvoiceLineItem> $lines The individual line items that make up the invoice. lines
is sorted as follows: (1) pending invoice items (including prorations) in reverse chronological order, (2) subscription items in reverse chronological order, and (3) invoice items added after invoice creation in chronological order.
diff --git a/lib/PaymentMethodConfiguration.php b/lib/PaymentMethodConfiguration.php
index 39d6be8ac..ad0b4a49a 100644
--- a/lib/PaymentMethodConfiguration.php
+++ b/lib/PaymentMethodConfiguration.php
@@ -60,6 +60,7 @@
* @property null|\Stripe\StripeObject $paynow
* @property null|\Stripe\StripeObject $paypal
* @property null|\Stripe\StripeObject $promptpay
+ * @property null|\Stripe\StripeObject $revolut_pay
* @property null|\Stripe\StripeObject $sepa_debit
* @property null|\Stripe\StripeObject $sofort
* @property null|\Stripe\StripeObject $upi
diff --git a/lib/Quote.php b/lib/Quote.php
index d8cf17e24..3dbe32046 100644
--- a/lib/Quote.php
+++ b/lib/Quote.php
@@ -30,7 +30,7 @@
* @property null|\Stripe\StripeObject $from_quote Details of the quote that was cloned. See the cloning documentation for more details.
* @property null|string $header A header that will be displayed on the quote PDF.
* @property null|string|\Stripe\Invoice $invoice The invoice that was created from this quote.
- * @property null|\Stripe\StripeObject $invoice_settings All invoices will be billed using the specified settings.
+ * @property \Stripe\StripeObject $invoice_settings
* @property null|\Stripe\Collection<\Stripe\LineItem> $line_items A list of items the customer is being quoted for.
* @property null|string[] $lines A list of lines on the quote. These lines describe changes, in the order provided, that will be used to create new subscription schedules or update existing subscription schedules when the quote is accepted.
* @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/QuotePreviewInvoice.php b/lib/QuotePreviewInvoice.php
index 3f26ae103..c3d592e1e 100644
--- a/lib/QuotePreviewInvoice.php
+++ b/lib/QuotePreviewInvoice.php
@@ -78,7 +78,7 @@
* @property null|int $ending_balance Ending customer balance after the invoice is finalized. Invoices are finalized approximately an hour after successful webhook delivery or when payment collection is attempted for the invoice. If the invoice has not been finalized yet, this will be null.
* @property null|string $footer Footer displayed on the invoice.
* @property null|\Stripe\StripeObject $from_invoice Details of the invoice that was cloned. See the revision documentation for more details.
- * @property null|\Stripe\StripeObject $issuer The connected account that issues the invoice. The invoice is presented with the branding and support information of the specified account.
+ * @property null|\Stripe\StripeObject $issuer
* @property null|\Stripe\StripeObject $last_finalization_error The error encountered during the previous attempt to finalize the invoice. This field is cleared when the invoice is successfully finalized.
* @property null|string|\Stripe\Invoice $latest_revision The ID of the most recent non-draft revision of this invoice
* @property \Stripe\Collection<\Stripe\InvoiceLineItem> $lines The individual line items that make up the invoice. lines
is sorted as follows: (1) pending invoice items (including prorations) in reverse chronological order, (2) subscription items in reverse chronological order, and (3) invoice items added after invoice creation in chronological order.
diff --git a/lib/Refund.php b/lib/Refund.php
index 2fd33949a..7ed0b37e1 100644
--- a/lib/Refund.php
+++ b/lib/Refund.php
@@ -19,6 +19,7 @@
* @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 null|string $description An arbitrary string attached to the object. You can use this for displaying to users (available on non-card refunds only).
+ * @property null|\Stripe\StripeObject $destination_details
* @property null|string|\Stripe\BalanceTransaction $failure_balance_transaction After the refund fails, this balance transaction describes the adjustment made on your account balance that reverses the initial balance transaction.
* @property null|string $failure_reason Provides the reason for the refund failure. Possible values are: lost_or_stolen_card
, expired_or_canceled_card
, charge_for_pending_refund_disputed
, insufficient_funds
, declined
, merchant_request
, or unknown
.
* @property null|string $instructions_email For payment methods without native refund support (for example, Konbini, PromptPay), provide an email address for the customer to receive refund instructions.
diff --git a/lib/Tax/Calculation.php b/lib/Tax/Calculation.php
index db2f3480a..35b54bd73 100644
--- a/lib/Tax/Calculation.php
+++ b/lib/Tax/Calculation.php
@@ -18,6 +18,7 @@
* @property null|int $expires_at Timestamp of date at which the tax calculation will expire.
* @property null|\Stripe\Collection<\Stripe\Tax\CalculationLineItem> $line_items The list of items the customer is purchasing.
* @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|\Stripe\StripeObject $ship_from_details The details of the ship from location, such as the address.
* @property null|\Stripe\StripeObject $shipping_cost The shipping cost details for the calculation.
* @property int $tax_amount_exclusive The amount of tax to be collected on top of the line item prices.
* @property int $tax_amount_inclusive The amount of tax already included in the line item prices.
diff --git a/lib/Tax/Transaction.php b/lib/Tax/Transaction.php
index 587a49bc2..7dcc373b6 100644
--- a/lib/Tax/Transaction.php
+++ b/lib/Tax/Transaction.php
@@ -20,6 +20,7 @@
* @property null|\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 string $reference A custom unique identifier, such as 'myOrder_123'.
* @property null|\Stripe\StripeObject $reversal If type=reversal
, contains information about what was reversed.
+ * @property null|\Stripe\StripeObject $ship_from_details The details of the ship from location, such as the address.
* @property null|\Stripe\StripeObject $shipping_cost The shipping cost details for the transaction.
* @property int $tax_date Timestamp of date at which the tax rules and rates in effect applies for the calculation.
* @property string $type If reversal
, this transaction reverses an earlier transaction.
diff --git a/tests/Stripe/GeneratedExamplesTest.php b/tests/Stripe/GeneratedExamplesTest.php
index 69ab1dd09..41d95c220 100644
--- a/tests/Stripe/GeneratedExamplesTest.php
+++ b/tests/Stripe/GeneratedExamplesTest.php
@@ -1136,6 +1136,32 @@ public function testFinancialConnectionsAccountsRefreshPost()
static::assertInstanceOf(\Stripe\FinancialConnections\Account::class, $result);
}
+ public function testFinancialConnectionsAccountsSubscribePost()
+ {
+ $this->expectsRequest(
+ 'post',
+ '/v1/financial_connections/accounts/fa_123/subscribe'
+ );
+ $result = $this->client->financialConnections->accounts->subscribe(
+ 'fa_123',
+ ['features' => ['transactions']]
+ );
+ static::assertInstanceOf(\Stripe\FinancialConnections\Account::class, $result);
+ }
+
+ public function testFinancialConnectionsAccountsUnsubscribePost()
+ {
+ $this->expectsRequest(
+ 'post',
+ '/v1/financial_connections/accounts/fa_123/unsubscribe'
+ );
+ $result = $this->client->financialConnections->accounts->unsubscribe(
+ 'fa_123',
+ ['features' => ['transactions']]
+ );
+ static::assertInstanceOf(\Stripe\FinancialConnections\Account::class, $result);
+ }
+
public function testFinancialConnectionsSessionsGet()
{
$this->expectsRequest(
@@ -1189,6 +1215,29 @@ public function testFinancialConnectionsSessionsPost2()
static::assertInstanceOf(\Stripe\FinancialConnections\Session::class, $result);
}
+ public function testFinancialConnectionsTransactionsGet()
+ {
+ $this->expectsRequest(
+ 'get',
+ '/v1/financial_connections/transactions/tr_123'
+ );
+ $result = $this->client->financialConnections->transactions->retrieve(
+ 'tr_123',
+ []
+ );
+ static::assertInstanceOf(\Stripe\FinancialConnections\Transaction::class, $result);
+ }
+
+ public function testFinancialConnectionsTransactionsGet2()
+ {
+ $this->expectsRequest('get', '/v1/financial_connections/transactions');
+ $result = $this->client->financialConnections->transactions->all([
+ 'account' => 'fca_xyz',
+ ]);
+ static::assertInstanceOf(\Stripe\Collection::class, $result);
+ static::assertInstanceOf(\Stripe\FinancialConnections\Transaction::class, $result->data[0]);
+ }
+
public function testIdentityVerificationReportsGet()
{
$this->expectsRequest('get', '/v1/identity/verification_reports');
@@ -3153,6 +3202,54 @@ public function testTaxRatesPost2()
static::assertInstanceOf(\Stripe\TaxRate::class, $result);
}
+ public function testTaxRegistrationsGet()
+ {
+ $this->expectsRequest('get', '/v1/tax/registrations');
+ $result = $this->client->tax->registrations->all(['status' => 'all']);
+ static::assertInstanceOf(\Stripe\Collection::class, $result);
+ static::assertInstanceOf(\Stripe\Tax\Registration::class, $result->data[0]);
+ }
+
+ public function testTaxRegistrationsPost()
+ {
+ $this->expectsRequest('post', '/v1/tax/registrations');
+ $result = $this->client->tax->registrations->create([
+ 'country' => 'IE',
+ 'country_options' => ['ie' => ['type' => 'oss_union']],
+ 'active_from' => 'now',
+ ]);
+ static::assertInstanceOf(\Stripe\Tax\Registration::class, $result);
+ }
+
+ public function testTaxRegistrationsPost2()
+ {
+ $this->expectsRequest(
+ 'post',
+ '/v1/tax/registrations/taxreg_xxxxxxxxxxxxx'
+ );
+ $result = $this->client->tax->registrations->update(
+ 'taxreg_xxxxxxxxxxxxx',
+ ['expires_at' => 'now']
+ );
+ static::assertInstanceOf(\Stripe\Tax\Registration::class, $result);
+ }
+
+ public function testTaxSettingsGet()
+ {
+ $this->expectsRequest('get', '/v1/tax/settings');
+ $result = $this->client->tax->settings->retrieve([]);
+ static::assertInstanceOf(\Stripe\Tax\Settings::class, $result);
+ }
+
+ public function testTaxSettingsPost()
+ {
+ $this->expectsRequest('post', '/v1/tax/settings');
+ $result = $this->client->tax->settings->update([
+ 'defaults' => ['tax_code' => 'txcd_10000000'],
+ ]);
+ static::assertInstanceOf(\Stripe\Tax\Settings::class, $result);
+ }
+
public function testTaxTransactionsCreateFromCalculationPost()
{
$this->expectsRequest(