Migrate to Pine Labs Payment Gateway

Step-by-step guide to migrating from another payment gateway to Pine Labs Online — with zero downtime and no customer disruption.

Move from your current payment gateway to Pine Labs Online without losing customers, transaction history, or uptime.


What you're building

By the end of this guide, you'll have:

  • A migration plan tailored to your current setup
  • Pine Labs integration running in parallel with your existing gateway
  • Customers transitioned smoothly with no payment disruption
  • Full operational readiness on Pine Labs Online

Before you begin

RequirementDetails
Pine Labs accountSign up →
API credentialsClient ID + Client Secret from Dashboard → Settings
Current gateway accessTo run both gateways in parallel during migration
Technical teamBackend developers for integration work

Migration overview


Phase 1 — Plan & prepare

Audit your current setup

Document what you're migrating:

ItemQuestions to answer
Payment methodsWhich methods are active? Cards, UPI, Netbanking, Wallets, EMI?
Integration typeHosted checkout, server-to-server, SDK, or plugin?
Recurring paymentsDo you have active subscriptions? How many?
Saved cardsAre customers using tokenised cards for repeat payments?
WebhooksWhich events are you listening to? What actions do they trigger?
Refund flowsHow are refunds currently processed? Automated or manual?
Settlement scheduleDaily, weekly, or custom?
PluginsShopify, WooCommerce, Magento, or custom?

Map features to Pine Labs equivalents

Your current featurePine Labs equivalentNotes
Hosted checkout pageHosted CheckoutSimilar redirect-based flow
Custom payment formCustom CheckoutRequires PCI compliance
Embedded checkoutiFrame CheckoutOverlay on your page
Payment linksPayment LinksDashboard + API
Recurring billingSubscriptionsPlans + subscription API
EMI / instalmentsAffordability SuiteCredit, Debit, Cardless EMI
Split paymentsSplit SettlementsMarketplace distributions
WebhooksWebhooksConfigurable event notifications

Get Pine Labs credentials

  1. Sign up for a Pine Labs Online account
  2. Complete KYC verification
  3. Get UAT credentials from Dashboard → Settings → API Keys

Screenshot: Dashboard → Settings → API Keys — Your migration starts here


Phase 2 — Integrate Pine Labs

Update your backend

Replace your current gateway's API calls with Pine Labs equivalents:

OperationTypical gatewayPine Labs Online
AuthenticationAPI key in headerGenerate Token → Bearer token
Create orderCreate charge/sessionCreate Order
Process paymentCharge/confirmCreate Payment
CaptureCapture chargeCapture Order
RefundCreate refundCreate Refund
Get statusRetrieve chargeGet Order

Example: Replacing a checkout flow

Before (generic gateway):

JavaScript
// Old gateway
app.post('/checkout', async (req, res) => {
  const session = await oldGateway.createSession({
    amount: req.body.amount,
    currency: 'INR',
    successUrl: '/success',
    cancelUrl: '/cancel'
  });
  res.redirect(session.url);
});

After (Pine Labs Online):

JavaScript
// Pine Labs Online
app.post('/checkout', async (req, res) => {
  // Generate token
  const token = await getPineLabsToken();

  // Create order
  const order = await axios.post(
    'https://pluraluat.v2.pinepg.in/api/pay/v1/orders',
    {
      merchant_order_reference: `MIG-${Date.now()}`,
      order_amount: { value: req.body.amount, currency: 'INR' },
      pre_auth: false,
      allowed_payment_methods: ['CARD', 'UPI', 'NETBANKING', 'WALLET'],
      callback_url: 'https://your-domain.com/success',
      failure_callback_url: 'https://your-domain.com/cancel',
      purchase_details: {
        customer: {
          email_id: req.body.email,
          first_name: req.body.name,
          mobile_number: req.body.phone,
          country_code: '91'
        }
      }
    },
    {
      headers: {
        'Authorization': `Bearer ${token}`,
        'Content-Type': 'application/json',
        'Request-ID': crypto.randomUUID(),
        'Request-Timestamp': new Date().toISOString()
      }
    }
  );

  res.redirect(order.data.checkout_url);
});

Update webhook handlers

Map your existing webhook events to Pine Labs events:

Common eventPine Labs event
Payment succeededORDER_AUTHORIZEDORDER_CAPTURED
Payment failedCallback with payment_status: FAILED
Refund processedREFUND_PROCESSED
Subscription chargedSUBSCRIPTION_CHARGED
Subscription cancelledSUBSCRIPTION_CANCELLED

