Skip to main content

Integrating Payment Processing

Ready to start accepting payments in your ValkyrAI app? Whether you're building an online store, a subscription service, or just need to process occasional payments, ValkyrAI makes it easy!

Payment Processing Options

ValkyrAI offers two main ways to handle payments:

  1. Stripe Integration (via StripeExecModule) - Our recommended payment solution
  2. Shopify Integration (via ShopifyComponent) - For connecting to an existing Shopify store

Let's explore both options in detail!

Option 1: Stripe Integration

Stripe Logo

Stripe is one of the most popular payment processors for online businesses. With ValkyrAI's StripeExecModule, you can easily integrate Stripe payments into your application.

Setting Up Stripe Integration

Step 1: Select the eCommerce Bundle

When creating your ValkyrAI project:

  1. Choose your base template (e.g., "Product Catalog")
  2. In the template configuration screen, select the "eCommerce Bundle"
  3. Make sure "Stripe Payments" is checked
  4. Complete your project setup

This adds the StripeExecModule to your generated application, which includes:

  • Pre-configured Stripe API connections
  • Payment processing components
  • Order management system
  • Security best practices for handling payments

Step 2: Configure Your Stripe Account

After generating your application:

  1. Create a Stripe account if you don't have one
  2. Get your API keys from the Stripe Dashboard
  3. In your ValkyrAI project, ask ValorIDE:
    Configure Stripe with my API keys: 
    Public key: pk_test_your_public_key
    Secret key: sk_test_your_secret_key
  4. ValorIDE will securely store your keys and set up the connection

Step 3: Add Payment UI Components

Now you can add payment forms to your application. Ask ValorIDE:

Add a payment form to the checkout page that collects 
credit card details and processes payments through Stripe.

ValorIDE will create:

  • A secure payment form
  • Card validation
  • Error handling
  • Success confirmation

What Can You Do With Stripe Integration?

With the StripeExecModule, your app can:

  • Process one-time payments for product purchases
  • Handle subscriptions with recurring billing
  • Save customer payment methods for faster checkout
  • Issue refunds when needed
  • Track payment status in your database
  • Generate receipts and invoices
  • Handle international payments in multiple currencies

Behind the Scenes: How It Works

The StripeExecModule connects your ThorAPI-generated backend to Stripe's services:

  1. Your frontend collects payment details using Stripe Elements (secure forms)
  2. The data is tokenized (converted to a secure token) in the customer's browser
  3. Your backend sends the token to Stripe's API
  4. Stripe processes the payment and returns the result
  5. Your app updates order status and database records

This flow ensures payment data never touches your servers directly, keeping you compliant with security standards.

Option 2: Shopify Integration

Shopify Logo

If you already have a Shopify store or prefer to use Shopify's platform, ValkyrAI's ShopifyComponent lets you connect your custom app to Shopify.

Setting Up Shopify Integration

Step 1: Select the Shopify Component

When creating your ValkyrAI project:

  1. Choose your base template
  2. In the components selection screen, select "ShopifyComponent"
  3. Complete your project setup

Step 2: Connect to Your Shopify Store

After generating your application:

  1. Set up a Shopify store if you don't have one
  2. Create a private app in your Shopify admin to get API credentials
  3. Ask ValorIDE:
    Configure Shopify integration with my store URL: your-store.myshopify.com
    and API key: your_api_key
  4. ValorIDE will set up the connection

Step 3: Use Shopify Components

Now you can build custom UI that works with your Shopify products and checkout:

Create a product page that shows my Shopify products 
and adds them to my Shopify cart when purchased.

What Can You Do With Shopify Integration?

With the ShopifyComponent, your app can:

  • Display products from your Shopify store
  • Use Shopify's checkout for processing payments
  • Sync inventory between your app and Shopify
  • Access order history and customer data
  • Create custom shopping experiences while using Shopify's backend

Choosing Between Stripe and Shopify

Here's a quick comparison to help you decide:

FeatureStripe IntegrationShopify Integration
Best forCustom checkout experiencesUsing existing Shopify store
ControlFull control over UI and flowLimited by Shopify's capabilities
ComplexityMore to configureSimpler if you already use Shopify
FeesStripe transaction feesShopify subscription + transaction fees
FeaturesHighly customizableLimited to Shopify's features

Best Practices for Payment Processing

No matter which option you choose, follow these tips:

  1. Always test thoroughly using test API keys before going live
  2. Implement proper error handling for failed payments
  3. Send confirmation emails for successful purchases
  4. Keep detailed transaction records in your database
  5. Secure all payment-related communication with HTTPS
  6. Follow PCI compliance guidelines for handling payment data
  7. Add fraud prevention measures like address verification

Advanced Payment Features

As your business grows, you might want to add:

Multiple Payment Methods

Ask ValorIDE:

Add support for Apple Pay and Google Pay in addition to credit cards.

Subscription Management

Ask ValorIDE:

Create a subscription management page where users can view, 
update, or cancel their subscription plans.

International Support

Ask ValorIDE:

Add support for multiple currencies and automatic currency conversion.

Next Steps

Once you've set up payment processing, consider:

Remember: Always prioritize security and compliance when handling payments!