A complete transaction reporting service built on the Global Payments Portico gateway. Developers can search, filter, and export transaction data through an interactive web UI and REST API, covering settlements, disputes, deposits, and batch details — alongside live credit card payment processing. All implementations use the official Global Payments SDK (dual config: PorticoConfig for payments, GpApiConfig for reporting).
Available in six languages: PHP, Node.js, .NET, Java, Python, and Go.
| Language | Framework | SDK Version |
|---|---|---|
| PHP | Built-in Server | globalpayments/php-sdk ^13.1 |
| Node.js | Express.js | globalpayments-api ^3.10.6 |
| .NET | ASP.NET Core | GlobalPayments.Api 9.0.16 |
| Java | Jakarta Servlet | globalpayments-sdk 14.2.20 |
| Python | Flask | globalpayments |
| Go | net/http | globalpayments-go |
The service exposes two categories of endpoints under a three-tab UI:
- Payment processing — charge a card using Portico hosted fields (
POST /process-payment) - Transaction reporting — search and export transaction history via the Reporting SDK (
GET /api/reports?action=...)
Browser (three-tab UI)
│
├─ Tab 1: Payment Form
│ ├─ GET /config ─────► publicApiKey for globalpayments.js initialization
│ └─ POST /process-payment ─────► SDK: CreditCardData.charge().execute()
│
├─ Tab 2: API Documentation
│ └─ Built-in reference for all reporting endpoints
│
└─ Tab 3: Transaction Report
└─ GET /api/reports?action=search|detail|settlement|export|summary|declines
└─ SDK: ReportingService queries via Portico
- Global Payments developer account with Portico credentials — Sign up at developer.globalpayments.com
- Two API keys from your Portico account:
PUBLIC_API_KEY— prefixedpkapi_cert_...(sandbox)SECRET_API_KEY— prefixedskapi_cert_...(sandbox)
- Docker (for multi-service setup), or a local runtime for your chosen language
git clone https://github.com/globalpayments-samples/reporting-service.git
cd reporting-servicecd nodejs # or php, dotnet, java, python, go
cp .env.sample .envEdit .env:
PUBLIC_API_KEY=pkapi_cert_your_key_here
SECRET_API_KEY=skapi_cert_your_key_herePHP:
composer install
php -S localhost:8003Node.js:
npm install
npm start.NET:
dotnet restore
dotnet runJava:
mvn clean package
mvn cargo:runPython:
pip install -r requirements.txt
python app.pyGo:
go mod download
go run main.goOpen the app (e.g. http://localhost:8001) and navigate the three tabs:
- Payment Form — process a test transaction
- Reporting Documentation — browse all available report endpoints
- Transaction Report — search, filter, and export transaction history
Run all six language implementations simultaneously:
cp .env.sample .env
# Edit .env with your credentials, then:
docker-compose upIndividual services:
docker-compose up nodejs # http://localhost:8001
docker-compose up python # http://localhost:8002
docker-compose up php # http://localhost:8003
docker-compose up java # http://localhost:8004
docker-compose up go # http://localhost:8005
docker-compose up dotnet # http://localhost:8006Run integration tests:
docker-compose --profile testing upReturns the public API key for globalpayments.js initialization on the payment form.
Response:
{
"success": true,
"data": {
"publicApiKey": "pkapi_cert_..."
}
}Processes a credit card charge using a tokenized payment reference from the hosted fields form.
Request body:
{
"payment_token": "supt_...",
"amount": "19.99",
"billing_zip": "30303"
}Success (200):
{
"success": true,
"data": {
"transactionId": "1234567890",
"responseCode": "00",
"responseMessage": "Approved"
}
}All reporting actions use a single endpoint with an action query parameter.
| Parameter | Required | Description |
|---|---|---|
start_date |
No | YYYY-MM-DD |
end_date |
No | YYYY-MM-DD |
transaction_id |
No | Exact transaction ID |
status |
No | Transaction status filter |
payment_type |
No | Payment method type |
amount_min |
No | Minimum amount |
amount_max |
No | Maximum amount |
card_last_four |
No | Last 4 digits of card |
page |
No | Page number (default: 1) |
page_size |
No | Results per page (max: 100) |
Example: GET /api/reports?action=search&start_date=2025-01-01&end_date=2025-01-31
| Parameter | Required | Description |
|---|---|---|
transaction_id |
Yes | Transaction ID to look up |
Example: GET /api/reports?action=detail&transaction_id=1234567890
| Parameter | Required | Description |
|---|---|---|
start_date |
No | YYYY-MM-DD |
end_date |
No | YYYY-MM-DD |
page |
No | Page number |
page_size |
No | Results per page (max: 100) |
| Parameter | Required | Description |
|---|---|---|
format |
No | json (default), csv, or xml |
start_date |
No | YYYY-MM-DD |
end_date |
No | YYYY-MM-DD |
transaction_id |
No | Filter by ID |
status |
No | Filter by status |
Example: GET /api/reports?action=export&format=csv&start_date=2025-01-01
Returns aggregate counts and totals across a time range.
Returns declined transactions with decline reason codes.
reporting-service/
├── index.html # Shared frontend (three-tab UI)
├── docker-compose.yml # Multi-service Docker config
├── Dockerfile.tests
├── LICENSE
├── README.md
│
├── php/ # Port 8003
│ ├── config.php # GET /config
│ ├── process-payment.php # POST /process-payment
│ ├── reports.php # GET /api/reports
│ ├── reporting-service.php
│ └── documentation.php
│
├── nodejs/ # Port 8001
│ ├── server.js # /config, /process-payment
│ ├── reports.js # /api/reports router
│ └── reporting-service.js
│
├── dotnet/ # Port 8006
│ └── Program.cs
│
├── java/ # Port 8004
│ └── src/
│
├── python/ # Port 8002
│ └── app.py
│
└── go/ # Port 8005
└── main.go
| Variable | Description | Example |
|---|---|---|
PUBLIC_API_KEY |
Portico public key for hosted fields | pkapi_cert_jKc1Ft... |
SECRET_API_KEY |
Portico secret key for server-side SDK | skapi_cert_MTyM... |
| Brand | Card Number | CVV | Expiry |
|---|---|---|---|
| Visa | 4012002000060016 | 123 | Any future |
| Mastercard | 5473500000000014 | 123 | Any future |
| Discover | 6011000990156527 | 123 | Any future |
| Amex | 372700699251018 | 1234 | Any future |
Reports return empty results Sandbox accounts may have limited transaction history. Process a test payment in Tab 1 first, then search for it in Tab 3.
401 Unauthorized from Portico
Verify PUBLIC_API_KEY and SECRET_API_KEY in .env match the pkapi_cert_ / skapi_cert_ format for sandbox.
Invalid start_date format
Dates must be YYYY-MM-DD. Example: 2025-01-15.
Port conflict
Check which service is running (lsof -i :8001) and update the port in docker-compose.yml.
- 🌐 Developer Portal — developer.globalpayments.com
- 💬 Discord — Join the community
- 📋 GitHub Discussions — github.com/orgs/globalpayments/discussions
- 📧 Newsletter — Subscribe
- 💼 LinkedIn — Global Payments for Developers
Have a question or found a bug? Open an issue or reach out at communityexperience@globalpay.com.
MIT — see LICENSE.