You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+37-21Lines changed: 37 additions & 21 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -43,14 +43,31 @@ how to use the library.
43
43
44
44
## Usage
45
45
46
-
### Authentication
46
+
### Using StripeClient
47
47
48
-
Stripe authenticates API requests using your account’s secret key, which you can find in the Stripe Dashboard. By default, secret keys can be used to perform any API request without restriction.
48
+
In version 46 of the Stripe .NET SDK, we have enhanced the `StripeClient` class to be the entry point to access all services that had to be previously independently instantiated with global configuration. This improves discoverability during IDE auto-completion and creates a more intuitive developer experience for you.
49
49
50
-
Use `StripeConfiguration.ApiKey` property to set the secret key.
50
+
Each client instantiation can have its own configuration so you can access Stripe API with different API keys or different configuration (like number of retries) on a per client basis and without changing a global configuration.
The previous global configuration pattern will continue to be supported.
64
+
65
+
### Authentication
66
+
67
+
Stripe authenticates API requests using your account’s secret key, which you can find in the Stripe Dashboard. By default, secret keys can be used to perform any API request without restriction.
68
+
69
+
```C#
70
+
varclient=newStripeClient("sk_test_...");
54
71
```
55
72
56
73
### Creating a resource
@@ -63,8 +80,8 @@ var options = new CustomerCreateOptions
To retrieve undocumented properties from Stripe using C# you can use an option in the library to return the raw JSON object and return the property. An example of this is shown below:
0 commit comments