0.2.1 • Published 3 years ago

depay-sdk v0.2.1

Weekly downloads
-
License
ISC
Repository
-
Last release
3 years ago

depay-sdk

To integrate dePay into your marketplace, you will first need to generate a payment URL that can be used to initialize an iframe with the dePay payment flow.

    import dePay from "depay-sdk";

    (async () => {
    try {
        // init dePay object
        const dePayOBJ = new dePay({
            appId: "YOUR-APP-ID",
            appSecret: "YOUR-SECRET",
            sandbox: true, // false for production
        });

         const response = await dePayOBJ.checkout.init({
            nft_action_type: "bid",
            total_value_in_smallest_unit: "1600000000000000",
            user_wallet_address: "0x4r87......o4t40",
            nfts_list: [],
        });

        // The payment status can be tracked using the PAYMENT_ID
        const status = await dePayOBJ.checkout.status("PAYMENT_ID");

    } catch (e) {
        // Deal with the fact the chain failed
        throw e;
    }
    })();
0.2.1

3 years ago

0.2.0

3 years ago

0.1.9

3 years ago

0.1.8

3 years ago

0.1.7

3 years ago

0.1.6

3 years ago

0.1.5

3 years ago

0.1.4

3 years ago

0.1.3

3 years ago

0.1.1

3 years ago

0.1.0

3 years ago