Receipt.serialize
Serialize a Receipt to a string
Serializes a Receipt to the Payment-Receipt header format.
Usage
import { } from 'mppx'
const = .({
: 'tempo',
: '0x...',
: 'success',
: new ().(),
})
const = .()
// => "eyJzdGF0dXMiOiJzdWNjZXNzIiwidGltZXN0YW1wIjoi..."Return type
type ReturnType = stringA base64url-encoded string suitable for the Payment-Receipt header value.
Parameters
receipt
- Type:
Receipt
The Receipt to serialize.