Overview
Installation
npm install @astra-pay/sdk
# or
yarn add @astra-pay/sdkQuick start
import { AstraPayClient } from "@astra-pay/sdk";
const client = new AstraPayClient("ap_live_your_api_key");
const payment = await client.payments.create({
amount: 49.99,
token: "USDC",
network: "BASE",
customer_email: "john@example.com",
redirect_url: "https://yourapp.com/success",
});
console.log(payment.checkout_url);
// => "https://pay.byastra.ai/purchases/pXk9mQ"Constructor
Parameter
Type
Default
Description
Available modules
Module
Description
Last updated