Shopify payments

From OrcaQubits/agentic-commerce-skills-plugins · View interactive version

Shopify payments is an AI agent skill from the GitHub repository OrcaQubits/agentic-commerce-skills-plugins. Integrate Shopify payments — Shopify Payments (Stripe-powered), Payment Apps API, payment session flow, Billing API for app charges, refund processing, and PCI compliance. Use when working with Shopify payment processing.

How to use this skill

Skill file

Shopify Payments Integration

Before writing code

Fetch live docs:

  1. Web-search site:shopify.dev payments apps api for Payment Apps API
  2. Web-search site:shopify.dev billing api app charges for app billing
  3. Web-search site:shopify.dev shopify payments for Shopify Payments overview
  4. Web-search site:shopify.dev payment session resolve reject for payment session flow
  5. Web-search site:shopify.dev app subscription create usage record for billing mutations

Shopify Payments

Shopify's built-in payment processor (powered by Stripe):

Payment Flow

Customer → Checkout → Payment Method Selection → Authorization → Capture

Supported Payment Methods

| Method | Details |

|--------|---------|

| Credit/Debit cards | Visa, Mastercard, Amex, Discover |

| Shop Pay | Shopify's accelerated checkout |

| Apple Pay | On supported devices/browsers |

| Google Pay | On supported devices/browsers |

| Local methods | Varies by country (iDEAL, Bancontact, etc.) |

Fetch live docs for supported payment methods by country — availability varies by region and changes over time.

Payment Apps API

For building custom payment gateways as Shopify apps:

Payment Session Flow

1. Customer selects your payment method at checkout
2. Shopify creates payment session → calls your app's payment endpoint
3. Your app processes payment with your gateway
4. Return: RESOLVE (success) or REJECT (failure)
5. Optional: REDIRECT for additional auth (3D Secure, bank redirect)
6. Optional: CONFIRM for pending/async payments

Key Mutations

| Operation | Mutation | When |

|-----------|----------|------|

| Approve payment | paymentSessionResolve | Payment succeeded |

| Decline payment | paymentSessionReject | Payment failed |

| Redirect customer | paymentSessionRedirect | 3D Secure, bank auth |

| Confirm payment | paymentSessionConfirm | Async/pending payment settled |

| Approve refund | refundSessionResolve | Refund succeeded |

| Decline refund | refundSessionReject | Refund failed |

| Approve capture | captureSessionResolve | Manual capture succeeded |

| Decline capture | captureSessionReject | Manual capture failed |

| Approve void | voidSessionResolve | Void succeeded |

| Decline void | voidSessionReject | Void failed |

Fetch live docs for each session mutation's input fields and the PaymentSessionActionsRedact webhook — the API surface for payment apps is complex and version-sensitive.

Payment App Requirements

Fetch live docs: Web-search site:shopify.dev build payment extension for current extension configuration, required endpoints, and testing procedures.

Billing API

For charging merchants for your app:

Charge Types

| Type | Mutation | Use Case |

|------|----------|----------|

| Recurring | appSubscriptionCreate | Monthly/annual subscription |

| One-time | appPurchaseOneTimeCreate | One-time feature purchase |

| Usage-based | appUsageRecordCreate | Metered billing (per-action, per-order) |

Subscription Flow

  1. Create subscription with appSubscriptionCreate → returns confirmationUrl
  2. Redirect merchant to confirmationUrl
  3. Merchant approves charge on Shopify-hosted page
  4. Shopify handles billing, invoicing, and payouts to your Partner account

Usage-Based Billing Pattern

  1. Create a subscription plan with a usage pricing model via appSubscriptionCreate
  2. As the merchant uses features, record usage with appUsageRecordCreate
  3. Shopify bills the merchant at the end of the billing cycle based on recorded usage
  4. Capped amounts prevent unexpected charges

Fetch live docs for AppSubscriptionInput and AppUsageRecordInput fields — pricing models, trial days, currency options, and line item structures change across API versions.

Refund Processing

PCI Compliance

Shopify handles PCI compliance for:

Your app must:

Best Practices

Fetch the Shopify Payment Apps API and Billing API documentation for exact session flow, mutation inputs, testing procedures, and webhook requirements before implementing.

Use this skill with your AI agent: Open on Skill Issue to copy, download, or add to your library. Works with Claude, ChatGPT, Gemini, Cursor, Windsurf and more.