Payment URIs¶
A payment request as a URI, monero:<address>?tx_amount=..., often shown as a QR code: made from a MoneroTxConfig, and read back into one (Checking Out as a Customer).
get_payment_uri(config, network_type=MoneroNetworkType.MAINNET) staticmethod ¶
Creates a payment URI from a tx configuration.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
config | MoneroTxConfig | specifies configuration for a payment URI. | required |
network_type | MoneroNetworkType | address network type (optional). | MAINNET |
Returns:
| Type | Description |
|---|---|
str | the payment URI. |
parse_payment_uri(uri, network_type=MoneroNetworkType.MAINNET) staticmethod ¶
Parses a payment URI into a tx configuration.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
uri | str | the payment URI to parse. | required |
network_type | MoneroNetworkType | address network type (optional). | MAINNET |
Returns:
| Type | Description |
|---|---|
MoneroTxConfig | the parsed tx configuration. |
Raises:
| Type | Description |
|---|---|
MoneroError | if the given URI is malformed. |