PawaPay Java SDK

Local Integration & Testing Environment (but make it ✨silly🧠)

🐸 Server Status: Online (and slightly dizzy)
🤹‍♂️ 🦄 🔮

๐Ÿ”„ Java Refund Simulator

SANDBOX MODE ON
runRefund.java โ€” weird-mode
import com.katorymnd.pawapay.sdk.api.ApiClient;
import com.katorymnd.pawapay.sdk.config.Config;

// 1. Build Config with your Sandbox Token
Config config = new Config.Builder()
        .apiKey("")
        .environment("sandbox")
        .build();

// 2. Initialize Native Core Client
String apiVersion = ;
ApiClient client = new ApiClient(config, "KATORYMND_PAWAPAY_SDK_LICENSE_KEY", true, apiVersion);

// 3. Set Refund Parameters
String refundId = Helpers.generateUniqueId();
String targetDepositId = "";
String amountToRefund = "";
String currency = "";

// 4. Add Metadata (Optional)
List<Object> metaData = new ArrayList<>();
metaData.add(createMeta("reason", "Customer request"));
metaData.add(createMeta("adminUser", "Admin-01"));

// 5. Execute Surgical Refund
Map<String, Object> response = client.initiateRefundV2(
        refundId, targetDepositId, amountToRefund, currency, metaData
).join();

System.out.println("Result: " + response);
JAVA CONSOLE // OUT
Waiting for JVM to compile thoughts...

๐Ÿ’ก What this does:

  • Refunds a previous deposit transaction using its ID
  • Supports both V1 and V2 API versions
  • Automatically checks refund status after 2 seconds
  • Includes optional metadata for tracking (reason, admin user)
  • Returns detailed JSON response in the terminal