Skip to content

About

Official UTOPAY payment gateway API clients (Node.js, PHP, Python): accept cards, Apple Pay, PayPal and crypto (USDT, ETH) with payouts to your own wallet.

Topics

Resources

Stars

0 stars

Watchers

0 watching

Forks

Latest commit

 

History

1 Commit

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

UTOPAY SDK — payment gateway API for cards and crypto

Official API clients for UTOPAY — a payment gateway for high-risk and international businesses. Accept cards, Apple Pay, Google Pay, PayPal, Revolut and crypto (USDT, ETH, BNB and more) and get paid straight to your own wallet.

Card & wallet payments 4.5% all-in, paid out in USDC on Polygon — card gateway
Crypto payments 1.5% + network fee, forwarded on-chain to your wallet — crypto gateway
Without an account POST /v1/pay, POST /v1/crypto/pay with just a wallet address
Webhooks HMAC-SHA256 signed — verification helpers included
Docs utopay.app/docs · API overview · OpenAPI spec

Clients

Language Folder Dependencies
Node.js 18+ (TypeScript types included) node/ none — uses built-in fetch
PHP 7.4+ php/ ext-curl, ext-json
Python 3.8+ python/ none — standard library only

Each client is a single file: copy it into your project or install it from this repository.

Quick start

Node.js

const { Utopay } = require('./node/utopay');
const utopay = new Utopay(process.env.UTOPAY_SK); // utopay_sk_live_… or utopay_sk_test_…

// Card / Apple Pay payment → USDC to your wallet
const order = await utopay.createPayment({ amount: 49.9, currency: 'EUR', description: 'Order #1042' });
console.log(order.checkout_url); // redirect the buyer here

// Crypto payment → straight to your wallet
const crypto = await utopay.createCryptoPayment({ coin: 'bep20/usdt', amount: 100, currency: 'USD' });

PHP

require 'php/src/Utopay.php';
$utopay = new \Utopay\Utopay(getenv('UTOPAY_SK'));
$order = $utopay->createPayment(['amount' => 49.90, 'currency' => 'EUR', 'description' => 'Order #1042']);
header('Location: ' . $order['checkout_url']);

Python

from utopay import Utopay
utopay = Utopay(os.environ["UTOPAY_SK"])
order = utopay.create_payment(amount=49.90, currency="EUR", description="Order #1042")
print(order["checkout_url"])

No account at all

const utopay = new Utopay(); // no key
const order = await utopay.createCryptoPaymentNoAccount({
  coin: 'polygon/usdt', amount: 25, currency: 'USD', payout_address: '0xYourWallet…',
});

Webhooks

// Express: use the RAW body
app.post('/hooks/utopay', express.raw({ type: 'application/json' }), (req, res) => {
  const event = Utopay.verifyWebhook(req.body, req.get('x-utopay-signature'), process.env.UTOPAY_WHSEC);
  if (event.event === 'payment.succeeded') { /* mark event.data.id as paid */ }
  res.sendStatus(200);
});

Events: payment.succeeded, payment.underpaid, payment.expired, payment.failed. See webhooks.

Examples

No-code options

  • Payment links — share a link, get paid by card or Apple Pay
  • CMS plugins — WooCommerce, WHMCS, OpenCart, PrestaShop, MODX, Easy Digital Downloads, Paid Memberships Pro, Tilda

Links


Русский. Официальные клиенты API платёжного шлюза UTOPAY для Node.js, PHP и Python: приём карт, Apple Pay, PayPal и криптовалюты с выплатой на ваш кошелёк. Документация — utopay.app/ru/docs.

License: MIT

About

Official UTOPAY payment gateway API clients (Node.js, PHP, Python): accept cards, Apple Pay, PayPal and crypto (USDT, ETH) with payouts to your own wallet.

Topics

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages