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 dataipnUrl- HTTP/HTTPS link to notify your server.ipnSecret- A random string to generate the request signature (to maintain request integrity)
- The request will be sent using the POST method
- The IPN will be sent once
- 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 uidorderId:String(ObjectId) -application idnewStatus:String() - application current statusinAmount:String(number) - order in sumoutAmount:String(number) - order out sumxml_from:String() - application uidxml_to:String() - application uidtimestamp:Number() - unix time and ipn notificationstoValues:Array([{key,name,value}]) - details of the application
new- new applicationwaitPayment- we expect payment from the usererrorPayment- 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 paidreturned- the application was paid, but not all conditions of exchange and methods of returning the sender were fulfilleddeleted- 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
- If you need to monitor the status of requests, create them using authorization, all requests will be displayed in your personal account;
- You can save the request UID and secret and manually navigate to the request by specifying these details in the address bar
Payment
-
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 - 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/
- The method has parameters that allow you to display payment details or a payment form on your site that you can use.