Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
79 commits
Select commit Hold shift + click to select a range
79d0163
Update state validation from 2 to 5 characters
May 18, 2023
18bf428
Merged PR 47951: #589224 Update state validation from 2 to 5 characters
May 23, 2023
de770cd
Update version
May 29, 2023
493d77e
Merged PR 48392: #589224 Update SDK version in pom and Readme.md
May 31, 2023
cdfeb74
pbi/be-599558 -add ExternalTokenProvider
Jun 16, 2023
96295b2
pbi/be-599558 - fix getExternalToken getter in Card
Jun 21, 2023
d335d43
Merged PR 50486: pbi/be-599558 -add ExternalTokenProvider
Jun 21, 2023
8eecd54
Merged PR 51974: pbi/be-599558-fix_response
Jul 10, 2023
cbdfa2c
Update pom to version 1.7.2
Jul 19, 2023
784b0f4
Merge remote-tracking branch 'origin/staging' into staging
Jul 19, 2023
06f7e45
Merged PR 53005: #599558 Update pom version
Jul 19, 2023
7976d25
Merged PR 52783: #599558 JavaSDK - New Release (Changes verified by QA)
Jul 20, 2023
f73115a
Merged PR 55431: #604602 Update account capture request with URL details
Aug 21, 2023
0c2e81d
Update account capture with URL details
Sep 1, 2023
3325ff5
Expose getMerchantPaymentMethods method
Sep 1, 2023
b1a267f
Add additional fields for GetMerchantPaymentMethodsResponse
Sep 1, 2023
ab3a57f
Merged PR 56715: #621366 Chase OAth - IBT, Secure Bank Transfer and V…
Sep 1, 2023
a33b440
Update Readme.md
Sep 14, 2023
7bfbc1a
Merged PR 57651: Update Readme.md
Sep 14, 2023
b65f5f1
Merge branch 'staging' into fix-conflict
Sep 14, 2023
f7f44e8
Merged PR 57662: fix conflict
Sep 14, 2023
fe1d863
Merged PR 57653: #619038 Java SDK - version 1.7.3
Sep 14, 2023
8d6fdba
Merged PR 58089: #582426- Columbia Fields - AddendumsLocalPayment ext…
Sep 21, 2023
091f8b7
Merged PR 57546: 625794 - Add addressLines and shipAddressLines in Us…
Sep 21, 2023
a2e0b93
Merged PR 58019: Add taxId - MC France
Sep 28, 2023
899c744
Merged PR 58296: #624390 - merchantAdviceCode added
Sep 28, 2023
578a662
Merged PR 58542: pbi/be-629557
Sep 28, 2023
3e1244c
634879 - Add CurrencyConversion support for payout request
Sep 28, 2023
64ba2d6
Merged PR 58827: 634879 - Add CurrencyConversion support for payout r…
Oct 2, 2023
96b6dc9
Merged PR 60781: new Release 1.7.4
Oct 24, 2023
5f61227
pbi/be-638608- release version
Oct 24, 2023
e622f2b
Merged PR 60789: pbi/be-638608- release version
Oct 24, 2023
0c91ded
pbi/be-638608-fix_pom_dependency
Oct 24, 2023
4d70f01
Merged PR 60790: pbi/be-638608-fix_pom_dependency
Oct 24, 2023
8ede903
Merged PR 60834: add SNAPSHOT_version
Oct 24, 2023
dfe34b7
Added build-sdk.yaml
Nov 21, 2023
f9453a8
Update build-sdk.yaml for Azure Pipelines
Nov 21, 2023
cb3308a
Merged PR 65456: Release 1.7.5
Dec 6, 2023
362ff28
pbi/be-658717 - add identification and identificationType
Dec 13, 2023
8b1f8d1
Merged PR 68919: pbi/be-658717 - add identification and identificatio…
Jan 17, 2024
9916f56
change_release_version
Jan 17, 2024
5e4dba9
Merged PR 68922: change_release_version 1.7.6
Jan 17, 2024
bdcabac
668161 - the new cardAuthMethod param is added to initPayment flow
Feb 5, 2024
b0d3e7f
Merged PR 70825: 668161 - the new cardAuthMethod param is added to in…
Feb 5, 2024
89b6890
Merged PR 71994: #673769 Update to version 1.7.7
Feb 14, 2024
1d9ba22
pbi/be-703957- Riverty - new integration support payment
Mar 13, 2024
95a6231
pbi/be-703957- Riverty - settle support shippingTrackingDetails
Mar 13, 2024
5cedc4c
Merged PR 74997: Riverty - new integration support- payment\settle
Mar 14, 2024
07103f5
Merged PR 75829: Riverty - new integration support- payment\settle
Mar 21, 2024
9f8357a
pbi/be-802753-riverty-vat - item tax fields
May 16, 2024
4815bb7
Merged PR 81107: pbi/be-802753-riverty-vat - item tax fields
May 16, 2024
d3b5f8a
Merged PR 76150: Use local jFrog repository
May 30, 2024
c37c71f
Merged PR 84378: pbi/be-782968-v.1.7.8---Release
Jun 18, 2024
a4276fa
Merged PR 83772: #808861 - adds getter & setter for paymentAccountRef…
Jun 20, 2024
045cb54
Merged PR 84443: #808855 - Adds unreferenced refund support
Jul 8, 2024
817915b
Merged PR 88783: pbi/be-836472-1.7.9-release
Jul 25, 2024
3f24cbf
pbi/be-836472-revert-sonatype-dependency
Jul 26, 2024
b2a6fb2
Merged PR 88988: pbi/be-836472-revert-sonatype-dependency
Jul 26, 2024
4f26c1b
Merged PR 92378: [856693] [JAVA SDK] UPOID error for refund transaction
Aug 28, 2024
4bda648
Update to version 1.7.10
Aug 28, 2024
31a26b5
Merged PR 92870: #861850 [JavaSDK] Update to version 1.7.10
Aug 28, 2024
ada5558
Merged PR 91126: Support sg_NotUseCVV in payment
yoannae Sep 11, 2024
c4c6977
Merged PR 94520: Support serviceDueDate in payment
yoannae Sep 18, 2024
35cb09c
Merged PR 99659: Change Safecharge to Nuvei reference
yoannae Nov 1, 2024
ef5ea77
Updated build-sdk.yaml
Jan 13, 2025
9c77b4e
Merged PR 122850: Merge 1.7.13 to 2.0.0
Apr 15, 2025
dc1dc23
Update POM
yoannae Apr 16, 2025
32e3a73
#1026373 - userTokenId lenght modified
May 19, 2025
a5112c1
#1139189 Add conversion affiliate CountryCode
yoannae Nov 20, 2025
dcbb25c
Merged PR 127799: #1026376 - userTokenId max length modified
Nov 27, 2025
947b312
Merged PR 123149: #1003530 remove unused file (brought with revert)
Nov 27, 2025
abf9663
#1151100 Add ancillary services field to airline addendum
yoannae Nov 28, 2025
0fa3de8
Update build-sdk.yaml for Azure Pipelines
Dec 4, 2025
e36f416
Merged PR 158250: #1155022 Change old nexus-staging plugin to maven-c…
Dec 4, 2025
9feb3c9
Merged PR 158310: #1155022 Add developers tag
Dec 4, 2025
27712f7
Merged PR 158460: #1155022 Add auto publish
Dec 5, 2025
bb46f9f
Merge remote-tracking branch 'origin/develop' into github-source
Dec 5, 2025
0c602f2
Update to version 2.0.1
Dec 5, 2025
7b5e6fa
Merge remote-tracking branch 'azureN/github-source' into sdk-2.0.1
Dec 5, 2025
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion LICENSE
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
MIT License

