---
schema_version: "1"
id: c1feeb1190864d88429f2d6787d1f94177b650a42650b26ed988ca9a128ef5f6
title: setAmount(amount)
collection: legacydeveloper
version: current
locale: en-us
portal_url: https://docs.salesforce.com/legacydeveloper/current/en-us/apexref/apex_commercepayments_PostAuthorizationResponse_setAmount.md
canonical_url: https://developer.salesforce.com/docs/atlas.en-us.apexref.meta/apexref/apex_commercepayments_PostAuthorizationResponse_setAmount.htm
source_site: developer.salesforce.com
content_type: documentation
content_hash: ddee2256a78704781d9bdace3736a0e4c3b647cb3ecd4adf0804e9f73e00507a
description: Sets the amount for payment authorization. Can be positive, negative, or zero.
---
# setAmount(amount)

Sets the amount for payment authorization. Can be positive, negative, or zero.

## Signature

public void setAmount(Double amount)

## Parameters

- **amount**:
    
    Type: [Double](https://developer.salesforce.com/docs/atlas.en-us.apexref.meta/apexref/apex_methods_system_double.htm#apex_methods_system_double "Contains methods for the Double primitive data type.")

## Return Value

Type: void