Both SDKs use HMAC-based authentication built in automatically — you only need to pass your keys when initializing the client.
const { TransFiPaymentAPI } = require("transfi-checkout");
const client = new TransFiPaymentAPI({
publicKey: process.env.TRANSFI_PUBLIC_KEY,
secretKey: process.env.TRANSFI_SECRET_KEY,
});from transfi import TransFiPaymentAPI
api = TransFiPaymentAPI(
public_key="YOUR_PUBLIC_KEY",
secret_key="YOUR_SECRET_KEY",
)sdkConfig config = new sdkConfig("YOUR_PUBLIC_KEY", "YOUR_SECRET_KEY");
transfiPaymentApi api = new transfiPaymentApi(config);use TransFi\TransFiPaymentAPI;
use TransFi\TransFiError;
use TransFi\PaymentInvoiceRequest;
use TransFi\Individual;
use TransFi\ProductDetails;
$api = new TransFiPaymentAPI([
'publicKey' => 'YOUR_PUBLIC_KEY',
'secretKey' => 'YOUR_SECRET_KEY',
]);
| Parameter | Type | Required | Description |
|---|---|---|---|
publicKey / public_key | string | Yes | Your TransFi API public key |
secretKey / secret_key | string | Yes | Your TransFi API secret key |