Copyright (c) 2017 Safecharge Bulgaria ltd
Copyright (c) 2024 Nuvei Corporation

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
Expand Down
62 changes: 32 additions & 30 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,23 +1,24 @@
# SafeCharge REST API SDK for Java.
# Nuvei REST API SDK for Java.

[![Maven Central](https://maven-badges.herokuapp.com/maven-central/com.safecharge/safecharge-sdk-java/badge.svg)](https://maven-badges.herokuapp.com/maven-central/com.safecharge/safecharge-sdk-java)
[![codecov](https://codecov.io/gh/SafeChargeInternational/safecharge-java/branch/development/graph/badge.svg)](https://codecov.io/gh/SafeChargeInternational/safecharge-java)
[![Maven Central](https://maven-badges.herokuapp.com/maven-central/com.nuvei/nuvei-sdk-java/badge.svg)](https://maven-badges.herokuapp.com/maven-central/com.nuvei/nuvei-sdk-java)
[![codecov](https://codecov.io/gh/Nuvei/nuvei-java/branch/development/graph/badge.svg)](https://codecov.io/gh/Nuvei/nuvei-java)

Nuvei’s REST API SDK for Java provides developer tools for accessing Nuvei's REST API. Nuvei’s REST API is a simple, easy to use, secure and stateless API, which enables online merchants and service providers to process consumer payments through Nuvei’s payment gateway. The API supports merchants of all levels of PCI certification, from their online and mobile merchant applications, and is compatible with a large variety of payment options, i.e. payment cards, alternative payment methods, etc. For Nuvei REST API documentation, please see: https://docs.nuvei.com/documentation/accept-payment/server-to-server/server-sdks/java-sdk/

SafeCharge’s REST API SDK for Java provides developer tools for accessing Safecharge's REST API. SafeCharge’s REST API is a simple, easy to use, secure and stateless API, which enables online merchants and service providers to process consumer payments through SafeCharge’s payment gateway. The API supports merchants of all levels of PCI certification, from their online and mobile merchant applications, and is compatible with a large variety of payment options, i.e. payment cards, alternative payment methods, etc. For SafeCharge REST API documentation, please see: https://www.safecharge.com/docs/api/

## Requirements

Java 1.7 or later
Java 1.8 or later.

### Maven

If your application is going to be deployed on a Java EE server add the following dependency:

```xml
<dependency>
<groupId>com.safecharge</groupId>
<artifactId>safecharge-sdk-java</artifactId>
<version>1.7.13</version>

<dependency>
<groupId>com.nuvei.com</groupId>
<artifactId>nuvei-sdk-java</artifactId>
<version>2.0.1</version>
</dependency>
```

Expand All @@ -26,12 +27,13 @@ If you are going to use the SDK in Java SE or a non Java EE server please add a
For example:

```xml

<dependencies>
...
<dependency>
<groupId>com.safecharge</groupId>
<artifactId>safecharge-sdk-java</artifactId>
<version>1.7.13</version>
<dependency>
<groupId>com.nuvei.com</groupId>
<artifactId>nuvei-sdk-java</artifactId>
<version>2.0.1</version>
</dependency>
<dependency>
<groupId>org.apache.bval</groupId>
Expand All @@ -43,34 +45,34 @@ For example:

## Running your first request

You only need to setup a HTTP Client and to provide the SafeCharge API host to the request executor and then you can start building requests and send them to the SafeCharge API.
You only need to setup a HTTP Client and to provide the Nuvei API host to the request executor and then you can start building requests and send them to the Nuvei API.

Check how simple it is trough this sample:

```java
import com.safecharge.biz.SafechargeRequestExecutor;
import com.safecharge.model.MerchantInfo;
import com.safecharge.request.GetSessionTokenRequest;
import com.safecharge.request.SafechargeRequest;
import com.safecharge.response.SafechargeResponse;
import com.safecharge.util.APIConstants;
import com.safecharge.util.Constants;
import com.nuvei.biz.NuveiRequestExecutor;
import com.nuvei.model.MerchantInfo;
import com.nuvei.request.GetSessionTokenRequest;
import com.nuvei.request.NuveiRequest;
import com.nuvei.response.NuveiResponse;
import com.nuvei.util.APIConstants;
import com.nuvei.util.Constants;

public class Sample {

public static void main(String[] args) {
SafechargeRequestExecutor requestExecutor = SafechargeRequestExecutor.getInstance();
NuveiRequestExecutor requestExecutor = NuveiRequestExecutor.getInstance();

MerchantInfo merchantInfo = new MerchantInfo("MERCHANT_KEY_PROVIDED_BY_SAFECHARGE", "MERCHANT_ID_PROVIDED_BY_SAFECHARGE",
"MERCHANT_SITE_ID_PROVIDED_BY_SAFECHARGE", APIConstants.INTEGRATION_HOST, Constants.HashAlgorithm.SHA256);
MerchantInfo merchantInfo = new MerchantInfo("MERCHANT_KEY_PROVIDED_BY_NUVEI", "MERCHANT_ID_PROVIDED_BY_NUVEI",
"MERCHANT_SITE_ID_PROVIDED_BY_NUVEI", APIConstants.INTEGRATION_HOST, Constants.HashAlgorithm.SHA256);

SafechargeBaseRequest safechargeRequest = GetSessionTokenRequest.builder()
.addMerchantInfo(merchantInfo)
.build();
NuveiRequest nuveiRequest = GetSessionTokenRequest.builder()
.addMerchantInfo(merchantInfo)
.build();

SafechargeResponse response = requestExecutor.executeRequest(safechargeRequest);
NuveiResponse response = requestExecutor.executeRequest(nuveiRequest);
System.out.println("Received sessionToken = " + response.getSessionToken());
}
}
```
More samples tests can be found [here](https://github.com/SafeChargeInternational/safecharge-java/tree/master/src/test/java/com/safecharge/test/workflow/).
More samples tests can be found [here](https://github.com/Nuvei/nuvei-server-java/tree/master/src/test/java/com/nuvei/test/workflow).
17 changes: 17 additions & 0 deletions build-sdk.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
trigger: none
resources:
repositories:
- repository: DevOpsTemplates
name: DigitalPayments/DevOps-Templates
type: git
ref: master
schedules:
- cron: "20 00 * * *"
displayName: "Daily Security analysis"
branches:
include:
- develop
always: false

extends:
template: pipelines/restapi1.0-java-sdk2.0.yaml@DevOpsTemplates
203 changes: 203 additions & 0 deletions pom-github.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,203 @@
<?xml version="1.0" encoding="UTF-8"?>
<project xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns="http://maven.apache.org/POM/4.0.0"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>

<groupId>com.nuvei</groupId>
<artifactId>nuvei-sdk-java</artifactId>
<version>2.0.1</version>

<name>Nuvei SDK for Java</name>
<description>Nuvei’s REST API SDK for Java provides developer tools for accessing Nuvei's REST API. Nuvei’s REST API is a simple,
easy to use, secure and stateless API, which enables online merchants and service providers to process consumer payments through Nuvei's
payment gateway. The API supports merchants of all levels of PCI certification, from their online and mobile merchant applications, and is
compatible with a large variety of payment options, i.e. payment cards, alternative payment methods, etc.
</description>
<url>https://github.com/Nuvei/nuvei-java</url>

<organization>
<name>Nuvei</name>
<url>https://www.nuvei.com</url>
</organization>

<licenses>
<license>
<name>MIT License</name>
<url>http://www.opensource.org/licenses/mit-license.php</url>
</license>
</licenses>

<profiles>
<profile>
<id>java8-doclint-disabled</id>
<activation>
<jdk>[1.8,)</jdk>
</activation>
<properties>
<javadoc.opts>none</javadoc.opts>
</properties>
</profile>
</profiles>

<build>
<resources>
<resource>
<directory>.</directory>
<includes>
<include>VERSION</include>
</includes>
</resource>
</resources>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
<version>3.5.1</version>
<configuration>
<source>1.7</source>
<target>1.7</target>
</configuration>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-source-plugin</artifactId>
<version>2.3</version>
<executions>
<execution>
<id>attach-sources</id>
<goals>
<goal>jar</goal>
</goals>
</execution>
</executions>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-javadoc-plugin</artifactId>
<version>3.2.0</version>
<configuration>
<doclint>${javadoc.opts}</doclint>
</configuration>
<executions>
<execution>
<id>attach-javadocs</id>
<goals>
<goal>jar</goal>
</goals>
</execution>
</executions>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-jar-plugin</artifactId>
<version>3.0.2</version>
<configuration>
<archive>
<manifest>
<addDefaultImplementationEntries>true</addDefaultImplementationEntries>
<addDefaultSpecificationEntries>true</addDefaultSpecificationEntries>
</manifest>
</archive>
</configuration>
</plugin>
<plugin>
<groupId>org.jacoco</groupId>
<artifactId>jacoco-maven-plugin</artifactId>
<version>0.7.9</version>
<executions>
<execution>
<goals>
<goal>prepare-agent</goal>
</goals>
</execution>
<execution>
<id>report</id>
<phase>test</phase>
<goals>
<goal>report</goal>
</goals>
</execution>
</executions>
</plugin>
</plugins>
</build>

<dependencies>
<dependency>
<groupId>com.google.code.gson</groupId>
<artifactId>gson</artifactId>
<version>2.10.1</version>
</dependency>

<dependency>
<groupId>org.apache.httpcomponents</groupId>
<artifactId>httpclient</artifactId>
<version>4.5.14</version>
</dependency>

<dependency>
<groupId>javax.validation</groupId>
<artifactId>validation-api</artifactId>
<version>1.1.0.Final</version>
</dependency>

<dependency>
<groupId>org.apache.logging.log4j</groupId>
<artifactId>log4j-core</artifactId>
<version>2.19.0</version>
<scope>compile</scope>
<optional>true</optional>
</dependency>

<dependency>
<groupId>org.apache.logging.log4j</groupId>
<artifactId>log4j-jcl</artifactId>
<version>2.13.2</version>
<scope>compile</scope>
<optional>true</optional>
</dependency>

<!-- Implementation of bean validation api and jaxb for java versions and servers not having it already included -->
<dependency>
<groupId>org.apache.bval</groupId>
<artifactId>bval-jsr</artifactId>
<version>1.1.2</version>
<scope>compile</scope>
<optional>true</optional>
</dependency>
<dependency>
<groupId>javax.xml.bind</groupId>
<artifactId>jaxb-api</artifactId>
<version>2.3.1</version>
<optional>true</optional>
</dependency>
<dependency>
<groupId>com.sun.xml.bind</groupId>
<artifactId>jaxb-core</artifactId>
<version>4.0.0</version>
<optional>true</optional>
</dependency>
<dependency>
<groupId>com.sun.xml.bind</groupId>
<artifactId>jaxb-impl</artifactId>
<version>4.0.0</version>
<optional>true</optional>
</dependency>

<!-- Test dependencies-->
<dependency>
<groupId>junit</groupId>
<artifactId>junit</artifactId>
<version>4.13.2</version>
<scope>test</scope>
</dependency>

<dependency>
<groupId>org.mockito</groupId>
<artifactId>mockito-core</artifactId>
<version>2.28.2</version>
<scope>test</scope>
</dependency>
</dependencies>
</project>
Loading