{"id":13505051,"url":"https://github.com/vapor-community/stripe","last_synced_at":"2025-08-21T20:31:48.433Z","repository":{"id":45361710,"uuid":"88382271","full_name":"vapor-community/stripe","owner":"vapor-community","description":"Stripe library for Vapor","archived":false,"fork":false,"pushed_at":"2023-08-21T15:01:37.000Z","size":980,"stargazers_count":180,"open_issues_count":1,"forks_count":32,"subscribers_count":12,"default_branch":"main","last_synced_at":"2024-12-17T09:08:12.757Z","etag":null,"topics":["card","payment","stripe","stripe-api","swift","vapor","vapor-provider","vapor-service","vapor-stripe"],"latest_commit_sha":null,"homepage":"","language":"Swift","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/vapor-community.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null}},"created_at":"2017-04-16T00:41:03.000Z","updated_at":"2024-11-26T11:46:52.000Z","dependencies_parsed_at":"2024-01-16T10:09:29.517Z","dependency_job_id":null,"html_url":"https://github.com/vapor-community/stripe","commit_stats":null,"previous_names":[],"tags_count":90,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/vapor-community%2Fstripe","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/vapor-community%2Fstripe/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/vapor-community%2Fstripe/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/vapor-community%2Fstripe/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/vapor-community","download_url":"https://codeload.github.com/vapor-community/stripe/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":230532442,"owners_count":18240792,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["card","payment","stripe","stripe-api","swift","vapor","vapor-provider","vapor-service","vapor-stripe"],"created_at":"2024-08-01T00:00:57.547Z","updated_at":"2024-12-20T04:06:48.008Z","avatar_url":"https://github.com/vapor-community.png","language":"Swift","funding_links":[],"categories":["Packages","Swift"],"sub_categories":["Miscellaneous"],"readme":"# Stripe\n\n![Swift](http://img.shields.io/badge/swift-5.2-brightgreen.svg)\n![Vapor](http://img.shields.io/badge/vapor-4.0-brightgreen.svg)\n\n\n### Stripe is a Vapor helper to use [StripeKit](https://github.com/vapor-community/stripe-kit)\n\n## Usage guide\nIn your `Package.swift` file, add the following\n\n~~~~swift\n.package(url: \"https://github.com/vapor-community/stripe.git\", from: \"14.0.0\")\n~~~~\n\n\nTo use Stripe in your Vapor application, set the environment variable for you Stripe API key\n~~~\nexport STRIPE_API_KEY=\"sk_123456\"      \n~~~\n\nNow you can access a `StripeClient` via `Request`.\n~~~~swift\n\nstruct ChargeToken: Content {\n    var token: String\n}\n\nfunc chargeCustomer(_ req: Request) throws -\u003e EventLoopFuture\u003cHTTPStatus\u003e {\n    return try req.content.decode(ChargeToken.self).flatMap { charge in\n        return req.stripe.charge.create(amount: 2500, currency: .usd, source: charge.stripeToken).map { stripeCharge in\n            if stripeCharge.status == .success {\n                return .ok\n            } else {\n                print(\"Stripe charge status: \\(stripeCharge.status.rawValue)\")\n                return .badRequest\n            }\n        }\n    }\n}\n~~~~\n\n## License\n\nStripe is available under the MIT license. See the [LICENSE](LICENSE) file for more info.\n\n## Want to help?\nFeel free to submit a pull request whether it's a clean up, a new approach to handling things, adding a new part of the API, or even if it's just a typo. All help is welcomed! 😀\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fvapor-community%2Fstripe","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fvapor-community%2Fstripe","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fvapor-community%2Fstripe/lists"}