Getting Started
This section outlines the steps to get started with RedDragonPay, including account setup, obtaining API credentials, and accessing the sandbox environment for integration and testing.
Step 1: Merchant Registration
- Register for a merchant account with RedDragonPay.
- For registration assistance, contact support@reddragonpay.com.
Access to Sandbox Environment
- A dedicated testing environment is available for integration and testing purposes.
- Request sandbox credentials by contacting your account manager or support@reddragonpay.com.
API Credentials
- Obtain the following credentials for API authentication:
- APP_ID (Your unique Merchant ID)
- Secret Key (Used for generating hashes)
- Store your credentials securely. Never share your Secret Key.
Use the sandbox base URL for all testing:
https://sandbox.reddragonpay.com
Step 2: Authentication and Security
To ensure secure communication, RedDragonPay uses a SHA-512 hash mechanism for authentication.
Hash Generation
- A hash must be generated for every transaction request by concatenating all parameters in a predefined sequence and appending your Secret Key.
- Example:
Example
AMOUNT=1000~APP_ID=1234567890~ORDER_ID=TEST001~TXNTYPE=SALE~SECRET_KEY
- Generate the SHA-512 hash of this string and include it in your API request as the HASH parameter.
Example Code (Python)
import hashlib
data = "AMOUNT=1000~APP_ID=1234567890~ORDER_ID=TEST001~TXNTYPE=SALE~SECRET_KEY"
hash = hashlib.sha512(data.encode('utf-8')).hexdigest()
print("Generated Hash:", hash)
Include the Hash in Requests:
- Add the generated hash as the HASH parameter in your API requests.
Step 3: Supported Payment Methods
Payment Methods:
- Credit/Debit Cards (Visa, Mastercard).
- Wallets.
- Open Banking.
Currencies:
- Multi-currency support enables transactions in:
- AED (Dirham)
- USD (US Dollar)
Step 4: Setting Up Webhooks
What are Webhooks?
- Webhooks notify you of real-time updates, such as transaction status changes.
How to Configure
- Provide your webhook URL during onboarding or through the Merchant Dashboard.
- Ensure your webhook URL is accessible and supports POST requests.
Example Webhook Payload
Sample
{
"ORDER_ID": "TEST001",
"TXN_ID": "1001241218121745",
"STATUS": "Captured",
"RESPONSE_CODE": "000"
}
Step 5: Testing Your Integration
Test Cards
Use the following test cards to simulate transactions in the sandbox
Card Type | Card Number | CVV | Expiry Date | Response |
---|---|---|---|---|
Visa | 4111110000000211 | 123 | 12/2030 | Success |
Mastercard | 5100000000000511 | 456 | 11/2029 | Success |
Invalid Card | 4000000000000000 | 111 | 01/2025 | Failure |
Test Scenarios
- Simulate different transaction scenarios (success, failure, timeout).
- Validate webhook responses for real-time updates.
Step 6: Moving to Production
Request Production Access
- Contact support@reddragonpay.com once testing is complete.
Production Base URL
Use the following base URL for live transactions
https://secure.reddragonpay.com
Step 7: Final Checklist
Final Checklist
- Validate API requests and responses in sandbox.
- Test webhook notifications.
- Review security compliance (PCI DSS).
Next Steps
Proceed to the Integration Guide section to explore detailed guides for integrating RedDragonPay using PG Hosted, Merchant Hosted, Server-to-Server, and Iframe methods.