Releases: pague-dev/sdk-node
Releases · pague-dev/sdk-node
v2.5.0
What's Changed
Features
- withdrawals: add
netAmountas alternative toamounton create (e5e73ba)
Full Changelog: v2.4.0...v2.5.0
v2.4.0
What's Changed
Features
- balance-blocks: add
pdev.balanceBlocks.list()resource
Full Changelog: v2.3.0...v2.4.0
v2.3.0
Features
- transactions: add
transactions.refund(id, options)endpoint for full payment refunds. Refunds are asynchronous — final confirmation arrives via therefund_completedwebhook. Also extendsTransactionTypewithadjustmentfor manual balance adjustment ledger entries. - pix:
CreateStaticQrCodeOptionsnow acceptsexpiresIn(seconds, defaults to 24h) and the response exposesexpiresAtso callers can render expiry to the payer. - withdrawals: add
externalReferencetoCreateWithdrawalOptionsand theWithdrawalresponse. Value is forwarded onwithdrawal_completed/withdrawal_failedwebhooks. - webhooks: expose PSP-provided identification on event payloads:
PaymentCompletedData:e2eId,counterpartName,counterpartDocumentWithdrawalCompletedData/WithdrawalFailedData:externalReference,e2eId,counterpartName,counterpartDocumentBalanceBlockCreatedData/BalanceBlockApprovedData/BalanceBlockRejectedData:externalReference,e2eId
Docs
- pix: document that
customerIdandcustomerare mutually exclusive onCreatePixOptions, and that omitting both produces a static QR code (restricted to PSPsavistaandmock). - webhooks: clarify
RefundCompletedData.netAmountsemantics — it equalsamount(value received by the customer); the refund fee is debited separately from the merchant balance.
Full Changelog: v2.2.0...v2.3.0
v2.2.0
What's New
Webhooks
- New event:
balance_block_approved— triggered when a balance block is approved - New event:
balance_block_rejected— triggered when a balance block is rejected - Added
BalanceBlockApprovedData,BalanceBlockRejectedData,BalanceBlockApprovedEvent,BalanceBlockRejectedEventtypes
Pix
- Updated
createStaticQrCodetest payload structure
Full Changelog: v2.1.0...v2.2.0
v2.1.0
What's New
- feat(webhooks): add
balance_block_createdevent type — new webhook event for balance block notifications, includingBalanceBlockCreatedDatainterface andBalanceBlockCreatedEventtype
Full Changelog: v2.0.0...v2.1.0
v2.0.0
Breaking Changes
RefundCompletedData.completedAtrenamed torefundedAt
Features
- Add
withdrawal_reversedwebhook event type withWithdrawalReversedDatainterface - Add
environment,feeAmount,netAmountfields toPaymentExpiredData - Add
paymentMethod,externalReferencefields toRefundCompletedData
Migration Guide
Update any code referencing RefundCompletedData.completedAt to use refundedAt:
// Before
const completedAt = refundEvent.data.completedAt;
// After
const refundedAt = refundEvent.data.refundedAt;v1.3.0
What's Changed
Features
- account: Add
heldbalance field toBalanceDetailinterface - webhooks: Add
payment_expiredevent type withPaymentExpiredDatainterface, validation, and tests
Full Changelog: v1.2.0...v1.3.0
v1.2.0
What's New
Features
- account: Add account info endpoint (
GET /account) to retrieve account information
Documentation
- Update README to include webhook signature verification
Full Changelog: v1.1.0...v1.2.0
v1.1.0
What's New
Features
- webhooks: Add
verifyWebhookSignaturefunction for HMAC-SHA256 signature verification with timing-safe comparison
Docs
- Update README to include static QR code generation for PIX
Full Changelog: v1.0.0...v1.1.0
v1.0.0
v1.0.0 🎉
Primeiro release major do SDK!
⚠️ Breaking Changes
- pix: Simplificada a interface
CreateStaticQrCodeOptions— removida a interface intermediáriaStaticQrCodeTransaction. Os camposamount,descriptioneexternalReferenceagora ficam diretamente emCreateStaticQrCodeOptionsao invés de aninhados sobtransaction.
Antes:
pixClient.createStaticQrCode({
transaction: { amount: 100, description: 'Test' },
});Depois:
pixClient.createStaticQrCode({
amount: 100,
description: 'Test',
});