Skip to main content

PSP without verifiaction

Online acquiring Visa\MasterCard bank cards (without verification)

Integration consists in embedding the payment button into the partner's website. When clicking on this button, the following is done sending data to the GarryPay system address.

Information

To ensure security, the data sent must be cryptographically signed.

Integration via payment button

The payment button code should looks the same like:

<form action="https://merch-dev.garrypay.com/button" method="post">
<input
type="hidden"
name="data"
value="eyJtZXJjaGFudF9pZCI6IjE1YWU2Yzg4LWJiMGItNGY3Ny1hZjkxLTZhMGNkNWI0NGRlZCIsInB1cmNoYXNlX2lkIjozMTUsImFtb3VudCI6IjMzMTYuMDAiLCJjdXJyZW5jeSI6IlJVQiIsImxhbmciOiJydSIsInBheW1lbnRfbWV0aG9kIjoicDJwIiwiY2FsbGJhY2siOiJodHRwczpcL1wvbWVyY2hhbnQtc2l0ZS5jb21cL2NhbGxiYWNrX3VybCJ9"
>
<input
type="hidden"
name="sign"
value="YjNjOTNhOWE2ZmRlYjIyOTc5ZjMxMTdiMzQ1YmM3YmE2MGI1NjNhOTU0Zjc2NjcyNjc4ZTUzNmVmYjU4MWFjMQ=="
>
</form>

Code example

Info for the data field is preparing by following:

import crypto from "crypto";

const data = new Buffer(JSON.stringify({
merchant_id: "ef73bed1-2591-4a91-a74e-fe68b4e2e4e0"
purchase_id: "234-12",
amount: "300",
currency: "USD",
lang: "ru",
success_url: "https://merchant_site.com/success",
error_url: "https://merchant_site.com/error",
})).toString("base64")

const hmac = crypto.createHmac("sha256", key);
hmac.update(data);
const sign = Buffer.from(hmac.digest("hex")).toString("base64");

Thus the JSON object must translate in string and encode in Base64.

Permissed fields

NameTypeDefaultDescription
merchant_idstringrequiredYour merchant's ID
purchase_idstringrequiredUnique Purchase ID
amountstringrequiredAmount in the specified currency
currencystringrequiredThe currency in which pay USD
langstringenPayment interface language, en / ru
success_urlstringundefinedThe URL of the page to which the user is redirected after making the successful payment
error_urlstringundefinedThe URL of the page to which the user is redirected on error