Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 12 additions & 0 deletions .github/pull_request_template.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,3 +9,15 @@ List out the key changes made in this PR, e.g.

### See Also
<!-- Include any links or additional information that help explain this change. -->

## Changelog
<!-- Heads up! This section should include entries for any user-facing changes.
Either fill it out or remove it if there are no entries to report.
List changes that affect end users, e.g.
- Fixes crash when calling `foo.bar()` with null argument
- Adds support for new `baz` parameter on `PaymentIntent` creation
List breaking changes first with a ⚠️ prefix, e.g.
- ⚠️ Removes deprecated `legacy_method` function
-->
9 changes: 9 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,14 @@
# Changelog

## 52.0.0 - 2026-06-05

This release **doesn't** change the pinned API version; it still uses `2026-05-27.dahlia`.

We're doing an out-of-band-major to update a field type that changed. If you're not using `tax_details`, this is a no-op release when compared with the last one. If you _are_ using `tax_details` its type has changed slightly and you'll have to update your code when upgrading.

* [#3396](https://github.com/stripe/stripe-dotnet/pull/3396) ⚠️ Make `tax_rate.tax_details` expandable
* [#3394](https://github.com/stripe/stripe-dotnet/pull/3394) Add "source" field to user-agent header

## 51.3.0-alpha.2 - 2026-06-03
* [#3389](https://github.com/stripe/stripe-dotnet/pull/3389) Update generated code for private-preview
* Add support for new resources `DelegatedCheckout.OrderEvent`, `DelegatedCheckout.Order`, `V2.Billing.ContractLicensePricingQuantityChange`, `V2.Billing.Contract`, and `V2.Signals.AccountSignal`
Expand Down
2 changes: 1 addition & 1 deletion CODEGEN_VERSION
Original file line number Diff line number Diff line change
@@ -1 +1 @@
656489921ee220b536bc00fc1c8ee7ed528f24e2
aa10ab9548143dbe396ae1e91e443c64473cbdc2
2 changes: 1 addition & 1 deletion OPENAPI_VERSION
Original file line number Diff line number Diff line change
@@ -1 +1 @@
v2290
v2294
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -363,7 +363,7 @@ StripeConfiguration.AddBetaVersion("feature_beta", "v3");

> This feature is only available from version 46 of this SDK.

Stripe has features in the [private preview phase](https://docs.stripe.com/release-phases) that can be accessed via versions of this package that have the `-alpha.X` suffix like `45.2.0-alpha.2`. These are invite-only features. Once invited, you can install the private preview SDKs by following the same instructions as for the [public preview SDKs](https://github.com/stripe/stripe-dotnet?tab=readme-ov-file#public-preview-sdks) above and replacing the term `beta` with `alpha`.
Stripe has features in the [private preview phase](https://docs.stripe.com/release-phases) that can be accessed via versions of this package that have the `-alpha.X` suffix like `45.2.0-alpha.2`. You can install the private preview SDKs by following the same instructions as for the [public preview SDKs](https://github.com/stripe/stripe-dotnet?tab=readme-ov-file#public-preview-sdks) above and replacing the term `beta` with `alpha`. Note that access to specific private preview API features may require separate approval.

### Custom requests

Expand Down
2 changes: 1 addition & 1 deletion src/Stripe.net/Constants/ApiVersion.cs
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,6 @@ namespace Stripe
{
internal class ApiVersion
{
public const string Current = "2026-06-03.preview";
public const string Current = "2026-06-10.preview";
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,10 @@ namespace Stripe
[STJS.JsonConverter(typeof(STJStripeEntityConverter))]
public class ChargePaymentMethodDetailsCardBenefits : StripeEntity<ChargePaymentMethodDetailsCardBenefits>
{
[JsonProperty("fr_meal_voucher")]
[STJS.JsonPropertyName("fr_meal_voucher")]
public ChargePaymentMethodDetailsCardBenefitsFrMealVoucher FrMealVoucher { get; set; }

/// <summary>
/// Issuer of the benefit card utilized on this payment.
/// </summary>
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
// File generated from our OpenAPI spec
namespace Stripe
{
using Newtonsoft.Json;
using Stripe.Infrastructure;
using STJS = System.Text.Json.Serialization;

[STJS.JsonConverter(typeof(STJStripeEntityConverter))]
public class ChargePaymentMethodDetailsCardBenefitsFrMealVoucher : StripeEntity<ChargePaymentMethodDetailsCardBenefitsFrMealVoucher>
{
/// <summary>
/// The 14-digit SIRET of the meal voucher acceptor used for this charge.
/// </summary>
[JsonProperty("siret")]
[STJS.JsonPropertyName("siret")]
public string Siret { get; set; }
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -163,6 +163,10 @@ public class ChargePaymentMethodDetailsCardPresent : StripeEntity<ChargePaymentM
[STJS.JsonPropertyName("location")]
public string Location { get; set; }

[JsonProperty("multicapture")]
[STJS.JsonPropertyName("multicapture")]
public ChargePaymentMethodDetailsCardPresentMulticapture Multicapture { get; set; }

/// <summary>
/// Identifies which network this charge was processed on. Can be <c>amex</c>,
/// <c>cartes_bancaires</c>, <c>diners</c>, <c>discover</c>, <c>eftpos_au</c>,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,10 +6,10 @@ namespace Stripe
using STJS = System.Text.Json.Serialization;

[STJS.JsonConverter(typeof(STJStripeEntityConverter))]
public class PaymentIntentAdvancedFeatureDetailsReauthorization : StripeEntity<PaymentIntentAdvancedFeatureDetailsReauthorization>
public class ChargePaymentMethodDetailsCardPresentMulticapture : StripeEntity<ChargePaymentMethodDetailsCardPresentMulticapture>
{
/// <summary>
/// Indicates whether the feature is supported.
/// Indicates whether or not multiple captures are supported.
/// One of: <c>available</c>, or <c>unavailable</c>.
/// </summary>
[JsonProperty("status")]
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,10 @@ public class SessionCurrentAttemptPaymentMethodDetails : StripeEntity<SessionCur
[STJS.JsonPropertyName("link")]
public SessionCurrentAttemptPaymentMethodDetailsLink Link { get; set; }

[JsonProperty("pix")]
[STJS.JsonPropertyName("pix")]
public SessionCurrentAttemptPaymentMethodDetailsPix Pix { get; set; }

[JsonProperty("sepa_debit")]
[STJS.JsonPropertyName("sepa_debit")]
public SessionCurrentAttemptPaymentMethodDetailsSepaDebit SepaDebit { get; set; }
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ public class SessionCurrentAttemptPaymentMethodDetailsCard : StripeEntity<Sessio
/// The brand of the card, accounting for customer's brand choice on dual-branded cards.
/// One of: <c>accel</c>, <c>amex</c>, <c>carnet</c>, <c>cartes_bancaires</c>,
/// <c>conecs</c>, <c>diners</c>, <c>discover</c>, <c>eftpos_au</c>, <c>elo</c>,
/// <c>girocard</c>, <c>interac</c>, <c>jcb</c>, <c>link</c>, <c>maestro</c>,
/// <c>girocard</c>, <c>interac</c>, <c>jaywan</c>, <c>jcb</c>, <c>link</c>, <c>maestro</c>,
/// <c>mastercard</c>, <c>nyce</c>, <c>pulse</c>, <c>rupay</c>, <c>star</c>,
/// <c>unionpay</c>, <c>unknown</c>, or <c>visa</c>.
/// </summary>
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
// File generated from our OpenAPI spec
namespace Stripe.Checkout
{
using Newtonsoft.Json;
using Stripe.Infrastructure;
using STJS = System.Text.Json.Serialization;

[STJS.JsonConverter(typeof(STJStripeEntityConverter))]
public class SessionCurrentAttemptPaymentMethodDetailsPix : StripeEntity<SessionCurrentAttemptPaymentMethodDetailsPix>
{
/// <summary>
/// Uniquely identifies this particular Pix account. You can use this attribute to check
/// whether two Pix accounts are the same.
/// </summary>
[JsonProperty("fingerprint")]
[STJS.JsonPropertyName("fingerprint")]
public string Fingerprint { get; set; }
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -163,6 +163,10 @@ public class ConfirmationTokenPaymentMethodPreviewCardGeneratedFromPaymentMethod
[STJS.JsonPropertyName("location")]
public string Location { get; set; }

[JsonProperty("multicapture")]
[STJS.JsonPropertyName("multicapture")]
public ConfirmationTokenPaymentMethodPreviewCardGeneratedFromPaymentMethodDetailsCardPresentMulticapture Multicapture { get; set; }

/// <summary>
/// Identifies which network this charge was processed on. Can be <c>amex</c>,
/// <c>cartes_bancaires</c>, <c>diners</c>, <c>discover</c>, <c>eftpos_au</c>,
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
// File generated from our OpenAPI spec
namespace Stripe
{
using Newtonsoft.Json;
using Stripe.Infrastructure;
using STJS = System.Text.Json.Serialization;

[STJS.JsonConverter(typeof(STJStripeEntityConverter))]
public class ConfirmationTokenPaymentMethodPreviewCardGeneratedFromPaymentMethodDetailsCardPresentMulticapture : StripeEntity<ConfirmationTokenPaymentMethodPreviewCardGeneratedFromPaymentMethodDetailsCardPresentMulticapture>
{
/// <summary>
/// Indicates whether or not multiple captures are supported.
/// One of: <c>available</c>, or <c>unavailable</c>.
/// </summary>
[JsonProperty("status")]
[STJS.JsonPropertyName("status")]
public string Status { get; set; }
}
}
185 changes: 185 additions & 0 deletions src/Stripe.net/Entities/GiftCardOperations/GiftCardOperation.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,185 @@
// File generated from our OpenAPI spec
namespace Stripe
{
using System;
using Newtonsoft.Json;
using Stripe.Infrastructure;
using STJS = System.Text.Json.Serialization;

/// <summary>
/// A GiftCardOperation represents an operation performed on a third-party gift card, such
/// as activation, deactivation, reload, cashout, balance check, or void.
/// </summary>
[STJS.JsonConverter(typeof(STJStripeEntityConverter))]
public class GiftCardOperation : StripeEntity<GiftCardOperation>, IHasId, IHasObject
{
/// <summary>
/// Unique identifier for the object.
/// </summary>
[JsonProperty("id")]
[STJS.JsonPropertyName("id")]
public string Id { get; set; }

/// <summary>
/// String representing the object's type. Objects of the same type share the same value.
/// </summary>
[JsonProperty("object")]
[STJS.JsonPropertyName("object")]
public string Object { get; set; }

/// <summary>
/// Details about a gift card activation operation.
/// </summary>
[JsonProperty("activation")]
[STJS.JsonPropertyName("activation")]
public GiftCardOperationActivation Activation { get; set; }

/// <summary>
/// Details about a gift card activation void operation.
/// </summary>
[JsonProperty("activation_void")]
[STJS.JsonPropertyName("activation_void")]
public GiftCardOperationActivationVoid ActivationVoid { get; set; }

/// <summary>
/// Details about a gift card balance check operation.
/// </summary>
[JsonProperty("balance_check")]
[STJS.JsonPropertyName("balance_check")]
public GiftCardOperationBalanceCheck BalanceCheck { get; set; }

/// <summary>
/// Details about a gift card cashout operation.
/// </summary>
[JsonProperty("cashout")]
[STJS.JsonPropertyName("cashout")]
public GiftCardOperationCashout Cashout { get; set; }

/// <summary>
/// Details about a gift card cashout void operation.
/// </summary>
[JsonProperty("cashout_void")]
[STJS.JsonPropertyName("cashout_void")]
public GiftCardOperationCashoutVoid CashoutVoid { get; set; }

/// <summary>
/// The timestamp of when this operation was completed.
/// </summary>
[JsonProperty("completed_at")]
[JsonConverter(typeof(UnixDateTimeConverter))]
[STJS.JsonPropertyName("completed_at")]
[STJS.JsonConverter(typeof(STJUnixDateTimeConverter))]
public DateTime CompletedAt { get; set; } = Stripe.Infrastructure.DateTimeUtils.UnixEpoch;

/// <summary>
/// Time at which the object was created. Measured in seconds since the Unix epoch.
/// </summary>
[JsonProperty("created")]
[JsonConverter(typeof(UnixDateTimeConverter))]
[STJS.JsonPropertyName("created")]
[STJS.JsonConverter(typeof(STJUnixDateTimeConverter))]
public DateTime Created { get; set; } = Stripe.Infrastructure.DateTimeUtils.UnixEpoch;

/// <summary>
/// Details about a gift card deactivation operation.
/// </summary>
[JsonProperty("deactivation")]
[STJS.JsonPropertyName("deactivation")]
public GiftCardOperationDeactivation Deactivation { get; set; }

/// <summary>
/// The failure code of the operation. Only present if the status is failed.
/// One of: <c>action_not_supported</c>, <c>card_already_activated</c>, <c>card_expired</c>,
/// <c>card_not_activated</c>, <c>do_not_honor</c>, <c>generic_failure</c>,
/// <c>insufficient_balance</c>, <c>invalid_amount</c>, <c>invalid_currency</c>,
/// <c>invalid_number</c>, <c>invalid_pin</c>, <c>invalid_track_data</c>, <c>lost_card</c>,
/// <c>lost_or_stolen_card</c>, <c>pin_required</c>, <c>pin_tries_exceeded</c>,
/// <c>processing_error</c>, <c>provider_unavailable</c>, <c>stolen_card</c>,
/// <c>suspected_fraud</c>, or <c>timeout</c>.
/// </summary>
[JsonProperty("failure_code")]
[STJS.JsonPropertyName("failure_code")]
public string FailureCode { get; set; }

#region Expandable GiftCard

/// <summary>
/// (ID of the GiftCard)
/// The gift card this operation was performed on.
/// </summary>
[JsonIgnore]
[STJS.JsonIgnore]
public string GiftCardId
{
get => this.InternalGiftCard?.Id;
set => this.InternalGiftCard = SetExpandableFieldId(value, this.InternalGiftCard);
}

/// <summary>
/// (Expanded)
/// The gift card this operation was performed on.
///
/// For more information, see the <a href="https://stripe.com/docs/expand">expand documentation</a>.
/// </summary>
[JsonIgnore]
[STJS.JsonIgnore]
public GiftCard GiftCard
{
get => this.InternalGiftCard?.ExpandedObject;
set => this.InternalGiftCard = SetExpandableFieldObject(value, this.InternalGiftCard);
}

[JsonProperty("gift_card")]
[JsonConverter(typeof(ExpandableFieldConverter<GiftCard>))]
[STJS.JsonPropertyName("gift_card")]
[STJS.JsonConverter(typeof(STJExpandableFieldConverter<GiftCard>))]
internal ExpandableField<GiftCard> InternalGiftCard { get; set; }
#endregion

/// <summary>
/// If the object exists in live mode, the value is <c>true</c>. If the object exists in
/// test mode, the value is <c>false</c>.
/// </summary>
[JsonProperty("livemode")]
[STJS.JsonPropertyName("livemode")]
public bool Livemode { get; set; }

/// <summary>
/// The connected account whose credentials were used to perform this operation.
/// </summary>
[JsonProperty("on_behalf_of")]
[STJS.JsonPropertyName("on_behalf_of")]
public string OnBehalfOf { get; set; }

/// <summary>
/// Details about a gift card reload operation.
/// </summary>
[JsonProperty("reload")]
[STJS.JsonPropertyName("reload")]
public GiftCardOperationReload Reload { get; set; }

/// <summary>
/// Details about a gift card reload void operation.
/// </summary>
[JsonProperty("reload_void")]
[STJS.JsonPropertyName("reload_void")]
public GiftCardOperationReloadVoid ReloadVoid { get; set; }

/// <summary>
/// The status of the operation.
/// One of: <c>failed</c>, or <c>succeeded</c>.
/// </summary>
[JsonProperty("status")]
[STJS.JsonPropertyName("status")]
public string Status { get; set; }

/// <summary>
/// The type of operation performed.
/// One of: <c>activation</c>, <c>activation_void</c>, <c>balance_check</c>, <c>cashout</c>,
/// <c>cashout_void</c>, <c>deactivation</c>, <c>reload</c>, or <c>reload_void</c>.
/// </summary>
[JsonProperty("type")]
[STJS.JsonPropertyName("type")]
public string Type { get; set; }
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
// File generated from our OpenAPI spec
namespace Stripe
{
using Newtonsoft.Json;
using Stripe.Infrastructure;
using STJS = System.Text.Json.Serialization;

[STJS.JsonConverter(typeof(STJStripeEntityConverter))]
public class GiftCardOperationActivation : StripeEntity<GiftCardOperationActivation>
{
/// <summary>
/// The balance amount of a gift card, including currency and amount.
/// </summary>
[JsonProperty("balance")]
[STJS.JsonPropertyName("balance")]
public GiftCardOperationActivationBalance Balance { get; set; }
}
}
Loading
Loading