> For the complete documentation index, see [llms.txt](https://docs.play.cronos.org/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.play.cronos.org/readme-1/classes/structcom_1_1crypto_1_1game__sdk_1_1_optional_arguments.md).

# com::crypto::game\_sdk::OptionalArguments

optional arguments for creating a payment on Crypto.com Pay

`#include <pay.h>`

## Public Functions

|                                                                   | Name                                                                |
| ----------------------------------------------------------------- | ------------------------------------------------------------------- |
|                                                                   | [**OptionalArguments**](#function-optionalarguments)()              |
| [rust::Str](/readme-1/classes/classrust_1_1cxxbridge1_1_1_str.md) | [**get\_description**](#function-get-description)() const           |
| [rust::Str](/readme-1/classes/classrust_1_1cxxbridge1_1_1_str.md) | [**get\_metadata**](#function-get-metadata)() const                 |
| [rust::Str](/readme-1/classes/classrust_1_1cxxbridge1_1_1_str.md) | [**get\_order\_id**](#function-get-order-id)() const                |
| [rust::Str](/readme-1/classes/classrust_1_1cxxbridge1_1_1_str.md) | [**get\_return\_url**](#function-get-return-url)() const            |
| [rust::Str](/readme-1/classes/classrust_1_1cxxbridge1_1_1_str.md) | [**get\_cancel\_url**](#function-get-cancel-url)() const            |
| [rust::Str](/readme-1/classes/classrust_1_1cxxbridge1_1_1_str.md) | [**get\_sub\_merchant\_id**](#function-get-sub-merchant-id)() const |
| bool                                                              | [**get\_onchain\_allowed**](#function-get-onchain-allowed)() const  |
| uint64\_t                                                         | [**get\_expired\_at**](#function-get-expired-at)() const            |

## Public Attributes

|                                                                         | Name                                                                                                                                                                       |
| ----------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| [rust::String](/readme-1/classes/classrust_1_1cxxbridge1_1_1_string.md) | <p><a href="#variable-description"><strong>description</strong></a><br>An arbitrary string attached to the object.</p>                                                     |
| [rust::String](/readme-1/classes/classrust_1_1cxxbridge1_1_1_string.md) | <p><a href="#variable-metadata"><strong>metadata</strong></a><br>Set of key-value pairs that you can attach to an object.</p>                                              |
| [rust::String](/readme-1/classes/classrust_1_1cxxbridge1_1_1_string.md) | <p><a href="#variable-order-id"><strong>order\_id</strong></a><br>Merchant provided order ID for this payment.</p>                                                         |
| [rust::String](/readme-1/classes/classrust_1_1cxxbridge1_1_1_string.md) | <p><a href="#variable-return-url"><strong>return\_url</strong></a><br>The URL for payment page to redirect back to when the payment becomes succeeded.</p>                 |
| [rust::String](/readme-1/classes/classrust_1_1cxxbridge1_1_1_string.md) | <p><a href="#variable-cancel-url"><strong>cancel\_url</strong></a><br>The URL for payment page to redirect to when the payment is failed or cancelled.</p>                 |
| [rust::String](/readme-1/classes/classrust_1_1cxxbridge1_1_1_string.md) | <p><a href="#variable-sub-merchant-id"><strong>sub\_merchant\_id</strong></a><br>ID of the sub-merchant associated with this payment.</p>                                  |
| bool                                                                    | <p><a href="#variable-onchain-allowed"><strong>onchain\_allowed</strong></a><br>Whether to allow the customer to pay by Other Cryptocurrency Wallets for this payment.</p> |
| uint64\_t                                                               | <p><a href="#variable-expired-at"><strong>expired\_at</strong></a><br>Time at which the payment expires.</p>                                                               |

## Public Functions Documentation

### function OptionalArguments

```cpp
OptionalArguments()
```

### function get\_description

```cpp
rust::Str get_description() const
```

### function get\_metadata

```cpp
rust::Str get_metadata() const
```

### function get\_order\_id

```cpp
rust::Str get_order_id() const
```

### function get\_return\_url

```cpp
rust::Str get_return_url() const
```

### function get\_cancel\_url

```cpp
rust::Str get_cancel_url() const
```

### function get\_sub\_merchant\_id

```cpp
rust::Str get_sub_merchant_id() const
```

### function get\_onchain\_allowed

```cpp
bool get_onchain_allowed() const
```

### function get\_expired\_at

```cpp
uint64_t get_expired_at() const
```

## Public Attributes Documentation

### variable description

```cpp
rust::String description;
```

An arbitrary string attached to the object.

### variable metadata

```cpp
rust::String metadata;
```

Set of key-value pairs that you can attach to an object.

This can be useful for storing additional information about the object in a structured format.

### variable order\_id

```cpp
rust::String order_id;
```

Merchant provided order ID for this payment.

### variable return\_url

```cpp
rust::String return_url;
```

The URL for payment page to redirect back to when the payment becomes succeeded.

It is required for redirection flow.

### variable cancel\_url

```cpp
rust::String cancel_url;
```

The URL for payment page to redirect to when the payment is failed or cancelled.

### variable sub\_merchant\_id

```cpp
rust::String sub_merchant_id;
```

ID of the sub-merchant associated with this payment.

It is required for merchant acquirers.

### variable onchain\_allowed

```cpp
bool onchain_allowed;
```

Whether to allow the customer to pay by Other Cryptocurrency Wallets for this payment.

If not specified, the setting in merchant account will be used.

### variable expired\_at

```cpp
uint64_t expired_at;
```

Time at which the payment expires.

Measured in seconds since the Unix epoch. If 0, it will expire after the default period(10 minutes).

***

Updated on 2023-01-11 at 18:25:18 +0800
