Skip to content

Latest commit

 

History

History
113 lines (87 loc) · 2.82 KB

File metadata and controls

113 lines (87 loc) · 2.82 KB

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.

Maven Central License


🛠 Installation

Gradle (Groovy)

dependencies {
    implementation 'com.rasedi.nexus:rasedi-java-sdk:1.0.4'
}

Maven

<dependency>
    <groupId>com.rasedi.nexus</groupId>
    <artifactId>rasedi-java-sdk</artifactId>
    <version>1.0.4</version>
</dependency>

💳 Supported Payment Gateways

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

Java

RasediClient client = new RasediClient(PRIVATE_KEY, SECRET_KEY);

Kotlin

val client = RasediClient(privateKey, secretKey)

2. Create a Payment

Java

CreatePaymentPayload payload = new CreatePaymentPayload(
    "15000", "Order_8821", "Description",
    Arrays.asList(Gateway.ZAIN, Gateway.CREDIT_CARD),
    "https://callback.url", "https://webhook.url",
    true, true, false
);
var response = client.createPayment(payload);

Kotlin

val payload = CreatePaymentPayload(
    "15000", "Order_8821", "Description",
    listOf(Gateway.ZAIN, Gateway.CREDIT_CARD),
    "https://callback.url", "https://webhook.url",
    true, true, false
)
val response = client.createPayment(payload)

3. Check Payment Status

Java

var resp = client.getPaymentByReference("Order_8821");
if (resp.body.status == PaymentStatus.PAID) { /* Success */ }

Kotlin

val resp = client.getPaymentByReference("Order_8821")
if (resp.body.status == PaymentStatus.PAID) { /* Success */ }

🚦 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.

📄 License

This project is licensed under the Apache License 2.0.

🤝 Support

Email: support@rasedi.com | Website: rasedi.com