Creating a payment

To interact with the API, use the Unitpay PHP-SDK library.

https://unitpay.money/api?
     method=initPayment 
     params[paymentType]=card
     params[account]=order413 
     params[sum]=100
     params[desc]=description
     params[projectId]=123456
     params[secretKey]=key

Required parameters:

The value of project Id and SECRET KEY of the project can be found on the Project Settings page:

Additional payment parameters:

You can run the query in test mode. Learn more

Successful response

{"result": {
    "message": "Payment has been successfully created",
    "paymentId": "1400072",  
    "type": "redirect", 
    "redirectUrl": "http://unitpay.money/pay/redirect/111-ab34c22" 
}}

Error response

{"error": {
    "message": "Error description"
}}

Last updated