# Deposits API

We work as a bridge between you and your customer's local payment methods such as banks, e-wallets, among others.&#x20;

With only one integration, you have access to the most popular payment methods.

In order to make that possible, we have developed our API v3 of Deposits allowing you to create payments **directly** from your own cashier **or** from one of ours in case you want us to take care of the fields needed for each country and payment method.

## Solutions

Our API v3 of deposits is meant to be used on the way that fits best to your needs and technical requirements.

With only one API, you can opt for different integrations:

1. [OneShot Experience](#oneshot-experience): You collect, validate and send all the details required for the payment, and you display the payment's metadata directly on your website or redirect the customers to the payment page.
2. [Hosted Checkout Experience](#hosted-checkout-experience-not-available-for-new-integrations): We take the user to a checkout page to complete missing payment details manually. This flow is triggered as Oneshot experience fallback flow.

{% hint style="success" %}
Start testing all the API features with our [Postman collection here.](#postman-collection)
{% endhint %}

## OneShot Experience

The **OneShot Experience** is an integration where you send all the details required for the deposit and the customer itself and we will return you the metadata of the payment for you to build the payment page on your own website or a URL to redirect the customer to the payment page!

> We call it **OneShot** because the customer only has to generate the payment on your cashier and pay.

{% hint style="success" %}
Once the payment is generated, we will send a field specifying whether the payment experience can be done **OneShot:** native on your cashier with the metadata we give you or with **Redirect**.
{% endhint %}

This integration offers a more personalized user experience, as the user won't leave your site but for pay (if at all).

In order to make the payment creation process as smoother as possible and to avoid errors, in case you don't send a field that is required for the payment method/country, we will take care of it by asking the missing information to the customer on our Hosted Checkout instead of declining the payment :wink:

{% hint style="success" %}
With this integration, it is a good idea to **ask the customer** to fill in their details **only once** and **store them in your database** so you don't have to ask them for those details each time and **instead, you send us the information directly from your database**. In case they need to **modify** something, they should do it from **their profile** and not from your cashier.
{% endhint %}

#### Flow&#x20;

![](https://4143087822-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FQwMHQLA98rN2pqEMJgaj%2Fuploads%2FCQM5jLgNdB2ASunEFrZT%2Finfografi%CC%81a%20API%20v3%20-%20One%20Shot%20Experience%201.svg?alt=media\&token=e1ea8ac2-3157-42a8-90c1-1e371b72aa6a)

## Hosted Checkout Experience

{% hint style="warning" %}
Please contact your AM/TAM for instructions on how to enable this API Experience.
{% endhint %}

The Hosted Checkout Experience is an integrating solution where you  only need to send basic details about the deposit itself, and we will generate a link you will use to redirect your customers to our Hosted Checkout where we will prompt them for any missing details like the payment method, the document, email and full name.

{% hint style="info" %}
This flow works only as a fallback method for ONE SHOT experience, so that in cases which by mistake a piece of information was missing or additional information is required in order to create a Deposit, we can collect it and avoid a failure in the deposit creation.
{% endhint %}

Once integrated, adding new payment methods and countries with this integration requires no further development on your end since we will take care of the user experience!

With this integration, you only need to send the amount and the country of the deposit and we will handle the rest. The customers will be able to choose the payment method on our Checkout, input their data and pay.

{% hint style="info" %}
If you already have the customer's name, email address, document ID or any other details on your database, you can opt for sending it on the request so we don't ask the customer for it again.
{% endhint %}

The **Hosted Checkout Experience**, allows you to personalize our Checkout by sending details like the `payment_type` to group our payment methods on different sections of your page, the `bonus_amount` or a `strikethrough_amount` to show a promo on our Hosted Checkout, the `description` to show them what they are paying for or even your own `logo` so the customer can see it on our **Hosted Checkout**. All of that, with only one integration [described here](https://docs.lime-pay.com/api-documentation/endpoints/deposit-creation-endpoint#deposit-creation).

#### &#x20; Flow

![](https://4143087822-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FQwMHQLA98rN2pqEMJgaj%2Fuploads%2F9L01qrjoybax2VbCPWRh%2Finfografi%CC%81a%20API%20-%20Hosted%20Checkout%20Experience%201.svg?alt=media\&token=32d938fb-81af-4dee-b3fa-51ec3b884e16)

#### Getting Started

Follow this steps to start processing payments with the Lime-Pay Deposits API:

**1 - Sign Up:** [Create your merchant](https://docs.lime-pay.com/getting-started-with-lime-pay) account in our Merchant Panel.&#x20;

**2 - Get Credentials:** After your account has been activated, you will have access to your Staging (STG) Merchant Panel where you will need to&#x20;

* Whitelist your IPs
* Retrieve your API Keys

Than can be done by going to Settings -> API Access.

**3 - Integrate the APIs:** Follow the instructions over this documentation to integrate our Deposits APIs.

In order to move your account from STG to PRODUCTION, there are a few tests you need to check you are able to do:

* [ ] [Create deposits](https://docs.lime-pay.com/api-documentation/deposits-api/endpoints/deposit-creation-endpoint)
* [ ] Manually approve and cancel (at least) one deposit from the STG Merchant Panel
* [ ] Make sure you are receiving and handling our notifications correctly in your site according to [response statuses](https://docs.lime-pay.com/api-documentation/api-codes#deposits-status-codes) and [reject codes](https://docs.lime-pay.com/api-documentation/api-codes#api-error-codes)
* [ ] Use the [Payment Methods](https://docs.lime-pay.com/api-documentation/deposits-api/endpoints/payment-methods-endpoint) endpoint to retrieve payment methods availability

**4 - Go Live:** Once you have completed the tests required in step 3, Request Go Live on the Home of the STG Merchant Panel to generate your account in our Production environment.

We will review your tests, if everything is fine you will receive an email to activate your account on our production environment. In case there is something missing, we will let you know!

**5 - Process payments:** Get the production credentials, whitelist your IPs on the production environment and start processing your payments with **Lime-pay**!

Don't get stuck! In case you have any technical doubts not covered on this documentation, reach out to <support@lime-pay.com> for assistance.

## Postman collection

In order for you to start testing our Deposits APIs right away, we have prepared a Postman Collection you can use to test and validate your integration along with the functionalities we offer

[![Run In Postman](https://run.pstmn.io/button.svg)](https://god.gw.postman.com/run-collection/34627642-89340d44-5692-40e3-80b7-ffa805a9101d?action=collection%2Ffork\&source=rip_markdown\&collection-url=entityId%3D34627642-89340d44-5692-40e3-80b7-ffa805a9101d%26entityType%3Dcollection%26workspaceId%3Db17cccc0-ffb1-4858-9176-a041e92b6817)

{% hint style="success" %}
Make sure you replace the `login` and `secretKey` values with your own API Key and API Signature deposit credentials
{% endhint %}
