Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

checkout-com-js

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

checkout-com-js

Simple library with low level of abstraction

  • 1.0.0
  • latest
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
6
increased by100%
Maintainers
1
Weekly downloads
 
Created
Source

Checkout.com API JavaScript Library

Simple library with low level of abstraction

It's an update of https://www.npmjs.com/package/checkout-js-library, since it was no longer following current checkout.com documentation

https://api-reference.checkout.com

https://docs.checkout.com/docs

Tests

npm install
npm run test

Usage

import ApiClient from "checkout-com-js";

const api = new ApiClient({
  secretKey: 'sk_',
  publicKey: 'pk_',
  env: 'LIVE', // 'SANDBOX'  // optional
  debugMode: true, // optional
})

Methods

Token

api.tokenService.createToken(payload);

Payment

api.paymentService.createPayment(payload);
api.paymentService.getPayment(paymentId);
api.paymentService.getPaymentActions(paymentId);
api.paymentService.capturePayment(paymentId, payload = {});
api.paymentService.refundPayment(paymentId, payload = {});
api.paymentService.voidPayment(paymentId, payload = {});

Webhook

api.webhookService.getWebhooks();
api.webhookService.createWebhook(payload);
api.webhookService.getWebhook(webhookId);
api.webhookService.updateWebhook(webhookId, payload);
api.webhookService.deleteWebhook(webhookId);

Event

api.eventService.getEventTypes();
api.eventService.getEvents();
api.eventService.getEvent(id);
api.eventService.getEvent(eventId);
api.eventService.getEventNotifications(eventId, norificationId);
api.eventService.retryWebhook(eventId, webhookId);
api.eventService.retryAllWebhooks(eventId);

Event

api.eventService.createSource(payload);

Keywords

FAQs

Package last updated on 01 Feb 2020

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

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc