Payment Terminal
Payment Terminal is a separate service which can help you to display your deposit address as a web page or embed it into your website as an i-frame.
As a merchant you need to generate a GET URL with a set of the established parameters according to the requirements below and redirect a user via that link to Payment Terminal. Data available for the user includes address and QR-code, currency and deposit amount (in case ‘amount’ parameter was sent).
An example of implementation of Payment Terminal with i-frame
An example of implementation of Payment Terminal without i-frame
Once the user makes a deposit, it will be processed according to common deposit flow.

Payment terminal workflow representation

Creating a request

You need to create a request which contains hash with two required parameters: data and signature.
The request address:
https://terminal.coinspaid.com/?'data and signature'

Data parameter generation

You need to form JSON with the following parameters
Example:
1
{
2
"client_id"=>11,
3
"currency"=>"BTC",
4
"foreign_id" =>111,
5
}
Copied!
You need to convert the resulting represented code in JSON to base64 format.
Example:
1
eyJjbGllbnRfaWQiOjExLCJjdXJyZW5jeSI6IkJUQyIsImZvcmVpZ25faWQiOjExMX0
Copied!
You need to:
    concatenate JSON with secret key to generate signature
Example:
1
{
2
"client_id"=>11,
3
"currency"=>"BTC",
4
"foreign_id" =>111,
5
}
6
ObPvxgtazKCkQ7ifz3qzocbv9TVXeB1LUIbCsYk2WUt5agvyt1n1MhQnnCBlcwhY
Copied!
    The calculated hmac(sha512) hash in lowercase looks like:
Example:
1
fbd85d7769b05ee170486e1b294047707ad1c7cb55c3be2b1516339e8cdf900d76657074d7105797f0361d28b768ad01b62d44a48b52b8d2581bf5e63f72ca3a
Copied!
As a result, the request will have the following look:
1
https://terminal.coinspaid.com/?data=eyJjbGllbnRfaWQiOjExLCJjdXJyZW5jeSI6IkJUQyIsImZvcmVpZ25faWQiOjExMX0=&signature=fbd85d7769b05ee170486e1b294047707ad1c7cb55c3be2b1516339e8cdf900d76657074d7105797f0361d28b768ad01b62d44a48b52b8d2581bf5e63f72ca3a
Copied!
Last modified 6mo ago