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

# Create card charge

> Process a card payment

Processes a card payment.

## Body parameters

<ParamField body="identifier" type="string" required>
  Unique identifier for this transaction in your application.
</ParamField>

<ParamField body="amount" type="number" required>
  Transaction amount in BRL.
</ParamField>

<ParamField body="installments" type="number">
  Number of card installments.
</ParamField>

<ParamField body="clientIp" type="string" required>
  IPv4 of the customer performing the transaction.
</ParamField>

<ParamField body="client" type="object" required>
  Customer information, including address when required by the card processor.
</ParamField>

<ParamField body="client.name" type="string" required>
  Customer full name.
</ParamField>

<ParamField body="client.email" type="string" required>
  Customer email address.
</ParamField>

<ParamField body="client.phone" type="string" required>
  Customer phone number.
</ParamField>

<ParamField body="client.document" type="string" required>
  Customer document, such as CPF or CNPJ for Brazilian customers.
</ParamField>

<ParamField body="client.address" type="object" required>
  Customer billing address.
</ParamField>

<ParamField body="client.address.country" type="string" required>
  Customer country code, such as `BR`.
</ParamField>

<ParamField body="client.address.zipCode" type="string" required>
  Customer ZIP code.
</ParamField>

<ParamField body="client.address.state" type="string" required>
  Customer state code, such as `SP`.
</ParamField>

<ParamField body="client.address.city" type="string" required>
  Customer city.
</ParamField>

<ParamField body="client.address.street" type="string" required>
  Customer street.
</ParamField>

<ParamField body="client.address.neighborhood" type="string" required>
  Customer neighborhood.
</ParamField>

<ParamField body="client.address.number" type="string" required>
  Customer address number.
</ParamField>

<ParamField body="client.address.complement" type="string">
  Customer address complement.
</ParamField>

<ParamField body="card" type="object" required>
  Card data used to process the payment.
</ParamField>

<ParamField body="card.owner" type="string" required>
  Cardholder name.
</ParamField>

<ParamField body="card.number" type="string" required>
  Card number.
</ParamField>

<ParamField body="card.expiresAt" type="string" required>
  Card expiration date in `YYYY-MM` format.
</ParamField>

<ParamField body="card.cvv" type="string" required>
  Card security code.
</ParamField>

<ParamField body="card.statementDescriptor" type="string">
  Statement descriptor displayed on the card charge.
</ParamField>

<ParamField body="callbackUrl" type="string">
  URL that will receive payment status webhook notifications.
</ParamField>

<ParamField body="products" type="array">
  Products included in the transaction.
</ParamField>

<ParamField body="products[].id" type="string" required>
  Product identifier in your application.
</ParamField>

<ParamField body="products[].name" type="string" required>
  Product name.
</ParamField>

<ParamField body="products[].quantity" type="number">
  Product quantity.
</ParamField>

<ParamField body="products[].price" type="number" required>
  Product unit price in BRL.
</ParamField>

<ParamField body="shippingFee" type="number">
  Shipping fee in BRL.
</ParamField>

<ParamField body="extraFee" type="number">
  Additional fee in BRL.
</ParamField>

<ParamField body="discount" type="number">
  Discount amount in BRL.
</ParamField>

<ParamField body="splits" type="array">
  Payment split configuration.
</ParamField>

<ParamField body="splits[].producerId" type="string" required>
  Producer ID that will receive the split amount.
</ParamField>

<ParamField body="splits[].amount" type="number" required>
  Amount sent to the split receiver, in BRL.
</ParamField>

<ParamField body="metadata" type="object">
  Free-form metadata associated with the transaction.
</ParamField>

## Request example

<RequestExample>
  ```bash theme={null}
  curl --request POST \
    --url https://app.amplopay.com/api/v1/gateway/card/receive \
    --header 'Content-Type: application/json' \
    --header 'x-public-key: SUA_CHAVE_PUBLICA_AQUI' \
    --header 'x-secret-key: SUA_CHAVE_PRIVADA_AQUI' \
    --data '{
      "identifier": "card-123",
      "amount": 197,
      "installments": 3,
      "client": {
        "name": "João da Silva",
        "email": "joao@email.com",
        "phone": "(11) 99999-9999",
        "document": "123.456.789-00"
      },
      "clientIp": "127.0.0.1",
      "card": {
        "number": "4111111111111111",
        "owner": "JOAO DA SILVA",
        "expiresAt": "2030-12",
        "cvv": "123",
        "statementDescriptor": "MINHA LOJA"
      },
      "callbackUrl": "https://example.com/webhooks/payment"
    }'
  ```
</RequestExample>

## Payload example

```json theme={null}
{
  "identifier": "card-123",
  "amount": 197,
  "installments": 3,
  "client": {
    "name": "João da Silva",
    "email": "joao@email.com",
    "phone": "(11) 99999-9999",
    "document": "123.456.789-00",
    "address": {
      "country": "BR",
      "zipCode": "01304-000",
      "state": "SP",
      "city": "São Paulo",
      "street": "Rua Augusta",
      "neighborhood": "Consolação",
      "number": "6312",
      "complement": "6 andar"
    }
  },
  "clientIp": "127.0.0.1",
  "card": {
    "number": "4111111111111111",
    "owner": "JOAO DA SILVA",
    "expiresAt": "2030-12",
    "cvv": "123",
    "statementDescriptor": "MINHA LOJA"
  },
  "callbackUrl": "https://example.com/webhooks/payment"
}
```

## Response

<ResponseField name="transactionId" type="string" required>
  Transaction ID generated by the Gateway API.
</ResponseField>

<ResponseField name="status" type="string" required>
  Initial transaction status.
</ResponseField>

<ResponseField name="fee" type="number" required>
  Transaction fee amount.
</ResponseField>

<ResponseField name="order" type="object" required>
  Order information and hosted order URL.
</ResponseField>

<ResponseExample>
  ```json theme={null}
  {
    "transactionId": "transaction_id",
    "status": "OK",
    "fee": 10.5,
    "order": {
      "id": "order_id",
      "url": "https://app.amplopay.com/order/order_id"
    }
  }
  ```
</ResponseExample>
