# Using Qualy with NexPay

> Using Qualy with NexPay: NexPay payment intents, payers, payees, commissions, settlements and FX quotes mapped to the Qualy API.

NexPay and Qualy are independent companies in the same group. They're built to work side by side:

* **NexPay** moves money across borders — regulated international transfers for education agents, schools and the students and parents paying them, with a person to talk to when it matters.
* **Qualy** runs the back office around those payments — invoicing, payment plans, local payment methods, reconciliation, commission payouts, chasing, and syncing with Xero, QuickBooks and HubSpot.

Qualy already uses NexPay for cross-border FX. So if you use NexPay today, you don't have to leave it. This guide is for teams who want to manage payments in Qualy, or move a NexPay workflow onto Qualy's API.

---

## Concept map

| NexPay | Qualy | Notes |
| --- | --- | --- |
| Student / payer | [Contact](https://v1-spec.qualyhq.com/#post-/v1/contacts/create) | The student is the contact; whoever pays (a parent, a sponsor) is the payer on the payment. |
| Payment intent / pay page | [Payment intent](/docs/guides/creating-payment-intents.md) + `links.short` | — |
| Public or reusable payment link | [Service + template](/docs/guides/payment-links.md#reusable-links) | — |
| Portioned links / instalments | [Orders](/docs/guides/creating-orders.md) or [subscriptions](/docs/guides/creating-subscriptions.md) | — |
| Payee / recipient | [Partnership](https://v1-spec.qualyhq.com/#post-/v1/partnerships/create) + [bank account](/docs/guides/creating-bank-accounts.md) | Schools, agents and suppliers you pay. |
| Commissions | [Payment splits](/docs/guides/creating-payment-splits.md) | `keep-percentage` keeps your commission and sends the rest to the school. |
| Settlements / remittance advice | Payouts + remittance advice | Created when a split is paid out. |
| Inbound payments / receipts | Transactions + payment receipts | `transactions.create` webhook. |
| Returns | [Refunds](/docs/guides/issuing-transaction-refunds.md) | — |
| FX quotes | `settlementCurrency` on the payment | Qualy prices FX at checkout; NexPay is one of the rails behind it. |
| Zapier triggers | [Webhooks](/docs/webhooks/events.md) | `paymentIntents.update`, `transactions.create`, `splitIntents.update`. |

---

## API differences

| — | NexPay | Qualy |
| --- | --- | --- |
| Base URL | `https://api.nexpay.com.au` | `https://api.qualyhq.com/v1` |
| Auth | `X-API-Key: <clientId>:<secret>` | `Authorization: ApiKey <key>` + `X-TENANT-ID` |
| Amounts | Decimal strings (`"1350.00"`) | Integers in minor units (`135000`) |
| Who sets the amount | `amountMode` (payer-fixed, recipient-fixed…) | You invoice in `currency`; the payer's amount in their currency is worked out at checkout. |

---

## A NexPay payment, in Qualy

```javascript
const res = await fetch('https://api.qualyhq.com/v1/payment-intents/create', {
  method: 'POST',
  headers: {
    'Content-Type': 'application/json',
    'Authorization': 'ApiKey your-api-key-here',
    'X-TENANT-ID': 'your-tenant-id-here',
  },
  body: JSON.stringify({
    intentType: 'ad-hoc',
    contact: 'minh.nguyen@example.com',
    currency: 'AUD',
    settlementCurrency: 'VND', // optional: fix the payer's currency
    items: [{ name: 'Tuition fee', amount: 820000 }],
  }),
});

const { data: payment } = await res.json();
console.log(payment.links.short);
```

Then add the school as a [payment split](/docs/guides/creating-payment-splits.md) so Qualy pays them once the student's money arrives.

---

## What stays in NexPay

* Your NexPay account, its compliance onboarding and its wallet balances. Qualy has its own onboarding.
* NexPay rate alerts and rate history.
* Existing NexPay pay-page links. Issue new Qualy links for new payments; let open NexPay links finish where they are.
