API payment processing / DONE
Accept payments through your exchanger for other sites. Act as a payment processor

Create a request
Use the public/exchanger/order/create method
routeId
destination id
ObjectID
partner
partner code
STRING
amount
sum
FLOAT
fromValues[0][key]
field key
ObjectID
fromValues[0][value]
field value
STRING
toValues[0][key]
field key
STRING
toValues[0][value]
field value
STRING
routeValues[0][key]
field key
ObjectID
routeValues[0][value]
field value
STRING
lang
language (eng, rus)
STRING
agreement
agreement
BOOLEAN
hideOutData
hide details
BOOLEAN
clientCallbackUrl
callback, when the application is completed, the client will see a button to return to the site, and the client will be redirected to this url ?status=success or to ?status=error
STRING
ipnUrl
URL of instant payment notification (will be called when order status changes)
STRING
ipnSecret
string to create a secure hash in ipn url
STRING
Documentation for the authorisation system can be found in your personal cabinet. More information about working with methods and additional data can be found at
IPN (Payment Request Status Change Notification)
To receive notification of a status change when a request is created, you need to provide additional parameters:
clientCallbackUrl
- Callback URL. When the request is completed, the client will see a button to return to the website, and the client will be redirected to this URL.hideOutData
- Hide recipient data.ipnUrl
- HTTP/HTTPS URL for notifying your server.ipnSecret
- Random string for creating the request signature (to maintain request integrity).
The request will be sent via the POST method.
IPN will be sent once.
IPN delivery is not guaranteed (if the server does not respond to the request, it will not be resent).
Example IPN
POST
['Content-Type'] = 'application/x-www-form-urlencoded'\
orderUID
:Number() - request uidorderId
:String(ObjectId) -request idnewStatus
:String() - current request statusinAmount
:String(number) - order in sumoutAmount
:String(number) - order out sumxml_from
:String() - order uidxml_to
:String() - order uidtimestamp
:Number() - unix time and ipn notificationtoValues
:Array([{key,name,value}]) - request details
Status list
new
- new requestwaitPayment
- waiting for user paymenterrorPayment
- user payment error (sender’s error)inProgress
- in process (awaiting admin processing or request payment)inProgressPayout
- queued for payout (payment successfully received) (if automatic payment is set in currency, it will be initiated)errorPayout
- payout error (error during payout)hold
- request frozen (application issues)done
- request successfully paid outreturned
- request was paid, but not all exchange conditions and sender’s refund methods were metdeleted
- request deleted (canceled)
Request Checksum Verification (IPN)
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
Payment Monitoring
To monitor request status, log in, and all requests will be displayed in your dashboard;
You can save the request UID and secret and manually go to the request by entering these details in the address bar.
Payment
You can use /payment/ to display the payment page:
// schema
protocol://domain/user-lang/payment/order-uid/order-secret
// example result
https://www.domain.com/en/payment/1409/dGqwF2M2eBPaSN1G5ljMS1cb
You can also display the link on the exchange as all clients see it, following the same schema as the first option, except replacing /payment/ with /order/.
The method has parameters that allow displaying payment data or the payment form on your site, which you can use. IMPORTANT: if a prepayment method is used, you need to update the order status from
waitPayment
toinProgress
after payment.
Last updated