JustMoney
  • Introduction
  • Whitepaper
  • $JM Token
    • Utility
    • Holders
    • Providers
    • Where to Buy
    • Additional Info
    • Contract Address
  • Partnership
    • Overview
    • Products
    • Support
  • JustMoney Swap
    • Overview
    • Token Listing
      • Self-listing
        • Custom Token Import
        • Adding Liquidity
      • White label solution
      • Marketing
    • Discounted swap fees on TRON (5-19trx)
    • Earn JM every day by providing energy
    • Multi-DEX routing
    • Widgets
      • Widget Builder
      • Single Chain
        • Usage
        • Examples
      • Multi-chain
      • Cross-chain
      • Bridge Widget
        • Usage
        • Examples
    • Holder ranks
  • JustMoney Bridge
    • Overview
  • JUSTMONEY EXPLORER
    • Overview
    • Blockchain Explorer
    • Token (dex view)
    • dApp store
      • Submit a project
    • Other features
    • GraphQL Server and Indexer
  • JustMoney Spot
    • Overview
    • FAQ
    • TradingView
  • JustMoney Pay
    • Overview
    • E-commerce integration
      • Woocommerce Plugin
    • Mobile Payment terminal
    • Payment Links
    • Donations
      • Installation
      • Customizing
    • API documentation
      • Creating an Order
      • Get Order Details
      • Get Order Status
  • JustMoney Invoice
    • Overview
    • Cost of Use
    • Payment Processing
    • Features
    • How to Create Invoice
  • JustMoney Gift
    • Overview
    • How to Send
    • How to Claim
    • FAQ
  • Brand Kit
  • Contact Us
Powered by GitBook
On this page
  • POST Params:
  • Example POST body:
  • Returns:
  1. JustMoney Pay
  2. API documentation

Creating an Order

PreviousAPI documentationNextGet Order Details

Last updated 2 months ago

You need to first use this endpoint to create an order on our systems. We will then return an url where you will redirect the user.

Endpoint: Request Type: POST Format: JSON

POST Params:

wallet.evm [String] Specify BSC and Polygon wallet address where you want to receive funds e.g. 0xd0545256AcaA8a20bDC077c0D104fc84dcDc4289

wallet.tron [String] Specify wallet in Tron format where you want to receive funds e.g. THgyXyKoPFxvMri6A8r8P4nSMPFrUbbUkz

src [String] Specify your platform e.g. WOOCOMMERCE_6_5_1. If you don't use ready-made plugin from us then specify here API

returnUrl [String] Your return url where you want your client to be redirected after the payment. Please make sure your url has some identification in the url e.g. orderId, so you can show correct confirmation/receipt for the user

statusHookUrl [String] Url that we call when order has been confirmed. When you receive this call you will receive secret, orderId (order id in your systems), hash, transactionHash and network in POST body as JSON object. Example POST body that it sends to the hook:

{
    "secret": "xxx",
    "orderId": "xxx",
    "hash": "xxx",
    "transactionHash": "xxx",
    "network": "xxx" //TRON, BSC, ETH, POLY, FANTOM, AVAX OR CRONOS
}

Before returning a response you this call you need to call our getStatusByHash endpoint to verify that the call is valid, from us and that transaction is confirmed. If it returns {"status":"DONE"} then you must respond to this call with the secret we sent. This means that you have acknowledged the call, and it will make sure we won't keep pinging your hook again.

totalAmount [String] Total USD amount with 2 decimals as String e.g. 12.00

orderId [String] Your unique order ID that identifies your order. We will send this when we call statusHookUrl

currency [String] Currency of your order e.g. USD. At the time of writing we only support USD

Example POST body:

{
    wallets: {
        "evm": "addressHere",
        "tron": "addressHere",
    },
    "src": "API",
    "returnUrl": "URL_TO_YOUR_THANKYOU_PAGE", // or https://pay.just.money/thankyou
    "statusHookUrl": "https://yourdomain.com/yourHookUrl",
    "totalAmount": "100",
    "orderId": "ORDER_ID_IN_YOUR_SYSTEM",
    "currency": "USD"
}

Returns:

{
  "id": "OUR_ORDER_ID",
  "hash": "HASH",
  "paymentUrl": "PAYMENT_URL",
}

or on error (with status code 500):

{ error: "Server error" }

You will need to redirect user to the paymentUrl that we send after you have saved these details in your system. You will need our order id and hash on later stage.

https://api-pay.just.money/v1/checkout/newOrder