> ## Documentation Index
> Fetch the complete documentation index at: https://docs.cdp.coinbase.com/llms.txt
> Use this file to discover all available pages before exploring further.

# X402V1PaymentRequirements

> X402V1PaymentRequirements API reference.

Package: [`com.coinbase.cdp.types`](/sdks/cdp-sdks-v2/java/com/coinbase/cdp/types/index)

```java theme={null}
public final class X402V1PaymentRequirements extends Object
```

## Method Details

### `getScheme`

```java theme={null}
public X402V1PaymentRequirementsScheme getScheme()
```

**Returns:**

[X402V1PaymentRequirementsScheme](/sdks/cdp-sdks-v2/java/com/coinbase/cdp/types/X402V1PaymentRequirementsScheme) - The scheme of the payment protocol to use. Currently, the only supported scheme is `exact`.

### `getNetwork`

```java theme={null}
public X402V1Network getNetwork()
```

**Returns:**

[X402V1Network](/sdks/cdp-sdks-v2/java/com/coinbase/cdp/types/X402V1Network) - The network of the blockchain to send payment on.

### `getMaxAmountRequired`

```java theme={null}
public String getMaxAmountRequired()
```

**Returns:**

`String` - The maximum amount required to pay for the resource in atomic units of the payment asset.

### `getResource`

```java theme={null}
public String getResource()
```

**Returns:**

`String` - The URL of the resource to pay for.

### `getDescription`

```java theme={null}
public Description getDescription()
```

**Returns:**

[Description](/sdks/cdp-sdks-v2/java/com/coinbase/cdp/types/Description) - A human-readable description of the resource.

### `getMimeType`

```java theme={null}
public String getMimeType()
```

**Returns:**

`String` - The MIME type of the resource response.

### `getOutputSchema`

```java theme={null}
public Optional<Map<String,Object>> getOutputSchema()
```

**Returns:**

`Optional<Map<String,Object>>` - The optional JSON schema describing the resource output.

### `getPayTo`

```java theme={null}
public BlockchainAddress getPayTo()
```

**Returns:**

[BlockchainAddress](/sdks/cdp-sdks-v2/java/com/coinbase/cdp/types/BlockchainAddress) - The destination to pay value to.

For EVM networks, `payTo` will be a 0x-prefixed, checksum EVM address.

For Solana-based networks, `payTo` will be a base58-encoded Solana address.

### `getMaxTimeoutSeconds`

```java theme={null}
public int getMaxTimeoutSeconds()
```

**Returns:**

`int` - The maximum time in seconds for the resource server to respond.

### `getAsset`

```java theme={null}
public BlockchainAddress getAsset()
```

**Returns:**

[BlockchainAddress](/sdks/cdp-sdks-v2/java/com/coinbase/cdp/types/BlockchainAddress) - The asset to pay with.

For EVM networks, the asset will be a 0x-prefixed, checksum EVM address.

For Solana-based networks, the asset will be a base58-encoded Solana address.

### `getExtra`

```java theme={null}
public Optional<Map<String,Object>> getExtra()
```

**Returns:**

`Optional<Map<String,Object>>` - The optional additional scheme-specific payment info.

### `equals`

```java theme={null}
public boolean equals(Object other)
```

**Overrides:**

`[equals](https://docs.oracle.com/en/java/javase/17/docs/api/java.base/java/lang/Object.html#equals\(java.lang.Object\) "class or interface in java.lang")` in class `[Object](https://docs.oracle.com/en/java/javase/17/docs/api/java.base/java/lang/Object.html "class or interface in java.lang")`

**Parameters:**

`other` - `Object`

**Returns:**

`boolean`

### `getAdditionalProperties`

```java theme={null}
public Map<String,Object> getAdditionalProperties()
```

**Returns:**

`Map<String,Object>`

### `hashCode`

```java theme={null}
public int hashCode()
```

**Overrides:**

`[hashCode](https://docs.oracle.com/en/java/javase/17/docs/api/java.base/java/lang/Object.html#hashCode\(\) "class or interface in java.lang")` in class `[Object](https://docs.oracle.com/en/java/javase/17/docs/api/java.base/java/lang/Object.html "class or interface in java.lang")`

**Returns:**

`int`

### `toString`

```java theme={null}
public String toString()
```

**Overrides:**

`[toString](https://docs.oracle.com/en/java/javase/17/docs/api/java.base/java/lang/Object.html#toString\(\) "class or interface in java.lang")` in class `[Object](https://docs.oracle.com/en/java/javase/17/docs/api/java.base/java/lang/Object.html "class or interface in java.lang")`

**Returns:**

`String`

### `builder`

```java theme={null}
public static X402V1PaymentRequirements.SchemeStage builder()
```

**Returns:**

[X402V1PaymentRequirements](/sdks/cdp-sdks-v2/java/com/coinbase/cdp/types/X402V1PaymentRequirements).`SchemeStage`
