Skip to main content

Hosted Mode

The hosted mode is the quickest and simplest method for integrating Lunu into your app.

Simple Integration

Integrating in hosted mode is pretty straight forward, the only thing you would need to do is redirect your user to Lunu (link below), this would work for both on desktop and mobile, just adding a link to your app.

Sample Production link

https://f2c.lunu.io/#/?id=23d93cac-000f-5000-8000-126628f15141&merchant_trx_id=23d93cac-000f-5000-8000-126628f15141&merchant_redirect_url=https://site.com

Sample Sandbox link

https://sandbox.f2c.lunu.io/#/?id=23d93cac-000f-5000-8000-126628f15141&merchant_trx_id=23d93cac-000f-5000-8000-126628f15141&merchant_redirect_url=https://site.com

The Hosted redirection URL is a customizable way to facilitate payment flows during customer checkout. Retailers/partners can predefine parameters in the URL using the '&' separator, such as '&cc=BTC', to prefill elements of the payment process. This allows for a smoother, more seamless transaction experience for customers.

URL Template

https://<widget hostname>/#/?id=< customer_id >&merchant_trx_id=< transaction id in your system >&merchant_redirect_url=< url of page you want to redirect user after payment is done >

Fields description

User is redirected to the Lunu site, will configs set in query params.

  • id
    • required: yes;
    • default: undefined;
    • type: string (UUID);
    • description: userID from lunu database;
  • merchant_trx_id
    • required: optional;
    • default: undefined;
    • type: string (UUID);
    • description: transaction id from merchant database;
  • merchant_redirect_url
    • required: no;
    • default: undefined;
    • type: string (URL);
    • description: if this parameter is preset customer will see the button with redirect function after the payment will be marked as successfull;
  • widget_type
    • required: optional;
    • default: deposit;
    • type: string, one of:
      • payment;
      • deposit;
    • description: flow that widget will lead user;
  • fiat_amount
    • required: if "widget_type" is "payment" and you want user to perform operation based on fiat amount - required, else - no.
    • default: undefined;
    • type: string (number);
    • description: default amount of fiat;
  • crypto_amount
    • required: if "widget_type" is "payment" and you want user to perform operation based on crypto amount - required, else - no.
    • default: undefined;
    • type: string (number);
    • description: default amount of crypto;
  • fiat_code
    • required: if "widget_type" is "payment" - required, else - no.
    • default: undefined;
    • type: string, one of:
      • USD;
      • EUR;
      • GBP;
      • PLN;
      • DKK;
      • NOK;
      • CZK;
      • SEK;
      • AUD;
      • CAD;
    • description: default code of crypto;
  • crypto_code
    • required: if "widget_type" is "payment" - required, else - no.
    • default: undefined;
    • type: string, one of:
      • USDT;
      • USDC;
    • description: default code of crypto;
  • default_method
    • required: optional;
    • default: undefined;
    • type: string, one of:
      • creditCard
      • applepay
      • googlepay
      • sofort
      • iDeal
      • bancontact
      • openBanking
    • description: preset for payment method. Could be set to skip 'paymentMethod' step so user wouldn't change it;
  • card_type
    • required: if "default_method" is "creditCard" - required, else - no;
    • default: undefined;
    • type: string, one of:
      • mastercard
      • Visa
    • description: type of payment card;
  • external_email
    • required: optional;
    • default: undefined;
    • type: string (email);
    • description: preset for user email that requires at authorization|registration step. Could be set to skip 'checkout' step;

Customisation options via query params

GET https://f2c.lunu.io/#/?id=b574049f-867b-4b9f-ad61-7d5e2ac7804b)/

NameTypeRequiredDescription
id*StringyesuserID from lunu database;
merchant_trx_idStringnoYour system redirect url for redirect on the final step
merchant_redirect_urlStringnoYour system redirect url for redirect on the final step
default_methodStringnothe payment method you want to use (one of: bancontact | creditCard | applepay |sofort | iDeal | googlepay \
fiat_amountStringyes, if "widget_type" is "payment"default amount of fiat
fiat_codeStringyes, if "widget_type" is "payment"default code of fiat
crypto_codeStringyes, if "widget_type" is "payment"default code of crypto. One of: BTC | ETH | XRP | LTC | BCH | USDT | USDC | ALGO | UNI
external_emailStringnoemail of the end customer of the merchant.
widget_typeStringnoone of
- Payment
- Deposit
crypto_amount*Stringyes, if "widget_type" is "payment"if "widget_type" is "payment" and you want user to perform operation based on fiat amount - required, else - no
card_typeStringyes, if "default_method" is "creditCard"type of payment card.One of : mastercard

Redirect Response

The Lunu widget URL allows the inclusion of a merchant_redirect_Url parameter. Upon completion of a purchase, Lunu will redirect the user to the specified URL using this parameter. This feature can be utilised by your application to detect the completion of a transaction and execute subsequent actions, such as providing the user with purchase status notifications.

If your app name is demo-example, and the parameter is set to redirectUrl = http://demo-example.com, the redirect would be as the following:

//after successful transaction
http://demo-example.com?orderId=123&status=success

//incase transaction is pending
http://demo-example.com?orderId=123&status=pending