# Payment links for a genetics lab.

> Payments for prenatal diagnostic tests sent by email and collected on the bank's gateway, with status updated directly by the bank's server.

- Sector: Healthcare
- Practice: Systems integration
- Year: 2023
- URL: https://cloudfactory.it/en/work/payment-links-genetics-lab/

## In brief

For a genetics lab offering prenatal diagnostic tests we built a small payment portal. Staff enter patient, amount and service; the patient gets an email with a link, pays on the bank's secure page, and status updates from the notification the bank sends to our server, not from the browser returning.

- **1** server-to-server notification as the source of status
- **2** languages, Italian and English

## Context

The lab collected payments by bank transfer and manual messages: slow for patients and hard to reconcile.

## The problem

A payment's status can't depend on the patient returning to the site after paying: if they close the page, the payment would look unpaid.

## What we did

1. **A payment in three fields.** Staff create the payment with patient details, amount and service description. The email goes out automatically and can be resent.
2. **The bank's page.** Integration with the Axerve gateway through its encrypted API: card details stay on the bank's page.
3. **The bank decides the status.** The server-to-server notification sets the status: due, paid, failed. The browser return only shows the patient a message.
4. **Replaceable gateway.** The gateway sits behind an interface: changing bank means writing an adapter, not rewriting the portal.

## How it went

Test payments arrive tracked, with a certain status for each patient and no manual reconciliation.

## Tools

Laravel 10, PHP 8.1, MySQL, Axerve, SOAP, Bootstrap 5, Vite

## FAQ

### Does the portal see card details?

No. Payment happens on the bank's page; the portal only receives the outcome.

### Can another gateway be used?

Yes, the gateway is separated from the rest of the code through an interface.

---

Cloudfactory S.r.l., Rome. Contact: hello@cloudfactory.it
