Перейти к содержимому

Заказ на фриланс · Разработка и IT

Senior Node.js / Next.js Developer – Kunfupay Payment Integration and Access Control

  • Бюджет: 4 169 ₽ – 8 338 ₽
  • Раздел: Разработка и IT
  • Опубликован: (МСК)

We are developing a paid online learning platform using Next.js , TypeScript, Supabase Auth, and a custom payment access system.

Users must complete a payment or receive manual approval before accessing premium features. We use KunfuPay hosted checkout to process payments, manage subscriptions, and automatically grant access after successful payment confirmation.

A partial KunfuPay integration already exists in the codebase. We are looking for an experienced developer to complete the integration and make it secure, reliable, and production-ready.

## Technology stack

- Next.js (App Router), React, TypeScript

- Node.js

- pnpm and Biome

- Supabase Auth with cookie-based sessions

- KunfuPay API

- Vitest

- Environment-based configuration

## Project scope

### 1. Existing integration audit

- Review the existing KunfuPay implementation.

- Identify missing functionality and potential security issues.

- Review compatibility with the KunfuPay API for one-time payments and subscriptions.

### 2. Checkout integration

- Allow authenticated users to initiate checkout.

- Create checkout sessions and subscriptions through the server.

- Configure payment amounts, currencies, external references, and success/cancel URLs.

- Redirect users to the KunfuPay hosted checkout page.

- Handle payment confirmation and unsuccessful transactions.

### 3. Webhook implementation

- Implement a secure public webhook endpoint.

- Verify HMAC signatures using the webhook secret.

- Handle successful, failed, canceled, and subscription-related payment events.

- Implement idempotent processing to prevent duplicate transactions or access grants.

- Add proper error handling and logging.

### 4. Access control

- Automatically grant premium access after successful payment.

- Support configurable access durations and monthly or annual subscription plans.

- Prevent unpaid users from accessing protected pages and APIs.

- Revoke access when subscriptions expire or are canceled, according to the applicable plan rules.

- Provide clear Spanish-language messages for payment and access status.

### 5. Manual payment approval

- Review and improve the existing receipt upload functionality, if available.

- Allow administrators to approve payments and manually grant access.

- Ensure manual approval works correctly alongside automated payments.

### 6. Testing and deployment

- Add or extend automated tests using Vitest.

- Test webhook verification, duplicate event handling, and access control.

- Verify the complete payment workflow in a staging environment.

- Document environment variables, API credentials, webhook configuration, and subscription plans.

- Prepare the integration for production deployment.

## Acceptance criteria

- Unpaid users cannot access premium features.

- Successful payments automatically unlock access within seconds of webhook confirmation.

- Duplicate webhooks do not create duplicate access grants.

- Failed or canceled payments never unlock access.

- API credentials and secrets remain server-side.

- Automated tests pass successfully.

- Complete documentation is provided for configuration, deployment, and payment verification.

## Developer requirements

- Strong experience with Node.js , Next.js , and TypeScript.

- Previous experience integrating payment gateways such as Stripe, Adyen, KunfuPay, or similar services.

- Strong understanding of webhooks, HMAC verification, and idempotency.

- Experience with Supabase authentication and server-side access control.

- Experience with subscription management and recurring payments.

- Ability to write clean, secure, and maintainable code.

- Good communication and ability to work independently.

## What we provide

- Access to the existing private repository.

- Staging environment and configuration templates.

- KunfuPay API credentials through a secure channel.

- Technical requirements and ongoing support.

## Out of scope

- Complete platform redesign.

- Replacement of the existing authentication system.

- Changes to the core learning functionality.

- Integration of additional payment gateways.

We are looking for someone who can start immediately and deliver a fully functional, secure, production-ready payment integration. Long-term collaboration may be available based on the quality of the work.

Похожие заказы

Заказы для программистов на фрилансе · Все свежие заказы