Münzen API
  • Home
  • Getting Started
  • API Overview
    • API Reference
    • API Requests
    • API Authentication
    • Environments
    • Errors
    • Callbacks (Webhooks)
    • Currencies, Confirmations, and Limits
    • How to accept crypto payments
    • Proof of Funds
    • AML & Compliance Checks
  • Testing
    • How to check integration
  • Invoices
    • What is Invoices
    • Create an Invoice
    • Invoice Statuses
    • Invoice Callbacks
  • Channels
    • What is Channels
    • Create a Channel
    • Channel Payment Statuses
    • Channel Callbacks
  • Payment Widget
    • What is Payment Widget
    • Integration Guide for Payment Widget
      • Params for Channel Widget
  • Payouts
    • What is Payouts
    • Create a Payout
    • Payout Statuses
    • Payout Callbacks
  • Useful Information
    • Testnet Faucets
Powered by GitBook
On this page
  • Available Params
  • Result
  1. Payment Widget
  2. Integration Guide for Payment Widget

Params for Channel Widget

Available Params

Here is a list of available params for the channel payment widget:

{
  // Required params
  client_key: string;
  customer_external_id: string;
  signature: string;
  timestamp: number;
  
  // Optional params
  external_id: string;
  external_data: Record<string, string>;
  
  // See full list of currencies here: 
  // https://developers.munzen.io/api-overview/currencies-confirmations-and-limits#sandbox-limitations
  pay_currency: 'BTC' | 'ETH' | 'BCH' | 'USDTERC20' | 'USDTTRC20' | 'LTC';
  price_currency: 'EUR' | 'UAH' | 'USD';
  // String representing float number, for example: 1000.5 
  price_amount: string;
 
  // Theme is purely presentational parameter no used in signature generation
  // It has 2 options, "dark" or "light" -
  // choose what better suits for your application look & feel
  theme: 'dark' | 'light';
};
  • client_key - use your API_KEY here

Example of params:

const API_KEY = 'j6OOj3EPVLQh18IjxWZ1XhohgXx7TuM1eufrQ3lv';

const params = {
    client_key: API_KEY,
    customer_external_id: '[email protected]',
    signature: 'a123b0f6728cca721a9db6a994a39ff19387c104f8c9a2b95beb1576e1fd8079',
    timestamp: 1687778100,
    
    // User will be asked to pay 100.5 EUR via ETH transfer
    pay_currency: 'ETH',
    price_currency: 'EUR',
    price_amount: '100.5',
}

// Generating URL params
const widgetUrlParams = new URLSearchParams(params);
const queryString = widgetUrlParams.toString();

// Example usage with URL
const url = new URL('https://sandbox-payment-widget.munzen.io/channel');
url.search = queryString;

console.log(url.toString());

Here is an example of how to generate the signature:

Result

As a result, you will receive the following link:

https://sandbox-payment-widget.munzen.io/channel?client_key=j6OOj3EPVLQh18IjxWZ1XhohgXx7TuM1eufrQ3lv&customer_external_id=johnny%40email.com&signature=a123b0f6728cca721a9db6a994a39ff19387c104f8c9a2b95beb1576e1fd8079&timestamp=1687778100&pay_currency=ETH&price_currency=EUR&price_amount=100.5
PreviousIntegration Guide for Payment WidgetNextWhat is Payouts

Last updated 1 year ago

RunKitRunKit
TypeScript example of generating signature
Logo
Here is an example of channel payment widget for ETH