This server provides an interface to integrate with the SATIM payment gateway in Algeria for processing CIB/Edhahabia card payments. With this server, you can:
- Configure merchant credentials for SATIM gateway access
- Register payment orders with details like amount, return URLs, and unique identifiers
- Get payment form URLs to redirect customers to the SATIM payment page
- Confirm order status after customer payment attempts
- Process full or partial refunds for completed transactions
- Validate and interpret payment responses to determine final status
- Handle error and confirmation codes effectively
Enables direct access to Razorpay account data through a standardized interface, as mentioned in the package description.
Satim Payment Gateway Integration
A Model Context Protocol (MCP) server for integrating with the SATIM payment gateway system in Algeria. The server provides a structured interface for processing CIB/Edhahabia card payments through the SATIM-ePAY platform. This package enables AI assistants like Cursor, Claude, and Copilot to directly access your Razorpay account data through a standardized interface.
More details : https://code2tutorial.com/tutorial/6b3a062c-3a34-4716-830e-8793a5378bcc/index.md
Quick Start
Table of Contents
- Installation
- Configuration
- Payment Flow
- Tools
- Testing
- Integration Requirements
- Error Handling
- Examples
- Security Considerations
Installation
Prerequisites
- Node.js 18+
- npm or yarn
Step-by-Step Setup
- Clone and enter the project directory:
- Initialize the project (if package.json doesn't exist):
- Configure package.json for ES modules:
- Install dependencies:
Running the Server
Option 1: Direct execution with tsx (Recommended for development)
Option 2: Compile and run
Option 3: Development mode with auto-reload
Configuration
MCP Client Configuration
To use this server with an MCP client (like Claude Desktop), add to your configuration:
Initial Setup
Before using any payment tools, configure your SATIM credentials:
Environment Variables
For production, consider using environment variables:
Payment Flow
The complete payment process follows these steps:
1. Order Registration
2. Customer Payment
- Customer fills CIB/Edhahabia card details on SATIM form
- Customer is redirected back to your returnUrl/failUrl
3. Order Confirmation
4. Display Results
Based on validation results, display appropriate messages to customers.
Tools
configure_credentials
Configure SATIM gateway credentials.
Parameters:
userName
(string, required): Merchant loginpassword
(string, required): Merchant password
register_order
Register a new payment order.
Parameters:
orderNumber
(string, required): Unique order identifieramountInDA
(number, required): Amount in Algerian Dinars (min: 50 DA)returnUrl
(string, required): Success redirect URLfailUrl
(string, optional): Failure redirect URLforce_terminal_id
(string, required): Bank-assigned terminal IDudf1
(string, required): SATIM-specific parametercurrency
(string, optional): Currency code (default: "012" for DZD)language
(string, optional): Interface language ("AR", "FR", "EN")description
(string, optional): Order descriptionudf2-udf5
(string, optional): Additional parameters
Response:
confirm_order
Confirm order status after payment attempt.
Parameters:
orderId
(string, required): Order ID from registrationlanguage
(string, optional): Response language
Response:
refund_order
Process a refund for a completed order.
Parameters:
orderId
(string, required): Order ID to refundamountInDA
(number, required): Refund amount in DAcurrency
(string, optional): Currency codelanguage
(string, optional): Response language
Response:
validate_payment_response
Validate and interpret payment response.
Parameters:
response
(object, required): Order confirmation response
Response:
Testing
Method 1: Quick Test
Create a simple test file test-simple.js
:
Run with:
Method 2: Full Integration Test
Create test-client.ts
following the example in the documentation, then run:
Method 3: HTTP Wrapper for API Testing
Use the HTTP wrapper example provided in the documentation to create REST API endpoints for easier testing with tools like Postman or curl.
Troubleshooting
Common Issues and Solutions
- "Cannot use import statement outside a module"
- "Module not found" errors
- TypeScript compilation errors
- Server connection issues
Debug Mode
Enable debug logging:
Integration Requirements
SSL Security
- Mandatory: Your website must have SSL certificate
- All API calls must use HTTPS
User Interface Requirements
Payment Page
- Display final amount prominently (bold, larger font)
- Include CAPTCHA to prevent automated submissions
- Show CIB logo on payment button
- Display terms and conditions with customer acknowledgment
- Redirect to SATIM page in independent browser window
Success Page Display
For accepted payments, show:
- Transaction message (
respCode_desc
) - Transaction ID (
orderId
) - Order number (
orderNumber
) - Authorization code (
approvalCode
) - Transaction date/time
- Payment amount with currency
- Payment method (CIB/Edhahabia)
- SATIM contact: 3020 3020
Success Page Actions
- Print receipt option
- Download PDF receipt
- Email PDF receipt to third party
Rejection Page
- Display rejection message in three languages
- Show SATIM contact information
Amount Handling
Amounts must be multiplied by 100 when sent to SATIM:
- 50.00 DA → send 5000
- 806.50 DA → send 80650
The MCP server handles this conversion automatically.
Error Handling
Order Registration Errors
- Invalid credentials
- Duplicate order number
- Invalid amount (< 50 DA)
- Missing required parameters
Confirmation Errors
Error Code | Description |
---|---|
0 | Successfully confirmed |
1 | Empty order ID |
2 | Already confirmed |
3 | Access denied |
5 | Access denied |
6 | Unknown order |
7 | System error |
Refund Errors
Error Code | Description |
---|---|
0 | No system error |
5 | Password change required / Empty order ID |
6 | Wrong order number |
7 | Payment state error / Amount error / System error |
Examples
Complete Payment Flow
Processing Refunds
Security Considerations
Credentials Management
- Store credentials securely (environment variables, key vault)
- Use HTTPS for all communications
- Implement proper authentication for your API endpoints
Order Number Security
- Use unique, non-sequential order numbers
- Include timestamp or random elements
- Validate order ownership before confirmation
Data Validation
- Always validate amounts on server side
- Verify order status before processing confirmations
- Implement idempotency for refund operations
Logging and Monitoring
- Log all payment transactions
- Monitor for suspicious activities
- Implement rate limiting for API calls
Production Deployment
Environment Configuration
Health Checks
Implement health check endpoints to monitor gateway connectivity:
Support and Contact
- SATIM Support: 3020 3020 (toll-free)
- Technical Issues: Contact your integration specialist
- Documentation: Refer to official SATIM integration guides
This MCP server implementation follows SATIM's official API specifications and includes all required integration points for Algerian e-commerce platforms.
You must be authenticated.
hybrid server
The server is able to function both locally and remotely, depending on the configuration or use case.
A Model Context Protocol (MCP) server for integrating with the SATIM payment gateway system in Algeria, enabling AI assistants to process CIB/Edhahabia card payments through the SATIM-ePAY platform.
- Quick Start
- Table of Contents
- Installation
- Configuration
- Payment Flow
- Tools
- Testing
- Troubleshooting
- Integration Requirements
- Error Handling
- Examples
- Security Considerations
- Production Deployment
- Support and Contact
Related Resources
Related MCP Servers
- -securityAlicense-qualityA Model Context Protocol server that provides comprehensive integration with PayPal's APIs, enabling seamless interaction with payment processing, invoicing, subscription management, and business operations through a standardized interface.Last updated -TypeScriptApache 2.0
- -securityFlicense-qualityA Model Context Protocol server that enables Claude AI to interact with Paybyrd's payment processing API, allowing for creating payment links, processing refunds, and retrieving order information.Last updated -5TypeScript
- -securityAlicense-qualityA Model Context Protocol (MCP) server that allows AI agents like Claude to interact with the Aligo SMS API to send text messages and retrieve related information.Last updated -JavaScriptMIT License
- -securityFlicense-qualityA Model Context Protocol server that integrates AI applications with Safaricom's Daraja API, enabling AI-driven financial transactions and automation through M-Pesa services.Last updated -2Python