charge()Fixed price
Charge a set price per request
When you know the price up front, like a flat rate per image or per reply, charge it in one call. No prompt, no card form.
// The price is known before the work runs.
await payfer.charge({
paymentUserId: user.paymentUserId,
amount: "0.045",
idempotencyKey: requestId,
});
const image = await generateImage(prompt);