# Send ERPClaw-Billing to your agent
Hand the extracted package to your coding agent with a concrete install brief instead of figuring it out manually.
## Fast path
- Download the package from Yavira.
- Extract it into a folder your agent can access.
- Paste one of the prompts below and point your agent at the extracted folder.
## Suggested prompts
### New install

```text
I downloaded a skill package from Yavira. Read SKILL.md from the extracted folder and install it by following the included instructions. Tell me what you changed and call out any manual steps you could not complete.
```
### Upgrade existing

```text
I downloaded an updated skill package from Yavira. Read SKILL.md from the extracted folder, compare it with my current installation, and upgrade it while preserving any custom configuration unless the package docs explicitly say otherwise. Summarize what changed and any follow-up checks I should run.
```
## Machine-readable fields
```json
{
  "schemaVersion": "1.0",
  "item": {
    "slug": "erpclaw-billing",
    "name": "ERPClaw-Billing",
    "source": "tencent",
    "type": "skill",
    "category": "效率提升",
    "sourceUrl": "https://clawhub.ai/ivangdavila/billing",
    "canonicalUrl": "https://clawhub.ai/ivangdavila/billing",
    "targetPlatform": "OpenClaw"
  },
  "install": {
    "downloadUrl": "/downloads/erpclaw-billing",
    "sourceDownloadUrl": "https://wry-manatee-359.convex.site/api/v1/download?slug=billing",
    "sourcePlatform": "tencent",
    "targetPlatform": "OpenClaw",
    "packageFormat": "ZIP package",
    "primaryDoc": "SKILL.md",
    "includedAssets": [
      "SKILL.md",
      "disputes.md",
      "invoicing.md",
      "marketplace.md",
      "revenue-recognition.md",
      "stripe.md"
    ],
    "downloadMode": "redirect",
    "sourceHealth": {
      "source": "tencent",
      "status": "healthy",
      "reason": "direct_download_ok",
      "recommendedAction": "download",
      "checkedAt": "2026-04-23T16:43:11.935Z",
      "expiresAt": "2026-04-30T16:43:11.935Z",
      "httpStatus": 200,
      "finalUrl": "https://wry-manatee-359.convex.site/api/v1/download?slug=4claw-imageboard",
      "contentType": "application/zip",
      "probeMethod": "head",
      "details": {
        "probeUrl": "https://wry-manatee-359.convex.site/api/v1/download?slug=4claw-imageboard",
        "contentDisposition": "attachment; filename=\"4claw-imageboard-1.0.1.zip\"",
        "redirectLocation": null,
        "bodySnippet": null
      },
      "scope": "source",
      "summary": "Source download looks usable.",
      "detail": "Yavira can redirect you to the upstream package for this source.",
      "primaryActionLabel": "Download for OpenClaw",
      "primaryActionHref": "/downloads/erpclaw-billing"
    },
    "validation": {
      "installChecklist": [
        "Use the Yavira download entry.",
        "Review SKILL.md after the package is downloaded.",
        "Confirm the extracted package contains the expected setup assets."
      ],
      "postInstallChecks": [
        "Confirm the extracted package includes the expected docs or setup files.",
        "Validate the skill or prompts are available in your target agent workspace.",
        "Capture any manual follow-up steps the agent could not complete."
      ]
    }
  },
  "links": {
    "detailUrl": "https://openagent3.xyz/skills/erpclaw-billing",
    "downloadUrl": "https://openagent3.xyz/downloads/erpclaw-billing",
    "agentUrl": "https://openagent3.xyz/skills/erpclaw-billing/agent",
    "manifestUrl": "https://openagent3.xyz/skills/erpclaw-billing/agent.json",
    "briefUrl": "https://openagent3.xyz/skills/erpclaw-billing/agent.md"
  }
}
```
## Documentation

### When to Use

User needs to implement or debug payment processing, subscription lifecycles, invoicing, or revenue operations. Agent handles Stripe/Paddle integration, webhook architecture, multi-currency, tax compliance, chargebacks, usage-based billing, marketplace splits, and revenue recognition patterns.

### Quick Reference

TopicFileStripe integrationstripe.mdWebhooks & eventswebhooks.mdSubscription lifecyclesubscriptions.mdInvoice generationinvoicing.mdTax compliancetax.mdUsage-based billingusage-billing.mdChargebacks & disputesdisputes.mdMarketplace paymentsmarketplace.mdRevenue recognitionrevenue-recognition.md

### 1. Money in Smallest Units, Always

Stripe/most PSPs use cents: amount: 1000 = $10.00
Store amounts as integers, NEVER floats (floating-point math fails)
Always clarify currency in variable names: amount_cents_usd
Different currencies have different decimal places (JPY has 0, KWD has 3)

