You can find more information on how to use this SDK and sign up for a free Global Payments sandbox account at https://developer.globalpay.com
- Android 5.0+ (API 21+)
Declare jcenter repository in the root build.gradle file:
allprojects {
repositories {
jcenter()
}
}Declare dependency in the app build.gradle file:
dependencies {
implementation 'com.globalpayments.android:globalpayments-android-sdk:1.0'
}You can find the latest SDK documentation along with code examples and test cards on the Global Payments Developer Portal.
/// Prepare required configuration
GpApiConfig config = new GpApiConfig();
config.setServiceUrl("Service Url"); //(Sandbox URL: "https://apis.sandbox.globalpay.com/ucp")
config.setAppId("Your application ID");
config.setAppKey("Your application key");
/// Add config to container
ServicesContainer.configureService(config);
/// Prepare card
CreditCardData card = new CreditCardData();
card.setNumber("4111111111111111");
card.setExpMonth(12);
card.setExpYear(2025);
card.setCvn("123");
// Execute operation
Transaction transaction = card.charge(new BigDecimal("19.99"))
.withCurrency("USD")
.execute();| Name | Number | Exp Month | Exp Year | CVN |
|---|---|---|---|---|
| Visa | 4263970000005262 | 12 | 2025 | 123 |
| MasterCard | 2223000010005780 | 12 | 2019 | 900 |
| MasterCard | 5425230000004415 | 12 | 2025 | 123 |
| Discover | 6011000000000087 | 12 | 2025 | 123 |
| Amex | 374101000000608 | 12 | 2025 | 1234 |
| JCB | 3566000000000000 | 12 | 2025 | 123 |
| Diners Club | 36256000000725 | 12 | 2025 | 123 |
| Transaction Report | Transaction Operation |
|---|---|
![]() |
![]() |
| Payment Method Operation | Payment Method Report |
|---|---|
![]() |
![]() |
| Disputes Report | Disputes Operation |
|---|---|
![]() |
![]() |







