Socket
Socket
Sign inDemoInstall

checkout-com-js

Package Overview
Dependencies
5
Maintainers
1
Versions
1
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

    checkout-com-js

Simple library with low level of abstraction


Version published
Weekly downloads
19
increased by216.67%
Maintainers
1
Created
Weekly downloads
 

Readme

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

Last updated on 01 Feb 2020

Did you know?

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

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc