Skip to main content

Pegasus

Overview

Pegasus is a comprehensive payment solution that enables businesses to accept payments across Latin America and Africa. It provides seamless integration for processing various payment methods including cash, cards, online banking, and e-wallets with extensive regional support.

Pegasus Logo

Features

  • Extensive coverage across Latin America and Africa
  • Multiple payment methods (Cash, Cards, Online Banking, e-Wallets)
  • Real-time payment processing
  • Instant payment notifications
  • Country-specific payment solutions
  • Secure transaction handling
  • Local currency support

Integration Requirements

  • Banksy API Key
  • Valid callback URLs for success and failure scenarios
  • Customer email for transaction notifications
  • Website URL validation

Supported Regions and Payment Methods

Latin America
  • Argentina - Rapipago, Pago Fácil, Cards, Online Banking
  • Brazil - Boleto, PIX, Online Banking
  • Chile - Servipag, Cards, Online Banking
  • Colombia - Efecty, PSE, Cards
  • Costa Rica - BN Services, Cards
  • Ecuador - Facilito, Cards
  • Mexico - OXXO, SPEI, Cards
  • Peru - PagoEfectivo, Yape, Online Banking
Africa
  • Ghana - Mobile Money, Bank Transfer
  • Nigeria - Bank Transfer, USSD
  • South Africa - Instant EFT, Bank Transfer
  • Tanzania - Mobile Money, Bank Transfer
  • Uganda - Mobile Money
  • Zambia - Mobile Money, Bank Transfer

Implementation

Payment Payload Structure

const payload = {
amount: number, // Payment amount
currency: string, // Currency code (USD/GBP/EUR)
currencyType: "pegasus", // Fixed value for fiat transactions
isKycOptional: boolean, // Whether KYC is required
customerEmail: string, // Customer's email address
successCallback: string, // URL for successful payments
failureCallback: string, // URL for failed payments
};

Example Implementation

import { Banksy } from "banksy-sdk";

// Initialize the Banksy SDK with your API key
const banksy = new Banksy("your-api-key");

async function createPegasusPayment() {
try {
const paymentPayload = {
amount: 100,
currency: "BRL",
currencyType: "pegasus",
isKycOptional: true,
customerEmail: "customer@example.com",
successCallback: "https://your-domain.com/success",
failureCallback: "https://your-domain.com/failure",
};

const payment = await banksy.createPayment(paymentPayload);
console.log("Payment Created:", payment);

// Redirect to payment page
window.location.href = payment.paymentLink;
} catch (error) {
console.error("Payment creation failed:", error);
}
}

Testing

  1. Use test API keys for development
  2. Test with different country and payment method combinations
  3. Verify callback handling for both success and failure scenarios
  4. Test specific regional payment methods (e.g., PIX for Brazil)

API Testing with cURL

curl --location 'https://sandbox-api.banksy.id/sdk/payment/create' \
--header 'Content-Type: application/json' \
--header 'X-AUTH: ck_test_************738139' \
--data-raw '{
"amount": 100,
"currency": "BRL",
"currencyType": "pegasus",
"isKycOptional": true,
"customerEmail": "customer@example.com",
"successCallback": "https://your-domain.com/success",
"failureCallback": "https://your-domain.com/failure"
}'

Best Practices

  1. Regional Considerations

    • Implement country-specific payment methods
    • Handle local currency formatting
    • Consider timezone differences for transaction processing
  2. Payment Method Selection

    • Offer payment methods relevant to the customer's country
    • Provide clear instructions for each payment method
    • Support popular local payment options
  3. Error Handling

    • Implement comprehensive error handling
    • Provide localized error messages
    • Log all transaction attempts
  4. Security

    • Use HTTPS for all API calls
    • Implement proper authentication
    • Follow regional compliance requirements
    • Ensure data privacy standards

Support

For technical support or integration assistance, please contact the Banksy support team through the official channels.