Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

assert_capabilities missing from OAuthTokenCreateOptions #1543

Closed
winzig opened this issue Feb 25, 2019 · 5 comments · Fixed by #1482
Closed

assert_capabilities missing from OAuthTokenCreateOptions #1543

winzig opened this issue Feb 25, 2019 · 5 comments · Fixed by #1482
Assignees

Comments

@winzig
Copy link
Contributor

winzig commented Feb 25, 2019

The OAuth API supports asserting that certain requested capabilities have been applied to the relationship, but the SDK doesn't currently accept those parameters. Detailed here:

https://stripe.com/docs/connect/express-accounts#verify-the-accounts-capability

In the meantime, I'm using AddExtraParam to work around the issue. Thanks!

@remi-stripe
Copy link
Contributor

@winzig Thanks for reporting! Assigning to @ob-stripe who has been working on some of this in #1542 to see if he can fix at the same time.

@ob-stripe
Copy link
Contributor

As of version 27.0.0, the library now supports this parameter natively:

/// <summary>
/// If your platform is designated for one
/// <see href="https://stripe.com/docs/connect/capabilities-overview">Capability</see>
/// (either <c>card_payments</c> or <c>platform_payments</c>), you won’t need to specify
/// additional Capabilities. However, if your platform supports both, you can add a
/// Capability to an individual Express account by including the
/// <see cref="SuggestedCapabilities"/> parameter in your OAuth link.
/// </summary>
[JsonProperty("suggested_capabilities")]
public List<string> SuggestedCapabilities { get; set; }

@winzig
Copy link
Contributor Author

winzig commented Jun 7, 2019

@ob-stripe Is there a reason assert_capabilities wasn't also added?

@ob-stripe
Copy link
Contributor

@winzig Sorry I wasn't clear!

  • suggested_capabilities was added as a parameter to the /authorize request:
    /// <summary>
    /// If your platform is designated for one
    /// <see href="https://stripe.com/docs/connect/capabilities-overview">Capability</see>
    /// (either <c>card_payments</c> or <c>platform_payments</c>), you won’t need to specify
    /// additional Capabilities. However, if your platform supports both, you can add a
    /// Capability to an individual Express account by including the
    /// <see cref="SuggestedCapabilities"/> parameter in your OAuth link.
    /// </summary>
    [JsonProperty("suggested_capabilities")]
    public List<string> SuggestedCapabilities { get; set; }
  • assert_capabilities was added as a parameter to the /token request:
    /// <summary>
    /// If you <see href="https://stripe.com/docs/connect/express-accounts#specify-capabilities">specified a Capability</see>
    /// using the <see cref="OAuthAuthorizeUrlOptions.SuggestedCapabilities"/> parameter, you
    /// can verify that Stripe applied the suggested Capability in this POST request by
    /// including <see cref="AssertCapabilities"/> and identifying that <c>card_payments</c> or
    /// <c>platform_payments</c> match. A request error will be returned if the suggested
    /// <see href="https://stripe.com/docs/connect/capabilities-overview">Capability</see>
    /// doesn’t match the assertion: in this case, it’s recommended to end the onboarding flow
    /// with a failure.
    /// </summary>
    [JsonProperty("assert_capabilities")]
    public List<string> AssertCapabilities { get; set; }

@winzig
Copy link
Contributor Author

winzig commented Jun 7, 2019

Ok great, thank you!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants