Rasedi Java SDK #
The official Java SDK for the Rasedi Payment Gateway. Seamlessly integrate secure payments into your Java applications with our robust and easy-to-use client.
Installation #
Gradle (Groovy) #
dependencies {
implementation 'com.rasedi.nexus:rasedi-java-sdk:1.0.2'
}
Maven #
<dependency>
<groupId>com.rasedi.nexus</groupId>
<artifactId>rasedi-java-sdk</artifactId>
<version>1.0.2</version>
</dependency>
Supported Payment Gateways #
You can specify one or more gateways for each payment request using the Gateway enum:
| Gateway Code | Description | Type |
|---|---|---|
FIB | First Iraqi Bank | Mobile Wallet |
ZAIN | Zain Cash | Mobile Wallet |
ASIA_PAY | AsiaPay | Mobile Wallet |
FAST_PAY | FastPay | Mobile Wallet |
NASS_WALLET | NassWallet | Mobile Wallet |
CREDIT_CARD | Visa / MasterCard | Credit Card |
Usage Guide #
1. Initialize Client #
import com.rasedi.sdk.RasediClient;
// Use your Private Key (Ed25519) and Secret Key
String privateKey = "-----BEGIN PRIVATE KEY-----\n...";
String secretKey = "test_...";
RasediClient client = new RasediClient(privateKey, secretKey);
2. Create a Payment #
import com.rasedi.sdk.models.CreatePaymentPayload;
import com.rasedi.sdk.enums.Gateway;
import java.util.Arrays;
CreatePaymentPayload payload = new CreatePaymentPayload(
"15000", // Amount
"Order_8821", // Title
"Premium Subscription", // Description
Arrays.asList(Gateway.ZAIN, Gateway.CREDIT_CARD), // Allowed Gateways
"https://yoursite.com/callback", // Redirect after payment
"https://yoursite.com/webhook", // Server-to-server notification
true, // collectFeeFromCustomer
true, // collectCustomerEmail
false // collectCustomerPhoneNumber
);
var response = client.createPayment(payload);
if (response.statusCode == 200) {
String checkoutUrl = response.body.redirectUrl;
String reference = response.body.referenceCode;
System.out.println("Redirect customer to: " + checkoutUrl);
}
3. Check Payment Status #
String reference = "Order_8821";
var statusResponse = client.getPaymentByReference(reference);
if (statusResponse.statusCode == 200) {
System.out.println("Current Status: " + statusResponse.body.status);
// Check specific status
if (statusResponse.body.status == PaymentStatus.PAID) {
System.out.println("Success! Order fulfilled.");
}
}
Understanding Payment Status #
| Status | Description |
|---|---|
PENDING | The customer has not completed the payment yet. |
PAID | Payment successfully completed and funds captured. |
FAILED | The payment was declined or failed during processing. |
CANCELED | The payment request was manually canceled. |
TIMED_OUT | The payment session expired before completion. |
SDK Features #
- Secure Ed25519 Signing: Validates your identity for every request.
- Full Iraqi Gateway Support: ZAIN, ASIA, FIB, and more.
- Modern Architecture: Built for Java 17+ and high-concurrency.
License #
This project is licensed under the Apache License 2.0.
Support #
Email: support@rasedi.com | Website: rasedi.com


Leave a Reply