arlyon / async-stripe

Async (and blocking!) Rust bindings for the Stripe API
https://payments.rs
Apache License 2.0
441 stars 128 forks source link

Tracking issue for missing APIs #32

Open arlyon opened 3 years ago

arlyon commented 3 years ago

API requests will be closed to keep the issue tracker clean and the issue will be added to this list. If it is unchecked, it is unaddressed. Any PR's addressing these will be handled speedily (I promise! :smile: )

kennetpostigo commented 3 years ago

@arlyon hi, I actually just ran into this, as you made the ticket 9 minutes ago 😅. I need the AccountLink API's for stripe as i'm integrating stripe connect into the backend i'm working on.

You also have listed payment_intent but I see it in the API in the docs that it's available, is that wrong? https://docs.rs/async-stripe/0.13.0-rc2/stripe/struct.CreatePaymentIntent.html https://docs.rs/async-stripe/0.13.0-rc2/stripe/struct.PaymentIntent.html

The Link to the stripe docs: https://stripe.com/docs/api/account_links

Is there any shot these can get generated?

arlyon commented 3 years ago

The short answer is yes, that list is modules that are being generated, but aren't exported (yet). I have been working to try and simplify the code gen from the previous project but there's still a ways to go. For example, payment_intent and event exist in two places, one is generated and one is hand written so we need to figure out which is which.

The next step for that is to run tests in CI for modules that aren't being included, as part of the automatic openapi CI updates.

8206f6ec5bc0654e24b754aa1d0bf215c133caff addresses that at least partially, so you can target that and at least test out AccountLink

edit: missed a line, its exported properly on master now.

kennetpostigo commented 3 years ago

@arlyon thank you, i'll start using master branch to get access to it. Do you want me to report back with how it goes using the AccountLink?

Ryanmtate commented 3 years ago

Just to add to this list, it seems like the SetupIntent confirmation flow is missing and/or incorrect.

arlyon commented 3 years ago

@Ryanmtate thanks for the report, could you open an issue with some details about what is / isn't working?

Ryanmtate commented 3 years ago

@Ryanmtate thanks for the report, could you open an issue with some details about what is / isn't working?

@arlyon Thanks for the response. I've opened #36 to track conversation.

kennetpostigo commented 3 years ago

@Ryanmtate are you sure? I use it currently in my backend and it works fine, even checked the stripe logs

EDIT: I just saw that mean the confirmation flow, that I have not setup yet.

kennetpostigo commented 3 years ago

@arlyon I did not forget about feedback using connected accounts stripe APIs like AccountLink , etc. Just in the process of getting stripe to allow me to use them by enrolling in Stripe Connect that takes some time.

Ryanmtate commented 3 years ago

@Ryanmtate are you sure? I use it currently in my backend and it works fine, even checked the stripe logs

EDIT: I just saw that mean the confirmation flow, that I have not setup yet.

@kennetpostigo If you set confirm = true in the SetupIntent, it appear to work. I am able to test the SetupIntent flow and confirm it works. I closed #36; but happy to re-open if others find it to be useful.

kennetpostigo commented 3 years ago

@arlyon The account API's seem to be working for me for Account and AccountLink, at least the API's to create them do work. I just got accepted in stripe connect to try them out. Will be trying out more of the API's this week/end

azzamsa commented 3 years ago

Is creating a card token will be supported?

I can't find card field in stripe::CreateToken. I see stripe-rs also doesn't have this feature.

Update:

There was already an ongoing PR

arlyon commented 3 years ago

Yes, that is the plan. I believe the mentioned PR directly modifies generated code which we want to avoid so it is not mergeable in its current form. If you are interested in this feature, you can either:

I currently do not have the bandwidth to tackle this myself but I am happy to provide guidance and (prompt) code review if needed.

shaoxp commented 2 years ago

Hello,

i saw billing_portal_session is on the list and is missing. from the tutorial for subscriptions of stripe, i seem need it to let user update the pay info when PAY info is expired or has issue.

what's the plan to support it? or is there any quick workaround? thanks.

arlyon commented 2 years ago

The APIs are generated, just not exported / tested. If you'd like to include them and test them out you can make sure they are exported in src/resources/generated, and write any extension code if needed. Once you get it working, feel free to open a PR :)

victorcrimea commented 1 year ago

It seems that Customer balance transaction API is implemented by https://github.com/arlyon/async-stripe/pull/350 and Balance::retrieve is implemented by https://github.com/arlyon/async-stripe/pull/341

arlyon commented 1 year ago

Yes you are correct, thanks for bringing this to my attention :)

databasedav commented 1 year ago

i believe BillingPortalConfiguration::create is missing, shouldn't it be auto generated?

edit: it is available in the new codegen branch

AlbertMarashi commented 1 year ago

It's been a while and no search API.. Is this gonna be added?

AlbertMarashi commented 1 year ago

Search workaround if anyone needs it

#[derive(Serialize, Default, Debug)]
pub(crate) struct SearchParams {
    pub query: String,
    #[serde(skip_serializing_if = "Option::is_none")]
    pub limit: Option<u64>,
    #[serde(skip_serializing_if = "Option::is_none")]
    pub page: Option<u64>,
}

pub(crate) async fn stripe_search<R: DeserializeOwned + 'static + Send>(
    client: &stripe::Client,
    resource: &str,
    params: SearchParams,
) -> Result<List<R>, stripe::StripeError> {
    client
        .get_query(&format!("/{}/search", resource), &params)
        .await
}
samrg472 commented 5 months ago

It seems the API is missing to retrieve a session's line items.

https://docs.stripe.com/api/checkout/sessions/line_items

j0lol commented 3 months ago

i believe BillingPortalConfiguration::create is missing, shouldn't it be auto generated?

edit: it is available in the new codegen branch

This still doesnt seem to be merged. What's the status on this being added?

arlyon commented 3 months ago

The APIs are available in the rewrite which is on the way. In the mean time, if this is critically important you are welcome to open a PR with an extension trait and I will add it.

amalvivek commented 3 months ago

https://docs.stripe.com/api/billing/meter

Seems they have introduced a new usage based billing API. Will this be added?

arlyon commented 1 month ago

Yes, anything that ends up in their official openapi docs will also end up in this library. The current version is not as comprehensive and so misses some things. The rewrite will cover the entire API and improve compile times to boot.

Geometrically commented 1 month ago

The confirmation token API seems to be missing (see: https://docs.stripe.com/payments/finalize-payments-on-the-server?platform=web&type=payment#submit-payment)

Connoropolous commented 2 weeks ago

hey @arlyon since we are depending on this lib for our platform, just so I understand, the current version 'master' is set to target is V2023_10_16 per https://github.com/arlyon/async-stripe/blob/f0fd7115aa3b7500134da10f848c8e93ba8eca2e/src/resources/generated/version.rs#L1-L3

I've discovered some major misalignment with the 'source' property of 'balance_transaction' so I am trying to make a plan for tackling it, but I feel like it's going to be hard since the Stripe api documentation is moving on, far past that 2023 version. Do you have a timeframe for the new release track?

Connoropolous commented 2 weeks ago

can you also help me understand how openapi updates are being integrated yet this version number V2023_10_16 isn't changing?