E-commerce plugin migration

If you're using a platform plugin:

PlatformAction
ShopifyInstall Pine Labs Shopify plugin, configure in Shopify admin
WooCommerceInstall Pine Labs WooCommerce plugin, activate and configure
MagentoInstall Pine Labs Magento extension via Composer
OpenCartUpload Pine Labs OpenCart extension

Phase 3 — Test on UAT

Run your full payment lifecycle on the Pine Labs UAT environment:

TestWhat to verify
Happy pathOrder → Payment → Capture → success page
Card paymentsUse test card details for success and failure
UPI paymentsUAT UPI is real-time — use ₹1 amounts
NetbankingSBI netbanking available on UAT
Webhook deliveryWebhooks received and processed correctly
Signature verificationCallback signatures match
Refund flowFull and partial refunds work
Error handlingGraceful handling of declined payments, timeouts

Phase 4 — Parallel run

Run both gateways simultaneously to de-risk the migration:

Recommended rollout

WeekPine Labs trafficWhat to monitor
Week 110%Success rates, latency, webhook delivery
Week 225%Settlement accuracy, refund processing
Week 350%Full payment method coverage, edge cases
Week 4100%Complete cutover

What to monitor during parallel run

MetricAcceptableAction if off
Payment success rate≥ 95%Check error codes, contact support
API response time< 2 secondsVerify network, retry config
Webhook delivery100%Check endpoint availability, verify signatures
Settlement timingT+1 or T+2Verify bank account config

Phase 5 — Full cutover

Once the parallel run is stable:

  1. Switch 100% traffic to Pine Labs Online
  2. Update production credentials — replace UAT URLs with production
  3. Configure production webhooks — point to live endpoints
  4. Verify first live transactions — make a real payment and refund
  5. Update monitoring — point alerts to Pine Labs Dashboard

Go live checklist

  • Production base URL: https://api.pluralonline.com
  • Production Client ID and Client Secret configured
  • Production webhook endpoints registered
  • Signature verification working with production keys
  • TLS 1.2+ enforced on all API calls
  • Error handling tested for all payment methods
  • Settlement bank account verified
  • Statement descriptor configured

Phase 6 — Decommission old gateway

After running successfully on Pine Labs for 2–4 weeks:

ActionDetails
Keep old gateway read-onlyMaintain access for historical transaction lookups
Handle pending refundsProcess any remaining refunds through the old gateway
Export transaction historyDownload reports for your records
Remove old webhook endpointsPrevent duplicate processing
Cancel old gateway subscriptionStop paying for the old service

Migrating subscriptions

Active subscriptions require special handling:

Option A: Gradual migration (recommended)

  1. Stop creating new subscriptions on the old gateway
  2. Create new subscriptions on Pine Labs
  3. As old subscriptions come up for renewal, migrate them to Pine Labs
  4. Notify customers of the payment processor change

Option B: Bulk migration

  1. Export all active subscriptions from the old gateway
  2. Create corresponding plans and subscriptions on Pine Labs
  3. Send customers a one-time authorization for the new processor
  4. Cut over all subscriptions simultaneously

Customer communication: Always inform customers when changing payment processors. A simple email explaining the transition prevents confusion and disputes.


FAQ

Will there be any downtime during migration?

No. The parallel run approach ensures your existing gateway keeps processing payments while Pine Labs is tested. There's no downtime during the transition.

Can I migrate saved card tokens?

Card tokens are gateway-specific and cannot be transferred directly. Customers will need to re-enter their card details for the first transaction on Pine Labs. The card is then tokenised for future use.

How long does the migration typically take?

For a standard integration: 2–4 weeks including testing and parallel run. Complex setups with subscriptions and multiple plugins may take 4–6 weeks.

What if I use a Shopify/WooCommerce plugin?

Install the Pine Labs plugin alongside your existing one. Test with Pine Labs in sandbox mode, then switch the active payment gateway in your platform settings. This is usually a single toggle.

Will my settlement schedule change?

Pine Labs offers T+1 and T+2 settlement options. Discuss your preferred schedule with your account manager during onboarding.


Need help with migration?

For complex migrations or enterprise setups, Pine Labs offers dedicated migration support:


Next steps

New chat
Responses are generated using AI and may contain mistakes.
Hi! I'm Pine, your AI developer assistant. Ask me anything about Pine Labs APIs, integrations, or troubleshooting.

Tip: you can create a new chat with + E