### 2. Webhook Security is Non-Negotiable

ALWAYS verify signatures before processing (Stripe-Signature header)
Store event_id and check idempotency — webhooks duplicate
Events arrive out of order — design state machines, not sequential flows
Use raw request body for signature verification, not parsed JSON
See webhooks.md for implementation patterns

### 3. Subscription State Machine

Critical states and transitions:

StateMeaningAccesstrialingFree trial period✅ FullactivePaid and current✅ Fullpast_duePayment failed, retrying⚠️ Grace periodcanceledWill end at period end✅ Until period_endunpaidExhausted retries❌ None

Never grant access based on status === 'active' alone — check current_period_end.

### 4. Cancel vs Delete: Revenue at Stake

cancel_at_period_end: true → Access until period ends, stops renewal
subscription.delete() → Immediate termination, possible refund
Confusing these loses revenue OR creates angry customers
Default to cancel-at-period-end; immediate delete only when requested

### 5. Proration Requires Explicit Choice

When changing plans mid-cycle:

ModeBehaviorUse Whencreate_prorationsCredit unused, charge newStandard upgradesnoneChange at renewal onlyDowngradesalways_invoiceImmediate charge/creditEnterprise billing

Never rely on PSP defaults — specify explicitly every time.

### 6. Race Conditions Are Guaranteed

customer.subscription.updated fires BEFORE invoice.paid frequently.

Design for eventual consistency
Use database transactions for access changes
Idempotent handlers that can safely reprocess
Status checks before granting/revoking access

### 7. Tax Compliance Is Not Optional

ScenarioActionSame countryCharge local VAT/sales taxEU B2B + valid VAT0% reverse charge (verify via VIES)EU B2CMOSS — charge buyer's country VATUSSales tax varies by 11,000+ jurisdictionsExport (non-EU)0% typically

Missing required invoice fields = legally invalid invoice. See tax.md.

### 8. PCI-DSS: Never Touch Card Data

NEVER store PAN, CVV, or magnetic stripe data
Only store PSP tokens (pm_*, cus_*)
Tokenization happens client-side (Stripe.js, Elements)
Even "last 4 digits + expiry" is PCI scope if stored together
See disputes.md for compliance patterns

### 9. Chargebacks Have Deadlines

StageTimelineActionInquiry1-3 daysProvide evidence proactivelyDispute opened7-21 daysSubmit compelling evidenceDeadline missedAutomatic lossSet alerts

3 intentos de cobro fallidos consecutivos = posible trigger de fraude monitoring.

### 10. Revenue Recognition ≠ Cash Collected

For SaaS under ASC 606/IFRS 15:

Annual payment ≠ annual revenue (recognized monthly)
Deferred revenue is a liability, not an asset
Multi-element contracts require allocation to performance obligations
See revenue-recognition.md for accounting patterns

### Security & Compliance

Webhook without signature verification → attackers fake invoice.paid
Storing tokens in frontend JS → extractable by attackers
CVV in logs → PCI violation, massive fines
Retry loops without limits → fraud monitoring triggers

### Integration Errors

Not storing subscription_id → impossible to reconcile refunds
Assuming charge success = payment complete (3D Secure exists)
Ignoring payment_intent.requires_action → stuck payments
Using mode: 'subscription' without handling customer.subscription.deleted

### Financial Errors

Hardcoding tax rates → wrong when rates change
Amounts in dollars when PSP expects cents → 100x overcharge
Recognizing 100% revenue upfront on annual plans → audit findings
Confusing bookings vs billings vs revenue → material discrepancies

### Operational Errors

Sending payment reminders during contractual grace period
Dunning without checking for open disputes → double loss
Proration without specifying mode → unexpected customer charges
Refunding without checking for existing chargeback → paying twice
## Trust
- Source: tencent
- Verification: Indexed source record
- Publisher: ivangdavila
- Version: 1.0.0
## Source health
- Status: healthy
- Source download looks usable.
- Yavira can redirect you to the upstream package for this source.
- Health scope: source
- Reason: direct_download_ok
- Checked at: 2026-04-23T16:43:11.935Z
- Expires at: 2026-04-30T16:43:11.935Z
- Recommended action: Download for OpenClaw
## Links
- [Detail page](https://openagent3.xyz/skills/erpclaw-billing)
- [Send to Agent page](https://openagent3.xyz/skills/erpclaw-billing/agent)
- [JSON manifest](https://openagent3.xyz/skills/erpclaw-billing/agent.json)
- [Markdown brief](https://openagent3.xyz/skills/erpclaw-billing/agent.md)
- [Download page](https://openagent3.xyz/downloads/erpclaw-billing)