tillit
v0.0.6
Published
Tillit Checkout API Wrapper
Maintainers
Readme
Tillit Node.js Library
The Tillit Node Library provides convenient access to Tillit Checkout APIs.
It helps merchants/webshops to integrate with Tillit
Documentation
See the https://tillit.stoplight.io/docs/tillit-checkout-api-docs/docs/1.%20Introduction.md
Requirements
Node 8, 10 or higher
Installation
Install the package with:
npm install tillit --saveUsage
The package needs to be configured with merchant api key befor calling any other function
const Tillit = require('tillit');
const tillit = new Tillit();
tillit.setVariables({
baseUrl: "https://staging.api.tillit.ai/v1",
merchantAPIKey: "secret_prod_...."
});
tillit.getOrderList((err, response) => {
if (err) {
console.log(err);
} else {
console.log(JSON.parse(response.body));
}
});Or ES Modules and async/await: Coming Soon
import Tillit from 'tillit';
const tillit = new Tillit();
Available Functions
Create Order
SDK Function Name:
createOrderMethod:
POSTEndpiont Url: https://api.tillit.ai/v1/order
Description: Create an order.
Get order details
SDK Function Name:
getOrderDetailsMethod:
GETEndpoint Url: https://api.tillit.ai/v1/order/{{order_id}}
Description: Retrieve a previously created order.
Provide invoice details
SDK Function Name:
provideInvoiceDetailsMethod:
POSTEndpoint Url: https://api.tillit.ai/v1/order/{{order_id}}/invoice_details
Description:
Invoice details are provided by:
- The merchant via Merchant Portal for
Order.invoice_type == DIRECT_INVOICE - Tillit Bank or a 3rd-party bank for
Order.invoice_type == FUNDED_INVOICE - Void for
Order.invoice_type == CARD
The merchant can provide the invoice_details when creating an order, when updating an order, or by using this endpoint directly.
- The merchant via Merchant Portal for
Get list of orders
SDK Function Name:
getOrderListMethod:
GETEndpoint Url: https://api.tillit.ai/v1/orders
Description: Retrieve all orders made by a given merchant or buyer.
Edit order
SDK Function Name:
editOrderMethod:
PUTEndpoint Url: https://api.tillit.ai/v1/order/{{order_id}}
Description: Edit a previously created order.
Update order when fulfilled
SDK Function Name:
fulfilOrderMethod:
POSTEndpoint Url: https://api.tillit.ai/v1/order/{{order_id}}/fulfilled
Description:
Set the order status to
FULFILLED. Fulfilled requests should normally have empty request body. Only for partial capture, the post body is as below.
Update order when delivered
SDK Function Name:
deliverOrderMethod:
POSTEndpoint Url: https://api.tillit.ai/v1/order/{{order_id}}/delivered
Description:
Optional order update: Set the order status to
DELIVERED.
Cancel the order
SDK Function Name:
cancelOrderMethod:
POSTEndpoint Url: https://api.tillit.ai/v1/order/{{order_id}}/cancel
Description:
Endpoint to cancel the order and void the invoice.
Get verification information for order
SDK Function Name:
getOrderVerificationInfoMethod:
GETEndpoint Url: https://api.tillit.ai/v1/order/{{order_id}}/verification
Description:
Create order intent
SDK Function Name:
orderIntentMethod:
POSTEndpoint Url: https://api.tillit.ai/v1/order_intent
Description:
The endpoint enables the merchant to check in advance whether an invoice payment is applicable as a payment method for the
Buyer.Tillit will perform a risk assessment and credit check using the data provided in the
OrderIntentbefore a boolean is returned as a result.If
line_itemsare provided Tillit will be able to do a more accurate assessment and the approval rate will in general increase.
Create partner merchant
SDK Function Name:
createPartnerMerchantMethod:
POSTEndpoint Url: https://api.tillit.ai/v1/partner/merchant
Description:
Get partner merchant
SDK Function Name:
getPartnerMerchantMethod:
GETEndpoint Url: https://api.tillit.ai/v1/partner/merchant/{{merchant_id}}
Description:
