Integration with your service

Merchant

Create an application

Use the method public/exchanger/order/create

Name Description Type
routeId direct id ObjectID
partner partner code STRING
amount sum FLOAT
fromValues[0][key] field key ObjectID
fromValues[0][value] value for the field STRING
toValues[0][key] field key STRING
toValues[0][value] value for the field STRING
routeValues[0][key] field key ObjectID
routeValues[0][value] value for the field STRING
lang language STRING
agreement contract BOOLEAN
hideOutData hide details BOOLEAN
clientCallbackUrl callback, when the application is complete, the client will see a button to return to the site, and the client will be redirected to this URL. ?status=success or on ?status=error STRING
ipnUrl Instant payment notification URL (will be called when the status of the order changes) STRING
ipnSecret string to create a secure hash in the ipn url STRING

Documentation for the authorization system can be found in your personal account.

IPN (Notification of a change in the status of a payment request)

To receive a notification about a change in the status of an application during its creation, you must send additional parameters:

  • clientCallbackUrl - callback, when the application is complete, the client will see a button to return to the site, and the client will be redirected to this URL.
  • hideOutData - hide recipient data
  • ipnUrl - HTTP/HTTPS link to notify your server.
  • ipnSecret - A random string to generate the request signature (to maintain request integrity)
  1. The request will be sent using the POST method
  2. The IPN will be sent once
  3. IPN delivery is not guaranteed (if the server did not respond to the request, it will not be re-sent)

Sample IPN

  • POST
  • ['Content-Type'] = 'application/x-www-form-urlencoded'


  • orderUID :Number() - application uid
  • orderId :String(ObjectId) -application id
  • newStatus :String() - application current status
  • inAmount :String(number) - order in sum
  • outAmount :String(number) - order out sum
  • xml_from :String() - application uid
  • xml_to :String() - application uid
  • timestamp :Number() - unix time and ipn notifications
  • toValues :Array([{key,name,value}]) - details of the application

  • new - new application
  • waitPayment - we expect payment from the user
  • errorPayment - user payment error (seller shipping error)
  • inProgress - in process (waiting for admin processing or application payment)
  • inProgressPayout - in queue for payment (payment accepted successfully) (if automatic payment in currency is configured, it will be initialized)
  • errorPayout - payment error (an error occurred during payment)
  • hold - application is frozen (problems with the application)
  • done - the application has been successfully paid
  • returned - the application was paid, but not all conditions of exchange and methods of returning the sender were fulfilled
  • deleted - application deleted (cancelled)

Request Checksum (IPN) Verification

sha256(orderId:newStatus:inAmount:outAmount:xml_from:xml_to:timestamp:ipnSecret)

        
const stringForHash = orderId+":"+newStatus+":"+inAmount+":"+outAmount+":"+xml_from+":"+xml_to+":"+timestamp+":"+ipnSecret;
// example string for hash 5d8e6002b80b7b4cd75a6424:inProgress:2:317.42:ETH:WMZ:1571328406072:SECRET123

const hash = crypto.createHash('sha256').update(stringForHash).digest('hex')
// example hash af3acf947e6f0e0f2c267e300b8582e504dba12d1f2d058652b7414163c09f48
        
      

Control of payments

  1. If you need to monitor the status of requests, create them using authorization, all requests will be displayed in your personal account;
  2. You can save the request UID and secret and manually navigate to the request by specifying these details in the address bar

Payment

  1. You can use /payment/ to display the payment page

    // schema
    https://www.izi.exchange/user-lang/payment/order-uid/order-secret
    // example result
    https://www.izi.exchange/en/payment/1409/dGqwF2M2eBPaSN1G5ljMS1cb
  2. Also, you can simply give a link to the exchange as it is seen by all clients according to the same scheme as in the first option, except /payment/ should be replaced with /order/
  3. The method has parameters that allow you to display payment details or a payment form on your site that you can use.