API documentation Litepaid HTTP API V2

The HTTP API of LitePaid makes it possible for your webshop to let your costumers pay with digital currency. Invoices are created automatically, there is no need to create them manually. Click here for the old API.

Every website you add to your websites will get an API key. Once your account has been verified by one of our employees you can use the API. This API key is required with every request to the API.


The functions

Creating invoice

You can create an invoice by sending a request to:

key*
The API key of your website
value*
A (float) number that will display the price of your product. If you want €100,45 then state 100.45.
return_url*
The page where you want to send a user trough at the moment a payment has been completed.
cancel_url
Alternative url for cancel. Default: return_url.
currency
Alternative currency. Default: EUR. Available: EUR, USD, GBP, CHF and TRY.
webhook_url
The url where Litepaid can send status reports about the invoice.
description
A small piece of text which will be on the invoice. Maximum 250 characters.
test
A binary number (1 or 0) which will determine whether the invoice is created in test-mode or not.

Invoice created

Invoice was created succesfully.


API-template-incorrect

Not all required parameters are set.

Description too long

The description parameter can only be 250 characters.

Value unknown

The value was not recognised. Probally because you didn't submit a number.

Value too low

The minimal transaction amount is 0.25

Invalid return url

The return_url parameter is incorrect.

Value too high

The maximum transaction amount for this account is 1500 after you register, contact the support if you require a higher maximum.

Invalid webhook url

The webhook_url parameter is incorrect.

Invalid cancel url

The cancel_url parameter is incorrect.

Invalid currency

The currency you set is not available. Only EUR, USD, GBP, CHF, and TRY are accepted.

Checking invoice status

You can check the status of an invoice by sending a request to:

key*
The API of your website
id*
The Litepaid invoice ID.

Invoice paid

The invoice was paid by the customer.

Invoice paid (unconfirmed)

The invoice was paid by the customer, but the network still needs to confirm the transaction.


API-template-incorrect

Not all required parameters are set.

Invoice not initiated

Invoice was not initiated by the customer.

Coin not chosen

No payment method was chosen by the customer.

Invoice unpaid

The invoice was not paid by the customer.

Invoice not paid enough

The invoice was not fully paid by the customer.

Invoice paid late

The invoice was paid too late, the value of the funds have been recalculated to the current rates.

Invalid paid back

The invoice was paid back.

Auth failed

Invalid key or invalid token.

Refund payment

Be cautious! You can only refund payments if your settings say you'd have received 100% of the funds in coins. If you'd receive part in euros, no refund is posible. Also 0.5% of the transaction is not refunded to cover transactioncosts.

You can check the status of an invoice by sending a request to:

key*
The API of your website
id*
The Litepaid invoice ID.
address*
The address the funds should be returned to.

Refund success

The refund was succesfully requested.


API-template-incorrect

Not all required parameters are set.

Auth failed

Invalid key or invoice id.

Refund already requested

Refund was already requested and granted.

No refund possible

The payment settings from the merchant prevent this feature.

No refund possible-2

The payment settings from the merchant prevent this feature.

No refund possible-3

Transaction could not be refunded because it was already paid to the merchant.