Skip to main content

Integration flow

smilepayz teamsAbout 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 backendopen in new window and switch to sandbox tab
  • Merchant ID : start with sandbox in sandbox env.
  • Merchant Secret : the placeholder used during signing must not be changed.

Step 2: Config Ip white List and Callback Url

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 to the same pair as the 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, and private key with your own.

javaopen in new window
C#open in new window
phpopen in new window
pythonopen in new window
node.jsopen in new window
golangopen in new window

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",
  ......
}

Step 6: Receive Smilepayz's callback request

Production Environment

Step 1: Get Integration Information

  • Production integration infos differs completely from sandbox.
  • Login merchant backendopen in new window 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 to the same pair as the 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, and private key with your own.

javaopen in new window
C#open in new window
phpopen in new window
pythonopen in new window
node.jsopen in new window
golangopen in new window

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