Socket
Book a DemoInstallSign in
Socket

seerbit-svelte

Package Overview
Dependencies
Maintainers
1
Versions
1
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

seerbit-svelte

Seerbit Svelte SDK

1.0.1
latest
Source
npmnpm
Version published
Weekly downloads
1
Maintainers
1
Weekly downloads
 
Created
Source

Seerbit Svelte Package

Seerbit Svelte Package can be used to integrate the SeerBit payment gateway into your svelte application.

Requirements

Register for a merchant account on Seerbit Merchant Dashboard to get started.

  Svelte application
  Node js
  NPM

Instalation

npm install seerbit-svelte

API Documentation

https://doc.seerbit.com

Support

If you have any problems, questions or suggestions, create an issue here or send your inquiry to care@seerbit.com

Implementation

You should already have your API keys. If not, go to dashboard.seerbitapi.com. Login -> Settings menu -> API Keys menu -> Copy your public key

Properties

PropertyTypeRequiredDefaultDesc
currencyStringOptionalNGNThe currency for the transaction e.g NGN
emailStringRequiredNoneThe email of the user to be charged
descriptionStringOptionalNoneThe transaction description which is optional
fullNameStringOptionalNoneThe fullname of the user to be charged
countryStringOptionalNoneTransaction country which can be optional
transRefStringRequiredNoneSet a unique transaction reference for every transaction
amountStringRequiredNoneThe transaction amount in kobo
callbackUrlStringOptionalNoneThis is the redirect url when transaction is successful
publicKeyStringRequiredNoneYour Public key or see above step to get yours
closeOnSuccessboolOptionalFalseClose checkout when trasaction is successful
closePromptboolOptionalFalseClose the checkout page if transaction is not initiated
setAmountByCustomerboolOptionalFalseSet to true if you want user to enter transaction amount
pocketRefStringOptionalNoneThis is your pocket reference for vendors with pocket
vendorIdStringOptionalNoneThis is the vendorId of your business using pocket
tokenizeboolOptionalFalseTokenize card
customizationCustomizationModelOptionalCustomizationModelCustomizationMode( borderColor: "#000000", backgroundColor: "#004C64", buttonColor: "#0084A0", paymentMethod:[PayChannel.card, PayChannel.account, PayChannel.transfer, PayChannel.momo], confetti: false , logo: "logo_url or base64")
onSuccessMethodOptionalNoneCallback method if transaction was successful
onCancelMethodOptionalNoneCallback method if transaction was cancelled

Usage


 <script>
  import Seerbit from "seerbit-svelte";
</script>

	<Seerbit   
		public_key="YOUR PUBLIC KEY"
		tranref={new Date().getTime()}
		full_name="John Doe"
		amount="145.00"
		email="test@emaildomain.com"
		currency="NGN"
		country="NG"
		mobile_no=""
		productId=""
		description=""
		planId=""
		vendorId=""
		pocketReference=""
		setAmountByCustomer={false}
		tokenize={false}
		customization={{
			payment_method: ["card", "account", "transfer", "ussd", "momo"],
			confetti: true,
			logo: "",
			theme: {
			border_color:'fff',
			background_color:'fff',
			button_color:'fff',
			}
		}}
		onSuccess={(response, closeModal) => {
			console.log(response);

      setTimeout(() => closeModal(), 3000)
		}}
		close={(close) => {
			console.log(close);
		}}
		buttonText="Make Payment"
		buttonStyle={{
			style: "padding-top: 40px; padding-bottom: 40px; width: 50%; border-radius: 20px; color: #fff; background-color: red; font-size: 10px",
		}}
/>

onSuccess you will recieve a Map containing the response from the payment request.

Keywords

svelte

FAQs

Package last updated on 13 Dec 2023

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

About

Packages

Stay in touch

Get open source security insights delivered straight into your inbox.

  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc

U.S. Patent No. 12,346,443 & 12,314,394. Other pending.