Phoenix
Overview
Phoenix is a specialized payment provider that focuses exclusively on credit card payments in EUR currency. It offers a streamlined payment processing solution for European businesses and customers, with robust security features and seamless integration options.

Features
- Exclusive support for EUR currency
- Credit card payment processing
- Enhanced security protocols for European transactions
- Detailed transaction reporting
- Webhook notifications
- GDPR compliant data handling
Integration Requirements
- Banksy API Key
- Valid callback URLs for success and failure scenarios
- Customer email for transaction notifications
Supported Currencies
Currencies
- EUR (Euro) only
Accepted Payment Methods
- Credit Cards
Supported credit card networks:
- Visa
- Mastercard
- American Express
Implementation
Payment Payload Structure
const payload = {
amount: number, // Payment amount in EUR
currency: "EUR", // Fixed as EUR for Phoenix
currencyType: "phoenix", // Fixed value for Phoenix 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 createPhoenixPayment() {
try {
const paymentPayload = {
amount: 100, // Amount in EUR
currency: "EUR",
currencyType: "phoenix",
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);
}
}
Example with KYC Required
import { Banksy } from "banksy-sdk";
const banksy = new Banksy("your-api-key");
async function createPhoenixPaymentWithKYC() {
try {
const paymentPayload = {
amount: 1000, // Amount in EUR
currency: "EUR",
currencyType: "phoenix",
isKycOptional: false, // KYC will be required
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 with KYC flow
window.location.href = payment.paymentLink;
} catch (error) {
console.error("Payment creation failed:", error);
}
}
Testing
- Use test API keys for development
- Test with different payment amounts
- Verify callback handling for both success and failure scenarios
- Test KYC flows when
isKycOptional
is set to false
API Testing with cURL
You can test the payment creation endpoint using the following cURL command:
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": "EUR",
"currencyType": "phoenix",
"isKycOptional": true,
"customerEmail": "customer@example.com",
"successCallback": "http://domain.com/success",
"failureCallback": "http://domain.com/failure"
}'
Test Cards
For testing payments in the development environment, you can use the following test cards:
# Successful Payment
Card Number: 4242 4242 4242 4242
CVV: Any 3 digits
Expiry: Any future date
# Failed Payment
Card Number: 4000 0000 0000 0002
CVV: Any 3 digits
Expiry: Any future date
Security Considerations
- Always use HTTPS for API calls
- Validate all input parameters
- Store sensitive data securely
- Implement proper authentication for callback endpoints
- Monitor transactions for suspicious activity
- Comply with PCI DSS requirements for handling card data
Best Practices
-
Amount Validation
- Ensure the amount is a positive number
- Validate against minimum and maximum transaction limits
- Format EUR amounts with 2 decimal places
-
Payment Verification
- Implement proper transaction verification
- Store transaction IDs for future reference
- Handle failed payment scenarios appropriately
-
Callback URLs
- Use HTTPS for callback URLs
- Implement proper validation in callback endpoints
- Handle both success and failure scenarios gracefully
-
Error Handling
- Implement comprehensive error handling
- Log all payment attempts and responses
- Provide clear error messages to users
Support
For technical support or integration assistance, please contact the Banksy support team through the official channels.