https://github.com/daniel-rosiak/checkout-com-js
Checkout.com API JavaScirpt connector
https://github.com/daniel-rosiak/checkout-com-js
checkout checkout-com checkout-com-api checkoutcom payment-api payment-gateway payment-integration
Last synced: over 1 year ago
JSON representation
Checkout.com API JavaScirpt connector
- Host: GitHub
- URL: https://github.com/daniel-rosiak/checkout-com-js
- Owner: daniel-rosiak
- License: mit
- Created: 2020-01-10T14:25:47.000Z (over 6 years ago)
- Default Branch: master
- Last Pushed: 2020-02-01T15:32:30.000Z (over 6 years ago)
- Last Synced: 2025-03-09T14:34:44.943Z (over 1 year ago)
- Topics: checkout, checkout-com, checkout-com-api, checkoutcom, payment-api, payment-gateway, payment-integration
- Language: JavaScript
- Size: 11.7 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# 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, because it is outdated.
### https://api-reference.checkout.com
### https://docs.checkout.com/docs
## Tests
```
npm install
npm run test
```
## Usage
```javascript
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);
```