# Integrate using AI

Use Axiym documentation and an optional integration prompt with your coding agent.

Product: PNSL API
Guides follow API reference 2.0.0 and event reference 1.0.0.
Canonical page: https://docs.axiym.io/pnsl-api/integration-guide/integrate-with-ai

Use the sources below with your coding agent to build a PNSL API integration.

## AI-readable documentation

| Source                                                 | Use it for                                                                                      |
| ------------------------------------------------------ | ----------------------------------------------------------------------------------------------- |
| [PNSL API llms.txt](/pnsl-api/llms.txt)                | Finding guides, references and available versions.                                              |
| [Markdown pages](/pnsl-api/integration-guide.md)       | Reading guides and examples. Use **View Markdown** or append `.md` to a documentation page URL. |
| [OpenAPI contracts](/pnsl-api/api-reference#downloads) | Versioned operations and request/response schemas.                                              |

Markdown is generated from the same sources as this site. Give your agent the
relevant links; `llms.txt` is not automatically read by every tool. If it cannot
fetch a page, paste the Markdown instead.

## Describe one feature at a time

Include your feature goal and application constraints. For example:

> Add PNSL financing-capacity checks to our client dashboard. Show the active
> credit account and available balance for the selected currency and rail,
> using our existing backend authorization and UI patterns.

For larger integrations, work incrementally through client onboarding, capacity
checks, funding, and repayment tracking.

## Optional integration prompt

Copy the prompt into your coding agent with your repository open. Add your
feature goal; the prompt supplies documentation links and PNSL API guidance.

**AI assistance does not guarantee a correct integration**

Generated code may contain errors or miss requirements. Review it against
the API documentation and validate it in the sandbox before production use.
This prompt does not validate or certify your integration.



```text
Help me integrate the Axiym PNSL API into the application in this repository.

Implement only the feature I describe alongside this prompt. If I have not supplied a feature goal, ask what I want to build before choosing the scope. Follow the application's existing architecture and conventions.

## Start with the application

Inspect the repository's instructions, language, framework, HTTP client, configuration, authentication and authorization, persistence, background jobs, and tests. Find any existing Axiym integration before adding another one. Reuse the project's established components and libraries.

Explain where the integration will fit and then implement it. Ask focused questions only when a missing decision materially changes the implementation. If no application repository is available, ask which project to use before creating a new application. If this is a backend-only project, implement the appropriate service/API interfaces for the requested feature.

## Read the Axiym sources

Target PNSL API 2.0.0 and event reference 1.0.0. These versions were selected when this prompt was copied. Use matching contracts and verify that current guides still describe those versions. Flag any mismatch and establish the intended version before implementing.

Start with:
- Documentation index: https://docs.axiym.io/pnsl-api/llms.txt
- Getting started: https://docs.axiym.io/pnsl-api/integration-guide.md
- API contract: https://docs.axiym.io/openapi/pnsl-api/2.0.0.json
- Event contract: https://docs.axiym.io/openapi/pnsl-api/events/1.0.0.json

Read the guides relevant to the requested feature:
- Authentication: https://docs.axiym.io/pnsl-api/integration-guide/fundamentals/authentication.md
- Idempotency: https://docs.axiym.io/pnsl-api/integration-guide/fundamentals/idempotency.md
- Errors and retries: https://docs.axiym.io/pnsl-api/integration-guide/fundamentals/error-handling-and-retries.md
- Pagination: https://docs.axiym.io/pnsl-api/integration-guide/fundamentals/pagination-and-query-parameters.md
- Client onboarding: https://docs.axiym.io/pnsl-api/integration-guide/implementation-guides/client-onboarding.md
- Financing capacity: https://docs.axiym.io/pnsl-api/integration-guide/implementation-guides/check-credit-capacity.md
- Funding and repayments: https://docs.axiym.io/pnsl-api/integration-guide/implementation-guides/receivables-funding-and-repayments.md
- Payment rails: https://docs.axiym.io/pnsl-api/integration-guide/fundamentals/payment-rails.md
- Webhook registration: https://docs.axiym.io/pnsl-api/webhooks/registration-and-management.md
- Webhook signatures: https://docs.axiym.io/pnsl-api/webhooks/verifying-signatures.md
- Webhook processing: https://docs.axiym.io/pnsl-api/webhooks/overview.md

Use these sources for endpoints, schemas, scopes, states, signature verification and retry rules. Follow linked operation and schema references for field details. If sources conflict or cannot be retrieved, identify the gap and ask for the missing information. Do not invent endpoints, an Axiym SDK or undocumented behavior.

## Implement the requested functionality

Apply only the guidance relevant to the requested feature, in manageable steps. Use the existing server-side HTTP stack and configuration or secret store. Derive authentication and environment URLs from the documentation. Keep credentials and tokens server-side, omit secrets from logs, and supply empty example configuration values. Represent monetary values without floating-point rounding errors.

1. Use the selected current PNSL contract; do not mix legacy PNSL endpoints or Account API operations into it. Keep clientId attached to credit accounts, receivables, repayments, transfers and your own payment records, with application authorization enforcing client ownership.

2. Use existing active clients or the documented onboarding flow as needed. Onboarding includes KYB and financial underwriting. Store the returned clientId and wait for the documented approval and ACTIVE client state; do not resubmit an onboarding that is still under review.

3. Before funding, select the active credit account for the payment's currency and rail and check availableBalance. A capacity check does not reserve capacity. Distinguish creditLimit, availableBalance and balance using their documented meanings.

4. Request funding idempotently and store your payment ID, clientId and receivableId together. A PENDING receivable is an accepted funding request, not settled disbursement. Execute the client payment in your system only once disbursed funds are on your account. Do not invent a payout-confirmation step for receivables.

5. Follow the documented automatic repayment references and oldest-active-receivable allocation. Manual repayment applies unallocated funds; settled repayments cannot be reversed. Partial repayment is not full settlement. Returning client excess funds and withdrawing partner funds are distinct operations. Account retrieval and withdrawals described in the repayment guide belong to the Account API: if the feature needs them, retrieve that product's documentation and contract and confirm access rather than inventing PNSL equivalents.

6. Provide webhook setup before onboarding or funding validation. Verify signatures, deduplicate event IDs and retrieve authoritative resource state after notifications. Reconcile disbursements, repayments and balances. Agree on provisioned sandbox clients, credit accounts and supported lifecycle scenarios with Axiym; do not invent a simulator or promise live funding from local tests.

## Verify and hand over

Use mocked responses and synthetic fixtures derived from the selected contracts. Test authentication, authorization, pagination and error handling as relevant, plus inactive clients or credit accounts, insufficient capacity, ambiguous funding responses, disbursement not yet settled, partial versus full repayment, currency and rail selection, duplicate or out-of-order events, and repayment reconciliation. For webhook features, cover invalid signatures and recovery from missed notifications.

Run the project's relevant checks and fix failures caused by your changes. Code generation and local tests should not require real credentials. Leave live API calls, webhook registration, deployment and money movement for separately requested setup or validation.

Finish with changed files, configuration instructions, checks actually run, assumptions and remaining gaps. Distinguish passing local tests from a verified sandbox integration, and list the provisioning and application decisions still needed.
```



## Review and validate

Passing local tests does not verify an Axiym integration. Follow the
[getting started guide](/pnsl-api/integration-guide) and agree on sandbox
access, test clients and funding/repayment scenarios with Axiym.
