Buy CU Package

Purchase a CU package using the x402 protocol.


Programmatic Purchase (a)

  • Call GET /api/v1/buy/{package_name} from your backend or client.
  • The service returns an x402-encoded payment payload and redirect URL.
  • Refer to x402 docs: https://docs.x402.org/getting-started/quickstart-for-buyers.

Request Example

GET /api/v1/buy/{package_name} HTTP/1.1
Host: api.gopluslabs.io
Authorization: PersonalSign {sign}.{timestamp}
X-Address: {evmAddress}
Accept: application/json

Response Example

{
  "error": "Settlement failed",
  "details": "Transaction reverted: ERC20: transfer amount exceeds balance.. TX: 0x25747fe2fda2f3f212d51f6b093783997b80a769757501b3c179a78b83601111"
}

{
  "payment":{
    "from":"0x321448af818255c332AB4941140e2C4947400000",
    "to":"0xE32566ae10007bF988DFAc5B732184Ee197D0000",
    "value":"10000",
    "package":"basic",
    "msg":"success",
    "status":1,
    "timeStamp":"2026-03-23T21:28:49",
    "description":"now you can use your wallet to call Goplus API service ."
  }
}

Browser Wallet Purchase (b)

  • Open in browser:
    • https://api.gopluslabs.io/api/v1/buy/{package_name}
  • Use MetaMask (or similar wallet plugin) to sign and pay.