bagisto/agent-skills

bagisto-payment-method-development

Use when creating or changing a Bagisto payment method — a payment class, the payment methods config, the checkout redirect and callback flow, or integrating a gateway such as Stripe or PayPal.

View source

How to use

  1. Copy the installation command and review the source package before installing it in your own agent environment.
  2. Check the source document for required tools, credentials and supported hosts.
  3. Describe your input and desired deliverable; review the output against the source material.
npx skills add https://github.com/bagisto/agent-skills --skill bagisto-payment-method-development

Before you start

  • Installation does not include a model subscription, API allowance or permission to access your files.
  • Repository stars and installation counts describe activity, not an independent quality or security test.
Original skill document

Rendered from the source repository. Headings, examples, code, tables, links, and referenced images are preserved.

Payment Method Development

Overview

Creating custom payment methods in Bagisto allows you to integrate any payment gateway or processor with your store. Whether you need local payment methods, cryptocurrency payments, or specialized payment flows, custom payment methods provide the flexibility your business requires.

For our tutorial, we'll create a Custom Stripe Payment method that demonstrates all the essential concepts you need to build any type of payment solution.

When to Apply

Activate this skill when:

  • Creating new payment methods
  • Integrating payment gateways (Stripe, PayPal, Razorpay, etc.)
  • Adding payment options to checkout
  • Modifying existing payment configurations
  • Creating admin configuration for payment methods

Bagisto Payment Architecture

Bagisto's payment system is built around a flexible method-based architecture that separates configuration from business logic.

Core Components

ComponentPurposeLocation
Payment Methods ConfigurationDefines payment method propertiesConfig/payment-methods.php
Payment ClassesContains payment processing logicPayment/ClassName.php
System ConfigurationAdmin interface formsConfig/system.php
Service ProviderRegisters payment methodProviders/ServiceProvider.php

Key Features

  • Flexible Payment Processing: Support for redirects, APIs, webhooks, or custom flows.
  • Configuration Management: Admin-friendly settings interface.
  • Multi-channel Support: Different settings per sales channel.
  • Security Ready: Built-in CSRF protection and secure handling.
  • Extensible Architecture: Easy integration with third-party gateways.

Reference files — load only what the current task needs

FileLoad when
implementation.mdBuilding a payment method — the step-by-step guide
payment-api.mdThe base payment class and the methods to override
reference.mdBuilt-in methods, best practices, a complex integration example, package layout, testing, pitfalls

REQUIRED SUB-SKILL: Use bagisto-change-verification before calling any change done.

Related by task

from this repository

More skills

All skills
bagisto
Community

bagisto-attribute-development

Use when working with Bagisto's EAV attribute system — adding or changing an attribute, attribute family or group, reading or writing a product attribute value, or debugging a value that reads back empty or from the wrong locale or channel. Trigger phrases include "attribute", "EAV", "attribute family", "attribute group", "attribute option", "custom attribute", "valueperlocale", "valueperchannel", "productflat", "swatch".

installs
1
GitHub stars
12
Updated
Oct 1
bagisto
Community

bagisto-code-review

Use when reviewing Bagisto code changes or a pull request for correctness, convention compliance or quality, or when asked whether a change is ready to merge. Trigger phrases include "review", "code review", "PR review", "is this correct", "conventions", "violations", "code quality", "ready to merge".

installs
1
GitHub stars
12
Updated
Oct 1
bagisto
Community

bagisto-documentation

Use when writing or updating any Bagisto documentation site — the developer documentation, the merchant user guide, or any other Bagisto docs repository — covering page content, code samples, screenshots, the sidebar, image naming, and moving or deleting pages. Trigger phrases include "docs", "documentation", "user guide", "developer documentation", "dev docs", "merchant documentation", "marketplace docs", "document this", "update the docs", "add a doc page", "screenshot", "ImagePopup", "redirec

installs
1
GitHub stars
12
Updated
Oct 1
bagisto
Community

bagisto-product-type-development

Use when creating or changing a Bagisto product type — the producttypes config, an AbstractType subclass, or type-specific cart, pricing and inventory behaviour. Trigger phrases include "product type", "AbstractType", "configurable", "bundle", "grouped", "downloadable", "virtual product", "subscription product", "prepareForCart".

installs
1
GitHub stars
12
Updated
Oct 1