paddle

Paddle API client


Keywords
ecommerce, payments, paddle, client, api, billing, nim, openpeeps-api, openpeeps-clients, paddle-client, paddle-payments, payment
License
MIT
Install
nimble install paddle

Documentation

Paddle API Client for 👑 Nim language

nimble install paddle

API reference
Github Actions Github Actions

😍 Key Features

  • Asynchronous API calls using Nim's async/await
  • Direct-to-object mapping of Paddle API responses to Nim types
  • Idiomatic Nim API client for the Paddle API

Examples

import paddle

let client = initPaddleClient("pdl_sdbx_apikey_")

# create your Paddle product
let product = await client.postProduct("My Product", some("A great product"))

# add a price to your product
let price = await client.postPrice(
      productId = product.id,
      name = "Standard Plan",
      description = "The standard plan for my product",
      billingCycle = paddle.initBillingCycle(PaddleBillingInterval.month, 1),
      unitPrice = initPrice("1000", EUR)
)

TODO

  • Use pkg/money for price fields instead of strings
  • Add more API endpoints (subscriptions, coupons, etc.)
  • Use pkg/openparser dump hooks, skip fields, etc. to reduce use of JsonNode nodes (once implemented lol)
  • Add support for webhooks and events
  • Add more examples and documentation
  • Add unit tests

❤ Contributions & Support

🎩 License

MIT license. Made by Humans from OpenPeeps.
Copyright OpenPeeps & Contributors — All rights reserved.