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

# Record Payment

> Record an Advertiser's payment for ad spend. You can also do this manually on the Advertiser's Billing page in the admin portal.

### Path Parameters

<ParamField path="advertiserID" type="string" required={true} placeholder="123">
  The ID of the advertiser.
</ParamField>

### Body Parameters

<ParamField body="amount" type="number" required>
  The amount of the transaction.
</ParamField>

<ParamField body="amount_tax" type="number" required>
  The amount of tax for the transaction.
</ParamField>

<ParamField body="currency" type="string" required>
  The currency of the transaction.  Must be specified as `"USD"`.
</ParamField>

<ParamField body="type" type="string" required>
  The type of transaction.  Must be specified as `"PAYMENT"`.
</ParamField>

<ParamField body="authorized_to_spend" type="boolean" required>
  Certifies that the advertiser is allowed to spend the funds, and must be specified as `true` to create a transaction.
</ParamField>

<ParamField body="receipt_url" type="string">
  The URL of the receipt for the transaction.
</ParamField>

### Response

<ResponseField name="advertiser_id" type="number">
  The ID of the advertiser.
</ResponseField>

<ResponseField name="id" type="number">
  The ID of the transaction.
</ResponseField>

<ResponseField name="created_at" type="string">
  A timestamp of when the transaction was created.
</ResponseField>

<ResponseField name="type" type="string">
  The type of transaction.
</ResponseField>

<ResponseField name="amount" type="number">
  The amount of the transaction.
</ResponseField>

<ResponseField name="amount_tax" type="number">
  The amount of tax for the transaction.
</ResponseField>

<ResponseField name="receipt_url" type="string">
  The URL of the receipt for the transaction.
</ResponseField>

<ResponseExample>
  ```json 201 theme={null}
  [
      {
          "advertiser_id": 123,
          "id": 456,
          "created_at": "2020-01-01T00:00:00Z",
          "type": "PAYMENT",
          "amount": 100,
          "amount_tax": 10,
          "receipt_url": "https://example.com/receipt"
      }
  ]
  ```

  ```json 400 theme={null}
  {
      "error": "currency must be specified as \"USD\""
  }
  ```

  ```json 500 theme={null}
  {
      "error": "Internal Server Error"
  }
  ```
</ResponseExample>
