DocumentationLedger LiveExchange providerCard IntegrationLiveApp

Provider’s LiveApp

As explained in the Card Integration page, you need to modify your LiveApp with some specific adjustments compared to the one found in the Discover section.

Your LiveApp must:

  • Use the Ledger’s exchangeSDK, in addition to the Ledger Services Kit.
  • Have a modified, slightly more complex, Manifest file.
  • Follow specific flow/ux requirements.

Ledger Exchange Services Kit

To learn how to create (or embed if already existing) your user interface for the card, please follow the Discover documentation.

Your LiveApp will interact with Ledger Live, through the ExchangeSDK, with the corresponding method.

You will need to set up the SDK with your providerId attributed upon request by Ledger.

const exchangeSDK = new ExchangeSDK("yourProviderId");

CARD method

This method will need you to provide the following parameters:

  • quoteId: The id coming from your system.
  • fromAccountId: User’s Ledger account id.
  • fromAmount: Amount that will be sold.
  • toFiat: Fiat currency that the user wants to be paid with using provider id.
  • rate: The crypto/fiat rate.
exchangeSDK.sell({
  quoteId: "123abc",
  fromAccountId: "97f06be9-6fb2-5da3-be71-4e762ed6e115", // Ledger Live uuid4 account (can be a BTC account)
  fromAmount: new BigNumber(1),
  toFiat: "EUR", // provider fiat id
  rate: 66564, // crypto/fiat rate [BTC/EUR]
  type: "card",
});
👉

Ledger needs to know how to send referral information through the widget.

Manifest Permission

Your LiveApp manifest should contains at least those permissions request:

"permissions": [
  "account.list",
  "currency.list",
  "custom.exchange.start",
  "custom.exchange.complete",
  "custom.exchange.error",
]

Key Generation for Production and Test Environments

To ensure secure communication, you must generate two sets of keys: one for the production environment and one for the test environment. Follow the steps below to generate these keys:

Testing with the Development Key

After submitting your keys to us and once the CAL team has successfully integrated them, you can proceed to test your integration in Ledger Live.

Steps to Test in Ledger Live

  1. Open the Settings menu in Ledger Live.
  2. Navigate to the Developer tab.
  3. Locate the setting labeled Exchange in Test Partner Mode.
  4. Enable this setting to activate the test environment.
Payload and Payload Signature generation diagram

With this mode enabled, you can verify the functionality of your keys and ensure everything is working as expected in the test environment.

Ledger
Copyright © Ledger SAS. All rights reserved. Ledger, Ledger Nano S, Ledger Vault, Ledger OS are registered trademarks of Ledger SAS