@code-wallet/client
TypeScript icon, indicating that this package has built-in type declarations

2.0.8 • Public • Published

npm npm-downloads

@code-wallet/client

This module provides a seamless way to create a payment intent and verify payments directly from your server or client application. Whether you're building a web application or a server-side system, this module offers the tools you need to integrate with Code Wallet effectively.

Learn more about Code at https://getcode.com. See the docs for more information.

Features

  • Server and Client Compatibility: Designed for use both in browser environments and Node.js.
  • Payment Intent Creation: Easily create payment intents for processing transactions.
  • Payment Verification: Verify payments directly from your server to ensure they are completed successfully.

Installation

npm install @code-wallet/client

Usage

Creating a Payment Intent

import { paymentIntents } from "@code-wallet/client";

const options = {
    // ... your payment intent options here ...
};

const intent = await paymentIntents.create(options);
console.log(intent.clientSecret); // Use this client secret in your application

Verifying a Payment Intent

import { paymentIntents } from "@code-wallet/client";

const options = {
    intent: "YOUR_INTENT_ID"
};

const status = await paymentIntents.getStatus(options);
console.log(status); // Either 'pending' or 'confirmed'

Need Help?

If you have any questions or need help integrating Code into your website or application, please reach out to us on Discord or Twitter.

Versions

Current Tags

VersionDownloads (Last 7 Days)Tag
2.0.811latest

Version History

VersionDownloads (Last 7 Days)Published
2.0.811
2.0.70
2.0.60
2.0.50
2.0.40
2.0.30
2.0.20
2.0.10
2.0.00
1.3.10
1.1.20
1.1.10
1.1.00
1.0.40
1.0.30
1.0.21
1.0.11
1.0.01

Package Sidebar

Install

npm i @code-wallet/client

Weekly Downloads

14

Version

2.0.8

License

MIT

Unpacked Size

77.6 kB

Total Files

86

Last publish

Collaborators

  • jeffatcode
  • zfedoran