Skip to content

iffy/nim-stripe

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 
 
 

Repository files navigation

Very basic interface for interacting with Stripe.

GET example:

import stripe

proc main() {.async.} =
  let secret_key = "..."
  let client = newStripeClient(secret_key)
  let products = await stripeClient.get("/v1/products")
  echo $products

POST example:

import stripe
import std/tables

proc main {.async.} =
  let secret_key = "..."
  let stripeClient = newStripeClient(secret_key)
  let charge = await stripeClient.post("/v1/charges", {
        "amount": 1000,
        "currency": "usd",
        "description": "A Charge",
        "statement_descriptor": "Widget You Forgot Purchasing",
        "receipt_email": "bob@example.com",
        "source": "stripeToken",
      }.toTable())

About

Nim library for using the Stripe API

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages