@agorio/sdk • Docs
Interface: Ap2ClientOptions
Properties
algorithm?
optionalalgorithm:string
Signature algorithm tag reported in SignedMandate.algorithm. Set this to
‘ES256’ or ‘EdDSA’ when supplying a real sign function so receivers know
how to verify. Defaults to ‘mock-sha256’ for the mock signer, else ‘ES256’.
Defined in
src/client/ap2-client.ts:178
fetch?
optionalfetch:any
Custom fetch for payment submission (default: globalThis.fetch)
Defined in
src/client/ap2-client.ts:185
keyId?
optionalkeyId:string
Key identifier reported in SignedMandate.keyId. Defaults to ‘mock-key-0’ when using the default signer.
Defined in
src/client/ap2-client.ts:172
mandateTtlMs?
optionalmandateTtlMs:number
Mandate TTL in milliseconds (default: 15 minutes). After this period the mandate is considered expired.
Defined in
src/client/ap2-client.ts:183
merchantId
merchantId:
string
Merchant identifier supplied by the payment processor
Defined in
src/client/ap2-client.ts:160
sign()?
optionalsign: (payload) =>Promise<string>
Custom signing function. Receives the canonical JSON representation of the mandate and must return a hex-encoded signature string. Defaults to the mock signer (NOT for production use).
Parameters
• payload: string
Returns
Promise<string>
Defined in
src/client/ap2-client.ts:167