# InstaCash Buy Now Pay Later Woocommerce Plugin

## Description

A payment service gateway to Woocommerce webshops that allows a customer to pay in installments for cover a purchase.

From the available online offers of the InstaCash Application, we get a calculated amount based on which we can start the application process.

## Integration flow

### You must first enable the plugin to set up your payment method.

![Plugins](assets/screenshots/screenshot-1.png)

### You need to configure the plugin to provide additional information to customers.
- Add title
- Add description (optional)
- Provide instructions to customers after placing an order (optional)
- Get API Key from merchant portal (required)

#### Notification for get API Key

![Notification](assets/screenshots/screenshot-3.png)

#### Options Page

![Options page in payments](assets/screenshots/screenshot-4.png)

### Once the settings are in place, the payment service must be enabled.

![Payment method](assets/screenshots/screenshot-2.png)


### This will eventually appear on the user page.

![Customer side appearance](assets/screenshots/screenshot-5.png)

### Product page calculation

We recalculate when the quantity field changes,
but the timing and amount of this can also be entered individually in the custom script field in the following form:

```
setTimeout(() => {
    clearTimeout(instaCashProductBnpl.timer);
    instaCashProductBnpl.timer = setTimeout(instaCashProductBnpl.reCalculate(subtotal), 200, subtotal);
}, 50, subtotal);
```



