{"id":13719001,"url":"https://github.com/drager/swish","last_synced_at":"2025-04-11T15:51:01.298Z","repository":{"id":57669076,"uuid":"136191644","full_name":"drager/swish","owner":"drager","description":"Rust API bindings for the Swish API. https://developer.getswish.se/merchants/","archived":false,"fork":false,"pushed_at":"2018-12-02T19:09:55.000Z","size":41,"stargazers_count":3,"open_issues_count":0,"forks_count":1,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-03-25T11:52:28.334Z","etag":null,"topics":["api-bindings","payment","rust","rust-library","swish"],"latest_commit_sha":null,"homepage":"","language":"Rust","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/drager.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2018-06-05T14:41:51.000Z","updated_at":"2020-02-07T20:13:29.000Z","dependencies_parsed_at":"2022-08-27T01:40:53.156Z","dependency_job_id":null,"html_url":"https://github.com/drager/swish","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/drager%2Fswish","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/drager%2Fswish/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/drager%2Fswish/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/drager%2Fswish/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/drager","download_url":"https://codeload.github.com/drager/swish/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248434655,"owners_count":21102880,"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":["api-bindings","payment","rust","rust-library","swish"],"created_at":"2024-08-03T01:00:40.802Z","updated_at":"2025-04-11T15:51:01.273Z","avatar_url":"https://github.com/drager.png","language":"Rust","funding_links":[],"categories":["Finance"],"sub_categories":[],"readme":"# Swish\n[![Build Status](https://travis-ci.org/drager/swish.svg?branch=master)](https://travis-ci.org/drager/swish)\n[![crates.io](https://img.shields.io/crates/v/swish-api.svg)](https://crates.io/crates/swish-api)\n[![API docs](https://docs.rs/swish-api/badge.svg)](https://docs.rs/swish-api)\n[![MIT/Apache-2.0 licensed](https://img.shields.io/crates/l/swish-api.svg)](https://github.com/drager/swish/tree/master/README.md#license)\n\nRust API bindings for the Swish API.\nBuilt using [hyper](https://github.com/hyperium/hyper/) and [tokio](https://github.com/tokio-rs/tokio).\n\n## Usage\n\nA simple usage example:\n\n```rust\nextern crate swish_api;\nextern crate tokio_core;\n\nuse swish_api::{client, error};\nuse tokio_core::reactor::Core;\n\nfn main() {\n    let core = Core::new().unwrap();\n    let handle = core.handle();\n    let current_dir = env::current_dir()?;\n    let cert_path = current_dir.join(\"./test_cert.p12\");\n\n    let swish_client = cert_path\n        .into_os_string()\n        .to_str()\n        .map(|cert_path_string| {\n            client::SwishClient::new(\"1231181189\", cert_path_string, \"swish\", handle)\n        }).unwrap();\n\n    let mut payment_params = client::PaymentParams::default();\n    payment_params.amount = 100.00;\n    payment_params.payee_alias = \"1231181189\";\n    payment_params.payee_payment_reference = Some(\"0123456789\");\n    payment_params.callback_url = \"https://example.com/api/swishcb/paymentrequests\";\n    payment_params.message = Some(\"Kingston USB Flash Drive 8 GB\");\n\n    let payment = client.create_payment(payment_params);\n    let payment: Result\u003cclient::CreatedPayment, error::SwishClientError\u003e = core.run(payment);\n}\n```\n\n## Features and bugs\n\nPlease file feature requests and bugs at the [issue tracker][tracker].\n\n[tracker]: https://github.com/drager/swish/issues\n\n## License\nLicensed under either of:\n\n* Apache License, Version 2.0 ([LICENSE-APACHE](LICENSE-APACHE) or http://apache.org/licenses/LICENSE-2.0)\n* MIT license ([LICENSE-MIT](LICENSE-MIT) or http://opensource.org/licenses/MIT)\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdrager%2Fswish","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fdrager%2Fswish","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdrager%2Fswish/lists"}