Integrate Payments Effortlessly with Developer-Friendly APIs
{ "id": "pay_1N2fG7JK8zHd9L", "object": "payment", "amount": 1000, "currency": "USD", "status": "succeeded", "created": 1682541234 }
Our vasGO API enables businesses and developers to easily integrate secure, real-time payment systems into their websites, mobile applications, and custom-built platforms, ensuring smooth and secure payment experiences.
With comprehensive documentation, SDKs for multiple programming languages, and a robust testing environment, you can implement payment functionality in minutes, not days.
Discover the powerful features that make vasGO API the preferred payment solution for developers.
Seamlessly add payment functionality to your mobile apps, websites, or custom platforms with minimal hassle.
// Initialize the vasGO API client
const vasgo = require('vasgo-node');
const client = new vasgo.Client('YOUR_API_KEY');
// Create a payment
async function createPayment() {
try {
const payment = await client.payments.create({
amount: 2500, // $25.00
currency: 'USD',
payment_method: 'card',
card: {
token: 'tok_visa' // Use a token from your secure form
},
description: 'Order #1234',
metadata: {
order_id: '1234',
customer_id: '5678'
}
});
console.log('Payment successful:', payment.id);
return payment;
} catch (error) {
console.error('Payment failed:', error.message);
throw error;
}
}
Instantly receive transaction updates and payment confirmations through our powerful API system.
Create a new payment and process it immediately.
amount integer required
Amount to charge in the smallest currency unit (e.g., cents for USD).
currency string required
Three-letter ISO currency code (e.g., USD, EUR).
payment_method string required
Payment method type (card, bank_transfer, wallet, etc.).
description string optional
Description of the payment that appears on statements.
Retrieve details of a specific payment.
We provide robust encryption and compliance with global security standards to safeguard all payment transactions.
# Secure payment processing with tokenization
import vasgo
# Initialize the client with your API key
client = vasgo.Client(api_key="YOUR_API_KEY")
# Create a payment token (on your secure server)
# This keeps sensitive card data off your servers
def create_payment_token(card_details):
try:
token = client.tokens.create(
card_number=card_details["number"],
exp_month=card_details["exp_month"],
exp_year=card_details["exp_year"],
cvc=card_details["cvc"]
)
return token.id
except vasgo.error.SecurityError as e:
print(f"Security validation failed: {e}")
return None
# Process payment with the token
def process_payment(amount, currency, token):
try:
# Apply 3D Secure authentication if required
payment = client.payments.create(
amount=amount,
currency=currency,
payment_method="card",
token=token,
security={
"3d_secure": True,
"fraud_detection": "enhanced"
}
)
return payment
except vasgo.error.PaymentError as e:
print(f"Payment failed: {e}")
return None
Comprehensive guides, tools, and support make integration simple and efficient for developers.
Explore the key endpoints that power our payment processing system.
Create a new payment and process it immediately.
Retrieve details of a specific payment.
Create a refund for a previously processed payment.
Create a reusable payment method that can be attached to customers.
Create a customer record to store payment methods and transaction history.
Configure webhook endpoints to receive real-time payment event notifications.
Our API is designed with developers in mind, making integration straightforward with clean, intuitive code.
// Initialize the vasGO API client
const vasgo = require('vasgo-api')('your_api_key');
// Create a payment
async function createPayment() {
try {
const payment = await vasgo.payments.create({
amount: 1000, // Amount in cents
currency: 'USD',
description: 'Order #12345',
customer: {
email: 'customer@example.com',
name: 'John Doe'
},
payment_method_types: ['card', 'mobile_money', 'bank_transfer'],
success_url: 'https://yourwebsite.com/success',
cancel_url: 'https://yourwebsite.com/cancel'
});
console.log('Payment created:', payment.id);
return payment;
} catch (error) {
console.error('Error creating payment:', error);
}
}
// Process the payment
createPayment().then(payment => {
// Redirect to the payment page or use the payment token
window.location.href = payment.checkout_url;
});
# Initialize the vasGO API client
import vasgo
vasgo.api_key = "your_api_key"
# Create a payment
def create_payment():
try:
payment = vasgo.Payment.create(
amount=1000, # Amount in cents
currency="USD",
description="Order #12345",
customer={
"email": "customer@example.com",
"name": "John Doe"
},
payment_method_types=["card", "mobile_money", "bank_transfer"],
success_url="https://yourwebsite.com/success",
cancel_url="https://yourwebsite.com/cancel"
)
print(f"Payment created: {payment.id}")
return payment
except Exception as e:
print(f"Error creating payment: {e}")
# Process the payment
payment = create_payment()
if payment:
# Redirect to the payment page or use the payment token
print(f"Redirect user to: {payment.checkout_url}")
// Initialize the vasGO API client
require_once('vendor/autoload.php');
\VasGO\API::setApiKey('your_api_key');
// Create a payment
function createPayment() {
try {
$payment = \VasGO\Payment::create([
'amount' => 1000, // Amount in cents
'currency' => 'USD',
'description' => 'Order #12345',
'customer' => [
'email' => 'customer@example.com',
'name' => 'John Doe'
],
'payment_method_types' => ['card', 'mobile_money', 'bank_transfer'],
'success_url' => 'https://yourwebsite.com/success',
'cancel_url' => 'https://yourwebsite.com/cancel'
]);
echo "Payment created: " . $payment->id;
return $payment;
} catch (\Exception $e) {
echo "Error creating payment: " . $e->getMessage();
}
}
// Process the payment
$payment = createPayment();
if ($payment) {
// Redirect to the payment page or use the payment token
header("Location: " . $payment->checkout_url);
exit();
}
// Initialize the vasGO API client
import com.vasgo.api.VasGO;
import com.vasgo.api.model.Payment;
import com.vasgo.api.exception.VasGOException;
import java.util.Arrays;
import java.util.HashMap;
import java.util.Map;
public class PaymentExample {
public static void main(String[] args) {
VasGO.apiKey = "your_api_key";
try {
// Create customer details
Map customer = new HashMap<>();
customer.put("email", "customer@example.com");
customer.put("name", "John Doe");
// Create a payment
Map params = new HashMap<>();
params.put("amount", 1000); // Amount in cents
params.put("currency", "USD");
params.put("description", "Order #12345");
params.put("customer", customer);
params.put("payment_method_types", Arrays.asList("card", "mobile_money", "bank_transfer"));
params.put("success_url", "https://yourwebsite.com/success");
params.put("cancel_url", "https://yourwebsite.com/cancel");
Payment payment = Payment.create(params);
System.out.println("Payment created: " + payment.getId());
System.out.println("Redirect user to: " + payment.getCheckoutUrl());
} catch (VasGOException e) {
System.err.println("Error creating payment: " + e.getMessage());
}
}
}
A simple, straightforward process to integrate payments into your application.
Create a vasGO account and obtain your API keys from the developer dashboard.
Install our SDK for your preferred programming language using package managers like npm, pip, or composer.
Add a few lines of code to your application to create and process payments using our API.
Test your integration in our sandbox environment, then switch to production when you're ready to go live.
Discover how vasGO API can transform payment experiences across different business types.
Add integrated payment solutions to mobile apps without the need to develop from scratch. Our SDK provides pre-built UI components and secure payment flows that can be implemented with just a few lines of code.
// Swift example for iOS apps
import VasGoSDK
// Initialize the SDK
VasGo.initialize(apiKey: "YOUR_API_KEY")
// Show payment sheet
let paymentSheet = VasGo.PaymentSheet(
amount: 2500,
currency: "USD",
merchantName: "Your App Name"
)
paymentSheet.present(from: self) { result in
switch result {
case .completed:
// Payment successful
case .failed(let error):
// Handle error
case .canceled:
// User canceled
}
}
Enable secure online transactions with ease. Our API integrates seamlessly with popular e-commerce platforms and shopping carts, providing a smooth checkout experience for your customers.
// PHP example for e-commerce sites
require_once('vendor/autoload.php');
// Initialize the client
$vasgo = new \VasGo\Client('YOUR_API_KEY');
// Create a checkout session
$session = $vasgo->checkoutSessions->create([
'success_url' => 'https://yourstore.com/success',
'cancel_url' => 'https://yourstore.com/cancel',
'line_items' => [
[
'name' => 'Premium Headphones',
'amount' => 9999,
'currency' => 'USD',
'quantity' => 1
]
],
'payment_method_types' => ['card', 'wallet']
]);
// Redirect to checkout
header("Location: " . $session->checkout_url);
Build customized payment gateways that fit your unique business needs. Our flexible API allows you to create innovative financial products and services with robust payment capabilities.
// Node.js example for FinTech platforms
const { VasGo } = require('vasgo-node');
const express = require('express');
const app = express();
// Initialize the client
const vasgo = new VasGo('YOUR_API_KEY');
// Create a payment link
app.post('/create-payment-link', async (req, res) => {
try {
const link = await vasgo.paymentLinks.create({
amount: req.body.amount,
currency: req.body.currency,
description: req.body.description,
expires_at: Math.floor(Date.now() / 1000) + 3600, // 1 hour
metadata: {
customer_id: req.body.customer_id
}
});
res.json({ url: link.url });
} catch (error) {
res.status(400).json({ error: error.message });
}
});
Simple, predictable pricing with no hidden fees.
2.9% + $0.30 per transaction
2.5% + $0.25 per transaction
Volume-based pricing
Find answers to common questions about vasGO API.
Join thousands of developers who have transformed their payment experience with vasGO API's powerful solutions.