Skip to content

Commit 16fda0c

Browse files
committed
Add support for PaymentMethodData on PaymentIntent
1 parent 1c616cc commit 16fda0c

4 files changed

+68
-0
lines changed

src/Stripe.net/Services/PaymentIntents/PaymentIntentConfirmOptions.cs

+6
Original file line numberDiff line numberDiff line change
@@ -50,6 +50,12 @@ public class PaymentIntentConfirmOptions : BaseOptions
5050
[JsonProperty("payment_method")]
5151
public string PaymentMethod { get; set; }
5252

53+
/// <summary>
54+
/// Payment-method-specific data used to create a payment method for this payment intent.
55+
/// </summary>
56+
[JsonProperty("payment_method_data")]
57+
public PaymentIntentPaymentMethodDataOptions PaymentMethodData { get; set; }
58+
5359
/// <summary>
5460
/// Payment-method-specific configuration for this PaymentIntent.
5561
/// </summary>

src/Stripe.net/Services/PaymentIntents/PaymentIntentCreateOptions.cs

+6
Original file line numberDiff line numberDiff line change
@@ -124,6 +124,12 @@ public class PaymentIntentCreateOptions : BaseOptions, IHasMetadata
124124
[JsonProperty("payment_method")]
125125
public string PaymentMethod { get; set; }
126126

127+
/// <summary>
128+
/// Payment-method-specific data used to create a payment method for this payment intent.
129+
/// </summary>
130+
[JsonProperty("payment_method_data")]
131+
public PaymentIntentPaymentMethodDataOptions PaymentMethodData { get; set; }
132+
127133
/// <summary>
128134
/// Payment-method-specific configuration for this PaymentIntent.
129135
/// </summary>
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,50 @@
1+
namespace Stripe
2+
{
3+
using System;
4+
using Newtonsoft.Json;
5+
6+
public class PaymentIntentPaymentMethodDataOptions : INestedOptions
7+
{
8+
/// <summary>
9+
/// The details associated with the AU BECS Debit payment method for this payment intent.
10+
/// </summary>
11+
[JsonProperty("au_becs_debit")]
12+
public PaymentMethodAuBecsDebitCreateOptions AuBecsDebit { get; set; }
13+
14+
/// <summary>
15+
/// Billing information associated with the payment method for this payment intent.
16+
/// </summary>
17+
[JsonProperty("billing_details")]
18+
public BillingDetailsOptions BillingDetails { get; set; }
19+
20+
/// <summary>
21+
/// The details associated with the card payment method for this payment intent.
22+
/// </summary>
23+
[JsonProperty("card")]
24+
public PaymentMethodCardCreateOptions Card { get; set; }
25+
26+
/// <summary>
27+
/// The details associated with the FPX payment method for this payment intent.
28+
/// </summary>
29+
[JsonProperty("fpx")]
30+
public PaymentMethodFpxCreateOptions Fpx { get; set; }
31+
32+
/// <summary>
33+
/// The details associated with the iDEAL payment method for this payment intent.
34+
/// </summary>
35+
[JsonProperty("ideal")]
36+
public PaymentMethodIdealCreateOptions Ideal { get; set; }
37+
38+
/// <summary>
39+
/// The details associated with the SEPA Debit payment method for this payment intent.
40+
/// </summary>
41+
[JsonProperty("sepa_debit")]
42+
public PaymentMethodSepaDebitCreateOptions SepaDebit { get; set; }
43+
44+
/// <summary>
45+
/// The type of payment method for this payment intent.
46+
/// </summary>
47+
[JsonProperty("type")]
48+
public string Type { get; set; }
49+
}
50+
}

src/Stripe.net/Services/PaymentIntents/PaymentIntentUpdateOptions.cs

+6
Original file line numberDiff line numberDiff line change
@@ -57,6 +57,12 @@ public class PaymentIntentUpdateOptions : BaseOptions, IHasMetadata
5757
[JsonProperty("payment_method")]
5858
public string PaymentMethod { get; set; }
5959

60+
/// <summary>
61+
/// Payment-method-specific data used to create a payment method for this payment intent.
62+
/// </summary>
63+
[JsonProperty("payment_method_data")]
64+
public PaymentIntentPaymentMethodDataOptions PaymentMethodData { get; set; }
65+
6066
/// <summary>
6167
/// Payment-method-specific configuration for this PaymentIntent.
6268
/// </summary>

0 commit comments

Comments
 (0)