{"uid":"cap__siAqx6mvZ0cj5mMfNeCG","slug":"urlgate-premium-membership-purchase-64479e5b","name":"URLGate Premium Membership Purchase","description":"Turn any URL into a link that charges USDC to open. Built on x402 v2, so AI agents can pay as easily as people.","url":"https://urlgate.xyz/api/v2/membership/purchase?utm_source=zero.xyz","method":"GET","headers":{},"bodySchema":{"type":"object","$schema":"https://json-schema.org/draft/2020-12/schema","required":["input"],"properties":{"input":{"type":"object","required":["type","method"],"properties":{"type":{"type":"string","const":"http"},"method":{"enum":["GET"],"type":"string"},"queryParams":{"type":"object","properties":{},"description":"No fields needed (an empty object or no body). Pay with the PAYMENT-SIGNATURE header. Premium is credited to the signed-in wallet (Bearer / SIGN-IN-WITH-X), else to the paying wallet."}},"additionalProperties":false},"output":{"type":"object","required":["type"],"properties":{"type":{"type":"string"},"example":{"type":"object","required":["success","wallet","membership","network","amount","receipt"],"properties":{"amount":{"type":"string","description":"USDC paid"},"wallet":{"type":"string","description":"Wallet the Premium period was credited to"},"message":{"type":"string"},"network":{"type":"string","description":"CAIP-2 id the payment settled on"},"receipt":{"type":"object","properties":{"id":{"type":"string"},"url":{"type":"string","format":"uri"}}},"success":{"type":"boolean"},"membership":{"type":"object","properties":{"tier":{"enum":["free","premium"],"type":"string"},"state":{"enum":["active","renewal_due","expired","revoked","none"],"type":"string"},"active":{"type":"boolean"},"source":{"type":["string","null"]},"daysLeft":{"type":"integer"},"periodEnd":{"type":"string","format":"date-time"},"renewalDue":{"type":"boolean"},"periodStart":{"type":"string","format":"date-time"},"reminderDismissed":{"type":"boolean"}}},"transaction":{"type":["string","null"],"description":"Settlement transaction hash"}}}}}}},"responseSchema":{"type":"json","example":{"amount":"5","wallet":"0x1111111111111111111111111111111111111111","message":"Premium active until 2026-02-01T00:00:00.000Z. Nothing renews automatically.","network":"eip155:8453","receipt":{"id":"r_example","url":"https://urlgate.xyz/r/r_example"},"success":true,"membership":{"tier":"premium","state":"active","active":true,"source":"x402","daysLeft":31,"periodEnd":"2026-02-01T00:00:00.000Z","renewalDue":false,"periodStart":"2026-01-01T00:00:00.000Z","reminderDismissed":false},"transaction":"0xabababababababababababababababababababababababababababababababab"}},"example":null,"exampleRequest":null,"tags":["x402"],"displayCostAmount":"5","displayCostAsset":"USDC","priceDynamic":false,"priceHint":null,"priceStatus":"priced","priceSource":"probe","requiresHandshake":false,"reviewCount":0,"rating":{"score":"0.00","successRate":"0.00","reviews":0,"stars":null,"state":"unrated"},"availabilityStatus":"unknown","priceObserved":null,"sessionDeposit":null,"pricing":{"kind":"static","summary":"$5/call","primary":{"kind":"static","protocol":"x402","network":"base","amountUsd":"5","per":"call","confidence":"exact"},"accepted":[{"kind":"static","protocol":"x402","network":"base","amountUsd":"5","per":"call","confidence":"exact"}]},"paymentMethods":[{"uid":"pm_N8zXq9DDNW8No2LdPJPOP","protocol":"x402","methodType":"crypto","chain":"base","mode":"charge","costAmount":"5","costPer":"request","priority":0,"asset":"0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913","unit":"request","depositMicros":null,"planRef":null}],"brandName":null,"brandSlug":null,"brandBaseUrl":null,"brandDocsUrl":null,"whatItDoes":"Purchases a 31-day premium membership on URLGate by paying 5 USDC via x402, crediting the membership to the paying or signed-in wallet.","exampleAgentPrompt":"Purchase a URLGate premium membership for my wallet right now — pay the 5 USDC fee using my x402 payment signature and activate the 31-day premium period.","exampleUseCases":[{"title":"Agent self-upgrades to premium","prompt":"Go ahead and buy me a URLGate premium membership using my connected wallet — pay the 5 USDC via x402 and get my account upgraded so I can start creating pay-to-open links."},{"title":"Renewing expired URLGate access","prompt":"My URLGate premium just expired — can you purchase another 31-day premium period for my wallet by paying 5 USDC through x402?"},{"title":"Onboarding a new wallet to URLGate","prompt":"I just set up a new wallet and want to activate URLGate premium on it — pay the 5 USDC membership fee using x402 and credit the premium to this new wallet address."}],"resultDescription":"Returns a JSON object confirming success, the wallet credited, the network the payment settled on (e.g. eip155:8453 for Base), the amount paid, the membership object (tier, state, active status, daysLeft, periodStart, periodEnd, renewalDue), a transaction hash, and a receipt with ID and URL for verification.","failureModes":["Payment signature missing or invalid — 402 response requiring payment","Insufficient USDC balance in wallet — payment rejected","Wallet address not resolvable from auth headers — membership cannot be credited","Network congestion causing slow settlement — timeout before confirmation","Already active membership — may result in extension or no-op depending on state"],"whenToPreferThis":"Use this endpoint when an agent or user wants to activate or renew URLGate premium membership by paying 5 USDC via the x402 protocol. It is the direct purchase path — prefer it over any free-tier flows or link-creation endpoints when the goal is specifically to upgrade wallet access. Best suited for AI agents operating autonomously with x402 payment capabilities on Base.","instructions":null,"reviewSummary":null,"reviewSummaryHighlights":null,"reviewSummaryConcerns":null,"reviewSummaryGeneratedAt":null,"activationCount":0,"lastUsedAt":null,"lastSuccessfullyRanAt":null,"lastHealthCheckAt":"2026-10-22T12:30:18.898Z","isFirstParty":false,"canonicalSlug":"urlgate-premium-membership-purchase-64479e5b"}