import { OnRamp } from '@olympay/sdk';
const onRamp = new OnRamp({
apiKey: 'your-api-key'
});
// Create purchase request
const purchase = await onRamp.createPurchase({
amount: '100.00',
currency: 'USD',
cryptoCurrency: 'OLYM',
paymentMethod: 'credit-card'
});
// Process payment
const result = await purchase.process();import { OffRamp } from '@olympay/sdk';
const offRamp = new OffRamp({
apiKey: 'your-api-key'
});
// Create sell request
const sell = await offRamp.createSell({
amount: '100.00',
cryptoCurrency: 'OLYM',
fiatCurrency: 'USD',
bankAccount: 'your-bank-account'
});
// Process withdrawal
const result = await sell.process();POST /ramp/on-ramp/create{
"amount": "100.00",
"currency": "USD",
"cryptoCurrency": "OLYM",
"paymentMethod": "credit-card",
"walletAddress": "0x..."
}POST /ramp/off-ramp/create{
"amount": "100.00",
"cryptoCurrency": "OLYM",
"fiatCurrency": "USD",
"bankAccount": {
"accountNumber": "123456789",
"routingNumber": "987654321",
"accountHolder": "John Doe"
}
}import { OnRamp } from '@olympay/sdk';
const onRamp = new OnRamp({
apiKey: 'your-api-key'
});
// Tạo yêu cầu mua
const purchase = await onRamp.createPurchase({
amount: '100.00',
currency: 'USD',
cryptoCurrency: 'OLYM',
paymentMethod: 'credit-card'
});
// Xử lý thanh toán
const result = await purchase.process();import { OffRamp } from '@olympay/sdk';
const offRamp = new OffRamp({
apiKey: 'your-api-key'
});
// Tạo yêu cầu bán
const sell = await offRamp.createSell({
amount: '100.00',
cryptoCurrency: 'OLYM',
fiatCurrency: 'USD',
bankAccount: 'your-bank-account'
});
// Xử lý rút tiền
const result = await sell.process();POST /ramp/on-ramp/create{
"amount": "100.00",
"currency": "USD",
"cryptoCurrency": "OLYM",
"paymentMethod": "credit-card",
"walletAddress": "0x..."
}POST /ramp/off-ramp/create{
"amount": "100.00",
"cryptoCurrency": "OLYM",
"fiatCurrency": "USD",
"bankAccount": {
"accountNumber": "123456789",
"routingNumber": "987654321",
"accountHolder": "John Doe"
}
}