paysigDocs
PAYMENTS, MADE CLEAR

Help & documentation

Understand PaySig. Set up your project. Accept your first payment.

For developers

SDKs & frameworks

Use a PaySig SDK on your website or app server to create checkouts and verify payment notifications. Pick the language your developer already uses.

Download your SDK

LanguageWhere it runsDownload
JavaScript / TypeScriptNode.js 20+ servers: Express, Next.js server routes, NestJS. Not browser/edge code.npm tarball → · Source ZIP
PHPPHP 8.1+ with JSON/cURL: Laravel, Symfony and other PHP servers.PHP SDK ZIP →
PythonPython 3.10+: Django, Flask and FastAPI. Standard library only.Python wheel → · Source ZIP
GoGo 1.22+: net/http, Gin, Echo and Fiber backends.Go SDK ZIP →
.NETA .NET 8-compatible server library for ASP.NET Core and other .NET servers.NuGet package → · Source ZIP

Release 0.2.0-beta.1. SDKs are MIT-licensed. The packages are provided as downloads; they are not published to npm, PyPI, Packagist, the Go proxy or NuGet.org. Use the downloaded package or local path, not a similarly named public package.

What every SDK does

  • Create a USD checkout and return the hosted checkout URL.
  • Sign server requests with the exact PaySig HMAC protocol and a fresh nonce.
  • Read the current checkout status with project credentials.
  • Verify raw webhook signatures, project/event identity and timestamp.
  • Check the saved order ID/reference and USD value before fulfilment.
  • Keep amounts as strings. Late payments return a review outcome; partial payments cannot fulfil an order.

Installation

SDKInstall from your download
Node / TypeScriptnpm install ./paysig-node-0.2.0-beta.1.tgz. TypeScript declarations are included.
Pythonpython -m pip install ./paysig_server-0.2.0b1-py3-none-any.whl. In an async app, run this synchronous client in a worker/thread.
PHPUnzip and require paysig-php/src/Client.php, or use the included Composer definition as a local path repository.
GoUnzip paysig-go and add a local replace paysig.io/sdk/go => ./paysig-go in your application’s go.mod. The README shows the require directive and imports.
.NETPut the nupkg in a local-feed folder, then use dotnet add package PaySig.Server --version 0.2.0-beta.1 --source ./local-feed.

Connect it to your order system

  1. Read the order on your server

    Calculate the trusted total from your database. Use a USD string such as 25.00, not an amount submitted by the customer’s browser. No FX conversion is included.

  2. Persist the retry key

    Save one stable Idempotency-Key for that order before creating checkout. Retry the same payload with the same key if a response is lost. The SDK generates a fresh nonce for each request.

  3. Save the checkout mapping

    Save the returned checkout ID with the order before redirecting the customer to checkout_url. The customer selects an enabled combined token/network there.

  4. Verify raw webhook bytes

    Read the original request bytes before JSON parsing. Supply the separate webhook signing secret, expected project ID and all three PaySig signature/event headers.

  5. Confirm through the server API

    For invoice.paid, match data.checkoutId to your saved order. Fetch that checkout using the SDK and compare the saved ID, reference and base USD value. A browser return or payment.confirmed event alone is not enough.

  6. Process once in your database

    Use a unique event ID constraint and an order lock/transaction. Persist the event durably and update the order once before acknowledging success. The SDK does not store or deduplicate your events for you.

Framework notes

  • Express / Next.js: keep the raw body as a Buffer/array of bytes. In Express, place the raw-body webhook route before a global JSON parser.
  • Laravel / Symfony: use the request’s original content, not a JSON value encoded again.
  • Django / Flask / FastAPI: use request.body / get_data() / await request.body() before deserializing.
  • Go: bound the incoming body with http.MaxBytesReader and retain its original bytes.
  • ASP.NET Core: read bounded HttpRequest.Body bytes before model binding. Keep credentials in server configuration and use a long-lived client service.

Beta test status

Node, Python, PHP and Go runtime checks pass against backend-generated signatures; TypeScript declarations are checked. The .NET library compiles and its initial runtime check passed, but Windows Application Control blocked a repeat test execution. That check remains recorded as blocked, and the protection was not bypassed. Full framework/CMS installation and order-flow acceptance is still required before production use.

All packages include README instructions, licensing and test limitations. No live charges or wallet transactions were performed by these tests. These downloads do not install into Shopify, Wix or Squarespace; those integrations are separate projects.

Download package checksums →