<a onclick="pay({
amount:300,
currency:'RUB',
order_number:'101',
description: 'Товар заказ 101'},
function(order) { Success(order) },
function(order) { Fail(order) })"
class="btn">Купить
</a>
<a id="link-pay">Купить</a>
let button = document.getElementById("link-pay");
button.addEventListener("click", function(){
pay(
{ amount:300, currency:'RUB', order_number:'101', description: 'Товар заказ 101' },
function(order) { Success(order) },
function(order) { Fail(order) }
)
})