Comment on page
👩💻
Initialization
Choose from React, React Native, Node.js, Python, Java & HTTP
npm i smilecoin-sdk-react
import { SmileReceiveButton, SmileSendButton } from 'smilecoin-sdk-react'
import { SmileReceiveButton, SmileSendButton } from 'smilecoin-sdk-react'
return (
<>
//Receive user payments
<SmilePayButton
amount={100}: (Number: units of smile)
platform="Test Partner" (String: platform name)
platform_address="X" (String: platform's receive wallet)
platform_parameters={ custom_parameter_1: "x"... } (Object: will take any sensitive custom parameters you would like to encrypt and track, this will append to the provided note)
uuid="1" (String: platform's user identifier in their own records)
note="testdk" (String: note describing the transaction)
callback={myCallback} (Function: Returns signed_txn to pass to partner BE)
env="dev" (String: "dev" | "prod")
/>
//Send user payments
<SmileSendButton
callback={myCallback}
/>
)
npm i smilecoin-sdk-react-native
import { SmileReceiveButton, SmileSendButton } from 'smilecoin-sdk-react'
import { SmileReceiveButton, SmileSendButton } from 'smilecoin-sdk-react'
return (
<>
//Receive user payments
<SmilePayButton
amount={100}: (Number: units of smile)
platform="Test Partner" (String: platform name)
platform_address="X" (String: platform's receive wallet)
platform_parameters={ custom_parameter_1: "x"... } (Object: will take any sensitive custom parameters you would like to encrypt and track, this will append to the provided note)
uuid="1" (String: platform's user identifier in their own records)
note="testdk" (String: note describing the transaction)
callback={myCallback} (Function: Returns signed_txn to pass to partner BE)
env="dev" (String: "dev" | "prod")
/>
//Send user payments
<SmileSendButton
callback={myCallback}
/>
)
pip3 install smilecoin
import smilecoin
smilecoin.api.auth(<your-api-key>)
txn_status = smile_coin.api.<action>(<payload>)
npm i install SmileCoinSDK
var smile = require('SmileCoinSDK');
var smileCoin = smile.api.auth(<your-api-key>)
var txnStatus = smileCoin.api.<action>(<payload>)
In your
pom.xml
add the following new dependency (under <dependencies>
)<dependency>
<groupId>us.smilecoin</groupId>
<artifactId>SmileCoinSDK</artifactId>
<version>1.0</version>
</dependency>
Import us.smilecoin.API;
API smileSDK = new API(
"testnet", //environ: (String: chosen environment, "testnet" || "mainnet")
);
smileSDK.auth(“api_key”); //(your api_key)
smileSDK.<action>(<payload>);
See next section
Last modified 1yr ago