> ## Documentation Index
> Fetch the complete documentation index at: https://docs.panoqore.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Generic connector

> Record what any provider tells you, as balanced entries posted by your own code.

The generic connector works with any bank, payment provider or wallet, including one PanoQore does not list. Your code talks to the provider, and posts each money movement to PanoQore as an entry, with the provider's reference.

| | |
| - | - |
| Connector id | `generic` |
| Kind | `GENERIC` |
| Status | Available |
| Mode | Ledger-only |
| Currencies | NGN, USD, GBP, CAD |

## Capabilities

| Capability | Status |
| - | - |
| Any provider, through your own code | Available |
| Idempotent on your key | Available |

## Set up

**1. Mirror the provider**

Create a settlement account for the provider in each currency it holds. Its balance is the money you have at the provider, as your ledger sees it. See [Ledgers and accounts](https://docs.panoqore.com/concepts/ledgers-and-accounts.md).

**2. Listen to the provider**

Take the provider's webhooks, or poll it, in your own code.

**3. Post each movement**

For every movement the provider confirms, post an entry that moves the settlement account, with the provider's transaction id as `externalRef`.

## Record a credit

Money arrived at the provider for a customer: debit settlement, credit the customer's wallet.

```bash theme={null}
curl -X POST "$PANOQORE_URL/v1/entries" \
  -H "Authorization: Bearer $PANOQORE_API_KEY" \
  -H "Idempotency-Key: provider-txn-8812" \
  -H "Content-Type: application/json" \
  -d '{
    "kind": "TRANSFER_IN",
    "externalRef": "provider-txn-8812",
    "uniqueExternalRef": true,
    "postings": [
      {"accountId": "'"$SETTLEMENT"'", "side": "DEBIT",  "amount": "250000", "currency": "NGN"},
      {"accountId": "'"$WALLET"'",     "side": "CREDIT", "amount": "250000", "currency": "NGN"}
    ]
  }'
```

A payout is the other way round: debit the wallet and credit settlement once the provider confirms it. Use a [hold](https://docs.panoqore.com/concepts/holds.md) or a [pending entry](https://docs.panoqore.com/concepts/entries.md#pending) to reserve the money while you wait.

## Never post twice

Providers send the same event more than once. Two things stop it posting twice:

* **`Idempotency-Key`.** Derive it from the provider's transaction id, as above, so a retry with the same key returns the first entry. See [Idempotency](https://docs.panoqore.com/idempotency.md).
* **`uniqueExternalRef: true`.** Only one live entry can hold that `externalRef`. A second is refused with `409 EXTERNAL_REF_EXISTS`, even with a different key or when two workers race.

To check whether a movement is already recorded:

```bash theme={null}
curl "$PANOQORE_URL/v1/entries?externalRef=provider-txn-8812" -H "Authorization: Bearer $PANOQORE_API_KEY"
```

## Reconcile

Upload the provider's statement each day and PanoQore matches it against what you posted. See [Statement upload](https://docs.panoqore.com/connectors/statement-upload.md).

## Compared with a bank connector

| | Generic connector | Bank connector |
| - | - | - |
| Works with | Any provider | The banks listed in the catalog |
| Account numbers bound to wallets | No | Yes |
| Credits it cannot place | Your code decides | Held in suspense, with a break |
| PanoQore calls the provider | Never | In full integration |


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.