UpGate is a world-class payment orchestration platform. Our mission is to simplify payments and make it easier for merchants to reach global customers. We use the latest technologies to help you achieve better conversions and global user monetization.
https://docs.upgate.com/_mock/openapi/
https://api.sandbox.upgate.com/v1/
taxOverride
object was added to Checkout requestpaymentFormOverride
object was added to Checkout requestEmbedded components for checkout refer to a collection of ready-made user interface elements designed to facilitate the construction of your checkout process..
npm install axios express
success_url
and failure_url
for redirect customer. Create index.js
file with code bellow:const express = require("express");
const axios = require("axios");
const PORT = 5000;
const YOUR_DOMAIN = `http://localhost:${PORT}`;
const API_KEY = "X-api-key";
const app = express();
app.use(express.static("public"));
app.post("/checkout", async (req, res) => {
const result = await axios.post(
"https://api.sandbox.upgate.com/v1/checkout",
{
payment_data: {
ui_mode: "EMBEDDED",
type: "SALE",
methods: ["CARD", "GIROPAY", "MBWAY"],
amount: "20.03",
currency_code: "EUR",
},
customer: {
merchant_customer_id: "test",
},
callback: {
success_url: `${YOUR_DOMAIN}/index.html?success=true`,
failure_url: `${YOUR_DOMAIN}/index.html`,
},
products: [
{
type: "SALE",
price: 55,
name: "Test product name for SALE",
description: "Test product description for SALE",
},
],
},
{
headers: {
"X-Api-Key": API_KEY,
"Content-Type": "application/json",
},
}
);
res.json({ url: result.data.session.redirect_url });
});
app.listen(PORT, () => console.log(`Running on port ${YOUR_DOMAIN}`));