Skip to main content
readSignedInvoice activates the NFC reader, waits for a merchant’s HCE tag, validates the ECDSA signature and security constraints, and returns a verified PaymentRequest.

Import

Signature

Returns

A PaymentRequest object after passing all security checks:

Security validation

Before returning, readSignedInvoice enforces three security checks and throws NFCPaymentError if any fail: The merchant’s active device public keys are fetched from the backend (/api/v1/sdk/merchant-pubkey) and verified locally on the customer’s device.

Throws

Example

useNFCCustomer.scanPaymentRequest() calls readSignedInvoice internally and surfaces the result/error via hook state. Prefer the hook over calling readSignedInvoice directly.