Creating a payment
Last updated
Last updated
To interact with the API, use the Unitpay PHP-SDK library.
Type
Description
paymentType
line
account
line
Subscriber ID in the partner's system (for example, the subscriber's login or email)
sum
number
Amount of payment in USD (for example, 10.00)
desc
line
Order description
projectId
number
Your project ID in the UnitPay system
secretKey
line
Secret key, available in the project settings
The value of project Id and SECRET KEY of the project can be found on the Project Settings page:
Value
Description
currency
line
If the payment system does not support the required currency, the amount will be converted to the payment system currency
locale
line
It is mandatory to specify the payment form language, acceptable values: ru, en. By default, the form language is determined based on the country that the user's IP address belongs to
backUrl
line
The user's return address from the payment form without making a purchase; the project address is used by default. The project domain must be used in the address.
Examples: https://redirect.<project domain>/?someParams", "https://<project domain>/redirect/
resultUrl
line
subscription
true/false
Use this flag if you want to create a subscription under the payer's card. The subscription ID (subscriptionId) will be transmitted in the PAY method to your payment handler. Subscriptions can only be used after approval by your supervising manager
subscriptionId
number
The subscription ID in respect of which it is necessary to debit the funds. This parameter should be previously received in the PAY method to your payment handler
You can run the query in test mode. Learn more
Value
Description
message
line
Information about the result of payment generation
type
line
redirect — requires redirection to the payment platform gateway invoice — invoice is generated automatically, payment is made by the user through the payment system's account
paymentId
number
Payment number in the UnitPay system
redirectUrl
line
URL for redirecting the user to the payment platform gateway. If the payment does not require redirecting, this parameter will not be available
Value
Description
message
line
Information with a description of the payment generation error
through which the payment will be made
The order currency according to ISO 4217 (RUB, UAH, BYN, EUR, USD etc. ).
Url encoded branching address to which the user is sent after payment (for example, ). If this parameter is not set, the address of the payment receipt page will be used.