{"id":22711341,"url":"https://github.com/lordsarcastic/lazerpay-rust-sdk","last_synced_at":"2025-04-13T15:12:35.361Z","repository":{"id":43219724,"uuid":"457773310","full_name":"lordsarcastic/lazerpay-rust-sdk","owner":"lordsarcastic","description":"Lazerpay SDK for Rust 🦀","archived":false,"fork":false,"pushed_at":"2022-03-12T15:55:25.000Z","size":152025,"stargazers_count":16,"open_issues_count":1,"forks_count":3,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-04-13T15:12:27.764Z","etag":null,"topics":["crypto","fintech","rust","web3"],"latest_commit_sha":null,"homepage":"","language":"Rust","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/lordsarcastic.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}},"created_at":"2022-02-10T12:34:51.000Z","updated_at":"2023-10-11T07:43:34.000Z","dependencies_parsed_at":"2022-08-12T10:21:24.040Z","dependency_job_id":null,"html_url":"https://github.com/lordsarcastic/lazerpay-rust-sdk","commit_stats":null,"previous_names":["lord-sarcastic/lazerpay-rust-sdk"],"tags_count":2,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lordsarcastic%2Flazerpay-rust-sdk","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lordsarcastic%2Flazerpay-rust-sdk/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lordsarcastic%2Flazerpay-rust-sdk/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lordsarcastic%2Flazerpay-rust-sdk/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/lordsarcastic","download_url":"https://codeload.github.com/lordsarcastic/lazerpay-rust-sdk/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248732487,"owners_count":21152852,"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":["crypto","fintech","rust","web3"],"created_at":"2024-12-10T12:16:01.565Z","updated_at":"2025-04-13T15:12:35.339Z","avatar_url":"https://github.com/lordsarcastic.png","language":"Rust","funding_links":[],"categories":[],"sub_categories":[],"readme":"# 💳 Lazerpay Rust SDK\n\nThis crate integrates the Lazerpay payment gateway for accepting cryptocurrency payments.\n\n[![Crates.io][crate-src]][crate-href] [![License][license-src]][license-href] [![Contributors][contributors-src]][contributors-href]\n\n## Usage\n\nAdd the following to your cargo dependencies:\n\n```toml\nlazerpay-rust-sdk = \"0.1.1\"\n```\n\nNext you get your test `LAZERPAY_PUBLIC_KEY` and `LAZERPAY_SECRET_KEY` from [Lazerpay dashboard](https://beta.lazerpay.finance/)\n\nAdd those to a `.env` file at the root of your project. You can check `.env.example` for an example.\n\nWith that out of the way, you can use the API to make payments.\n\n```rust\nuse lazerpay_rust_sdk::{utils, Customer, Lazerpay, PaymentConfig};\n\n#[tokio::main]\nasync fn main() {\n    let api = Lazerpay::new();\n\n    let mut payment = api.create_payment(PaymentConfig {\n        customer: Customer::new(\"Enoch\", \"enochchejieh@gmail.com\"),\n        reference: utils::generate_unique_reference(),\n        coin: \"USDC\".into(),\n        amount: \"1000\".into(),\n        currency: \"USD\".into(),\n        accept_partial_payment: true,\n    });\n\n    dbg!(payment.send().await.unwrap());\n    dbg!(payment.check_confirmation().await.unwrap());\n}\n```\n\nAnd transfer funds using the transfer API.\n\n```rust\nuse lazerpay_rust_sdk::{utils, Customer, Lazerpay, TransferConfig};\n\n#[tokio::main]\nasync fn main() {\n    let api = Lazerpay::new();\n\n    let mut transfer = api.create_transfer(TransferConfig {\n        recipient: \"0x0000000000000000000000000000000000000000\".into(),\n        blockchain: \"Binance Smart Chain\".into(),\n        coin: \"USDC\".into(),\n        amount: 1000,\n    });\n\n    dbg!(transfer.send().await.unwrap());\n}\n```\n\nFinally, you can use get information on supported coins and their rates.\n\n```rust\nuse lazerpay_rust_sdk::Lazerpay;\n\n#[tokio::main]\nasync fn main() {\n    let api = Lazerpay::new();\n\n    dbg!(api.get_rates(\"USD\", \"USDC\").await.unwrap());\n    dbg!(api.get_accepted_coins().await.unwrap());\n}\n```\n\nand that's it.\n\n### Examples\n\nYou could also try out the examples in the project. For example, to run the payment example, run:\n\n```sh\ncargo run --example payment\n```\n\nIf you need more reference on this crate feel free to check the [source code](https://github.com/Lord-sarcastic/lazerpay-rust-sdk/tree/master/src)\n\n[crate-src]: https://img.shields.io/crates/v/lazerpay-rust-sdk\n[crate-href]: https://crates.io/crates/lazerpay-rust-sdk\n[license-src]: https://img.shields.io/badge/License-MIT-blue.svg\n[license-href]: https://github.com/Lord-sarcastic/lazerpay-rust-sdk/blob/master/LICENSE\n[contributors-src]: https://img.shields.io/github/contributors/Lord-sarcastic/lazerpay-rust-sdk\n[contributors-href]: https://github.com/TribecaHQ/tribeca/graphs/contributors\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Flordsarcastic%2Flazerpay-rust-sdk","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Flordsarcastic%2Flazerpay-rust-sdk","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Flordsarcastic%2Flazerpay-rust-sdk/lists"}