gragerdsouza / payit-php-client
PHP client for Payit (NatWest) API
v1.0.1
2025-10-05 14:48 UTC
Requires
- php: >=7.4
- guzzlehttp/guzzle: ^7.0
- vlucas/phpdotenv: ^5.5
Requires (Dev)
- friendsofphp/php-cs-fixer: ^3.88
README
This repository contains a small PHP client for the Payit API (NatWest / Payit). It demonstrates:
- OAuth2 client_credentials token retrieval
- Basic endpoints: list banks, create payments, check payment status
- Example scripts
Setup
- Copy
.env.exampleto.envand fill in your sandbox/production credentials. composer install- Run examples:
php examples/get_token.php
Notes
- Replace placeholder endpoints and payloads with the exact shapes from the Payit API documentation.
- Do not store client secrets in source control.
- Use the sandbox environment for testing before going live.