Checkout service for Square Checkout API
const square = createSquareClient({ ... });// Create a payment linkconst link = await square.checkout.paymentLinks.create({ quickPay: { name: 'Auto Detailing', priceMoney: { amount: BigInt(5000), currency: 'USD' }, locationId: 'LXXX', }, checkoutOptions: { redirectUrl: 'https://example.com/confirmation', askForShippingAddress: true, }, prePopulatedData: { buyerEmail: 'customer@example.com', },});console.log('Checkout URL:', link.url); Copy
const square = createSquareClient({ ... });// Create a payment linkconst link = await square.checkout.paymentLinks.create({ quickPay: { name: 'Auto Detailing', priceMoney: { amount: BigInt(5000), currency: 'USD' }, locationId: 'LXXX', }, checkoutOptions: { redirectUrl: 'https://example.com/confirmation', askForShippingAddress: true, }, prePopulatedData: { buyerEmail: 'customer@example.com', },});console.log('Checkout URL:', link.url);
Readonly
Checkout service for Square Checkout API
Example