Integration

This page guides you through integrating Pleenk into your system. You'll learn how to generate and send keys, create and sign widget links, and integrate these widgets. Additionally, it explains the use of production and sandbox environments for testing and deployment.

Integration Steps for Pleenk

Integrating Pleenk into your system involves a few detailed steps. Here’s how to proceed:

Environments: Production and Sandbox 🌍

Pleenk offers two environments to facilitate integration and testing:

EnvironmentDescription
ProductionThis is the live environment where actual transactions and operations occur. Use the production environment for all live activities once integration and testing are complete.
SandboxThis is a test environment that allows you to integrate and test the system before going live. The sandbox environment mimics the production environment, providing a safe space to ensure everything works as expected. You can access the sandbox at https://app.sandbox.pleenk.com/.

1. Generate a Public & Private Key for Signature 🔑

Start by generating a pair of public and private keys using the following commands:

openssl ecparam -name secp521r1 -genkey -noout -out ec_private.pem  
openssl ec -in ec_private.pem -pubout -outform PEM -out ec_public_key.pem  
openssl pkcs8 -topk8 -inform PEM -in ec_private.pem -out ec_private_key.pem -nocrypt

Send the generated public key to [email protected]. In return, you will receive a Confidentiality wallet ID. This ID is essential for signing and authenticating HTTP requests and generating widget links.

2. Generate a Widget Link 🔗

With the Confidentiality wallet ID. in hand, you can proceed to generate a widget link. Widget links cater to various use cases, such as providing a payment method, anonymously approving user identity, or linking a seller to your marketplace. Here’s how to create these links:

  1. Choose the widget type:

  2. Add widget parameters:

    • Follow the detailed documentation to configure the link according to your use case by adding the necessary widget parameters.
  3. Sign the link:

    • Use your private key to sign the link parameters, ensuring the authenticity and integrity of the requests. Refer to the specific documentation page on how to calculate the signature.

3. Integrate the Widget URL 🌐

Once the link is generated and signed, it can be integrated into your system. This can be done either by embedding the widget URL in an iframe or by providing an HTML link that redirects the user to Pleenk. Here’s an example of how to embed the widget URL in an iframe:

<iframe  src="https://app.pleenk.com/fr/widgets/sell?pw_confidentiality_wallet=14aad427-1e4d-4dc2-87da-fd045c21084b&pw_seller=adc2bd2a-aee7-4c65-a461-ddcc0cc0cf42&pw_user_linked=true&signature=MEQCIBWyY9vhMennYXcMmv6-RmZ-F481YfpSVtJCkX0ofyd7AiA1I8LimIxeB9ylwLUNGGKQeEOuVqVcVdkzCvARug9duQ">
</iframe>

4. Handling Notifications 📢

After the widget is integrated and being used, Pleenk will notify your marketplace about the status of the process via the default webhook or the one configured in the widget link. This notification keeps you informed about the transaction or approval status, ensuring seamless integration and communication between your system and Pleenk.

Go to Wehbhook notifications page to get more information