---
schema_version: "1"
id: daa08b7d416dcf994398e3cd951e5d88c534af84d6fda684f226baf3af9f71fe
title: setAsync(async)
collection: legacydeveloper
version: current
locale: en-us
portal_url: https://docs.salesforce.com/legacydeveloper/current/en-us/apexref/apex_commercepayments_PostAuthorizationResponse_setAsync.md
canonical_url: https://developer.salesforce.com/docs/atlas.en-us.apexref.meta/apexref/apex_commercepayments_PostAuthorizationResponse_setAsync.htm
source_site: developer.salesforce.com
content_type: documentation
content_hash: 032d091d90d156e95ad905d9021e8913281ebb923a4438d1ef1e9f71bd1ccfd0
description: Sets whether the payment capture or authorization is asynchronous (True) or synchronous (False). If True, then the payment or payment authorization record created has a status of Pending.
---
# setAsync(async)

Sets whether the payment capture or authorization is asynchronous (True) or synchronous (False). If True, then the payment or payment authorization record created has a status of Pending.

## Signature

global void setAsync(Boolean async)

## Parameters

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

## Return Value

Type: void