{"id":17658855,"url":"https://github.com/iykekings/svelte-paystack","last_synced_at":"2025-05-07T13:45:30.769Z","repository":{"id":47436270,"uuid":"236744065","full_name":"iykekings/svelte-paystack","owner":"iykekings","description":"A svelte library for implementing Paystack payment gateway","archived":false,"fork":false,"pushed_at":"2023-05-07T21:10:11.000Z","size":536,"stargazers_count":8,"open_issues_count":6,"forks_count":5,"subscribers_count":0,"default_branch":"master","last_synced_at":"2025-04-26T01:43:44.885Z","etag":null,"topics":["paystack","paystack-library","paystack-payment-gateway","svelte","svelte-library"],"latest_commit_sha":null,"homepage":"https://www.npmjs.com/package/svelte-paystack","language":"Svelte","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/iykekings.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,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2020-01-28T13:41:49.000Z","updated_at":"2024-08-10T11:07:17.000Z","dependencies_parsed_at":"2025-03-11T05:42:23.583Z","dependency_job_id":null,"html_url":"https://github.com/iykekings/svelte-paystack","commit_stats":null,"previous_names":[],"tags_count":5,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/iykekings%2Fsvelte-paystack","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/iykekings%2Fsvelte-paystack/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/iykekings%2Fsvelte-paystack/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/iykekings%2Fsvelte-paystack/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/iykekings","download_url":"https://codeload.github.com/iykekings/svelte-paystack/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":252889717,"owners_count":21820232,"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":["paystack","paystack-library","paystack-payment-gateway","svelte","svelte-library"],"created_at":"2024-10-23T15:43:43.318Z","updated_at":"2025-05-07T13:45:30.750Z","avatar_url":"https://github.com/iykekings.png","language":"Svelte","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Svelte-paystack \n\n## A svelte library for implementing paystack payment gateway\n\n## Getting started\n\n\u003e Install\n\n```sh\n  npm i svelte-paystack\n```\n\n\n\u003e Use\n\nImport Paystack component as the default export from `svelte-paystack` and pass in your paystack configuration to it as `config` prop. This configuration can be found in your paystack dashboard.\n\n```html\n\u003cscript\u003e\n  import Paystack from 'svelte-paystack';\n\n  //import your custom-component\n  import Button from 'your-path'\n\n  let config = {\n    key: \"pk_test_or_public_key\",\n    email: \"youremail@email.com\",\n    amount: 10000, \n    currency: \"NGN\",\n    withSlot:true, // If you need to render a custom component to replace default button\n    embed: false,\n    disabled: false,\n    callback: function(response) {\n      console.log(\n        \"successfully subscribed. transaction ref is \" + response.reference\n      );\n    },\n    onClose: function() {\n      console.log(\"window closed\");\n    }\n  }\n\u003c/script\u003e\n\u003cPaystack {config} /\u003e\n\n//Pass custom component to paystack\n\u003cPaystack let:usePayInline {config}\u003e\n\n  //action props from your custom-component will receive func to invoke paystack inline, which you can attach to any event inside your custom-component.\n\u003cButton action={usePayInline}  /\u003e\n  \u003c/Paystack action\u003e\n```\n\u003e Configuration Options\n  - For `embed: true` all Configuration options specified here by [paystack embed](https://developers.paystack.co/docs/paystack-embded#section-configuration-options) can be specified.\n\n  - For `embed: false` all Configuration options specified here by [paystack inline](https://developers.paystack.co/docs/paystack-inline#section-configuration-options) can be specified.\n\n  - For `withSlot: true` works in conjunction with `embed: false`, which gives you the option of using custom component to trigger [paystack inline](https://developers.paystack.co/docs/paystack-inline#section-configuration-options) can be specified.\n\n  - More configs:\n\n    ```ts\n      embed: boolean // specifies if the payment form should be embedded. Defaults to false\n      value: string // textContent of the button tag when embed == false. Defaults to \"Pay with Paystack\"\n    ```\n\n## Examples\n\n- Inline (using custom-component) to trigger [paystack inline](https://developers.paystack.co/docs/paystack-inline#section-configuration-options)\n  ![](/images/custom-button.png)\n \n  - Inline\n  ![](/images/inline.png)\n\n  - Embed\n  ![](/images/embed.png)","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fiykekings%2Fsvelte-paystack","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fiykekings%2Fsvelte-paystack","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fiykekings%2Fsvelte-paystack/lists"}