# AuthorizeCreditCardInput

Input · GraphQL API

Top-level input fields for creating a transaction by authorizing a credit card.

## Fields

- `clientMutationId` (`String`): An identifier used to reconcile requests and responses. 255 characters maximum.
- `apiRequestKey` (`String`): An identifier to detect duplicate operations and prevent double-processing. This can be used to protect from submitting a duplicate request; for instance, after receiving an INTERNAL error where the ultimate state of the request is uncertain. If a request is made with a new `apiRequestKey`, it will be processed as normal. If subsequent requests are made with the same `apiRequestKey`, and the first request resulted in a transaction being created (in any status), then the same transaction in its current status will be returned. Subsequent requests with the same `apiRequestKey` must have the same input values as the original request. Subsequent requests with the same `apiRequestKey` must also be made after the initial request completes, and before 30 days has elapsed since the initial request finished. If a subsequent request is made while the first is in-flight or with different input values than the original request, it will result in a `VALIDATION` error on the subsequent request. If an `apiRequestKey` is reused after 30 days since its first use, it will be treated as if it has not been used before. If an initial request is made with an `apiRequestKey`, but the request receives a `AUTHENTICATION`, `AUTHORIZATION`, `NOT_FOUND`, `RESOURCE_LIMIT`, or `NOT_IMPLEMENTED` error, and no transaction is created, then no duplication will be considered. Subsequent requests with the same `apiRequestKey` will be treated as non-duplicate requests, just as if they were the first request with that value.
- `paymentMethodId` (`ID!`) — required: ID of a credit card payment method to be authorized.
- `options` (`CreditCardTransactionOptionsInput`): Input fields related to the credit card being authorized.
- `transaction` (`TransactionInput!`) — required: Input fields for the authorization, with details that will define the resulting transaction.

## Used by

- [authorizeCreditCard](/braintree/graphql/reference/mutations/authorize-credit-card) — Mutation; input

## GraphQL definition

```graphql
input AuthorizeCreditCardInput {
  clientMutationId: String
  apiRequestKey: String
  paymentMethodId: ID!
  options: CreditCardTransactionOptionsInput
  transaction: TransactionInput!
}
```

---

[View the complete GraphQL schema on GitHub](https://raw.githubusercontent.com/braintree/graphql-api/refs/heads/master/schema.graphql)