Integration flow
About 2 min
Get API doc and Integration Account
Brazil
Chile
Colombia
India
Indonesia
Mexico
Peru
Philippines
Thailand
Please contact smilepayz staff to obtain the account.
Sandbox Environment
Step 1: Get Integration Information
- Login merchant backend and switch to
sandbox
tab Merchant ID
: start withsandbox
in sandbox env.Merchant Secret
: the placeholder used during signing must not be changed.
Step 2: Config Ip white List and Callback Url
- config ip white list by yourself .refer to config ip in sandbox
- config callback url in merchant back end or put it in request parameter
callbackUrl
Step 3: Generate RSA private Key and save Public Key
- Click
Generate RSA Keys
button to generate RSA private key and Public key - Make sure the
public key
has beensaved
; you can confirm this by refreshing the page. - Make sure
the saved public key
corresponds tothe same pair
asthe private key
used for signing; otherwise, signature errors will occur.
Step 4: Make requests to our API using code
- Base url in sandbox:
https://sandbox-gateway.smilepayz.com
- We have provided demos in several programming languages.
- Please first replace the
merchant ID
,merchant secret code
, andprivate key
with your own.
Step 5: Make call back After create Order success
- Response data
code = 00
means success. paymentUrl
is mock data ,can't be used for actual payments.
{
"code": "00",
"channel": {
"paymentUrl": "https://sandbox-gateway.smilepayz.com/cashier/#/loading?tradeNo=T1112001925061115234920979"
},
"orderNo": "S200192eeacf6ed4f74406900c8f1039",
"responseCode": "2009000",
......
}
- In the sandbox environment, you can initiate callback requests on your own.
Step 6: Receive Smilepayz's callback request
- Get platform public key in sandbox to check smilepayz's request signature
- return
SUCCESS
to smilepayz
Production Environment
Step 1: Get Integration Information
- Production integration infos differs completely from sandbox.
- Login merchant backend and switch to
production
tab Merchant ID
: different from sandbox .Merchant Secret
: the placeholder used during signing must not be changed,different form sandbox.
Step 2: Provide your Ip list, and Config Callback URl
- For security, merchants can't set IP whitelist; please contact customer service.
- config callback url in merchant back end or put it in request parameter
callbackUrl
Step 3: Generate RSA private key and save Public Key
- Click
Generate RSA Keys
button to generate RSA private key and Public key - Make sure the
public key
has been saved; you can confirm this by refreshing the page. - Make sure
the saved public key
corresponds tothe same pair
asthe private key
used for signing; otherwise, signature errors will occur.
Step 4: Make requests to our API using code
- Base url in production:
https://gateway.smilepayz.com
- We have provided demos in several programming languages.
- Please first replace the
merchant ID
,merchant secret code
, andprivate key
with your own.
Step 5: Make call back After create Order success
- Production environment requires actual payment or successful payout before auto callback.
- Response data
code = 00
means success. paymentUrl
is smilepayz's checkout url- returned
channel
varies by region. refer to payChannel
{
"code": "00",
"channel": {
"paymentUrl": "https://gateway.smilepayz.com/cashier/#/loading?tradeNo=T1112001925061115234920979"
},
"orderNo": "200192eeacf6ed4f74406900c8f1039",
"responseCode": "2009000",
......
}
Step 6: Receive Smilepayz's callback request
- Get platform public key to check the smilepayz's signature
- return
SUCCESS
to smilepayz