> For the complete documentation index, see [llms.txt](https://firstoken.gitbook.io/api-docs/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://firstoken.gitbook.io/api-docs/api-reference/payments/point-of-sale-payments.md).

# Point of Sale Payments

Point of Sale (POS) payments involve processing transactions at a physical location using various payment methods such as credit cards, debit cards, and other payment instruments. The POS system captures transaction details, processes them through a payment gateway, and provides a response indicating the success or failure of the transaction.

This documentation covers the Point of Sale (POS) payment endpoints, including payment authorization, capture and credit transactions. It also includes detailed descriptions of the request and response formats, as well as common error codes and their meanings.

{% hint style="info" %}
**Currently, we support card present payments only with Amex cards.**
{% endhint %}

The base URL to use in these following endpoints will be: <https://api.firstoken.co/v1/>

{% hint style="warning" %}
In case of sandbox environment you should use this URL: <https://api.firstoken-staging.co/v1/>
{% endhint %}

***

Codes of response

<details>

<summary>200 OK</summary>

**Description:** The request was successful, and the server has returned the requested data.

```json
{
  "status": "success",
  "message": "Payment successful",
  "data": {
    "transaction_info": {
      "type": "payment_response",
      "reference_code": "123456789",
      "transaction_id": "0001733750160520541642",
      "request_id": "7337501624936410504953",
      "status": "Authorized",
      "response_code": "00",
      "reconciliation_id": "1uYiSsyaPwTd",
      "created_at": "2024-12-09T13:16:02Z"
    },
    "order_info": {
      "amount_details": {
        "authorized_amount": 1000,
        "currency": "MXN"
      }
    },
    "processor_info": {
      "approval_code": "123456",
      "avs": {
        "code": "G"
      }
    }
  }
}

```

</details>

<details>

<summary>400 Bad Request</summary>

**Description:** The request could not be understood by the server due to malformed syntax or invalid data.

```json
{
  "status": "fail",
  "message": "Invalid request",
  "data": {
    "description": "\"value\" does not match any of the allowed types",
    "path": ""
  }
}
```

</details>

<details>

<summary>500 Internal Server Error</summary>

**Description:** The server encountered an unexpected condition that prevented it from fulfilling the request

```json
{
  "status": "error",
  "message": "An internal error occurred. Please try again.",
  "data": {}
}
```

</details>
