> For the complete documentation index, see [llms.txt](https://docs.number.tech/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.number.tech/documentation/getting-started/integration-options/ingenico/process-a-card-sale.md).

# Process a Card Sale

The transact API call processes a payment and optionally stores the card for future use.

**This sample shows charging a payment without saving the card.**

<mark style="color:orange;">POST</mark> https\://`[your-terminal-ip]`:8090/transact\
SessKey: `[your-session-key]`\
Content-Type: application/json

#### Response Status Codes

* 200 OK - Transaction submitted successfully. This does not mean the transaction was approved and processed; see the error handling section for more information.
* 401 Unauthorized - Missing or invalid SessKey
* 400 Bad Request - Invalid request format
* 500 Internal Server Error - Processing error

#### Error Handling

Please view our [API Best Practices](https://docs.number.tech/documentation/getting-started/basics/api-best-practices) guide for information on handling errors, logging responses, and checking for declines.

{% tabs %}
{% tab title="Sample Request" %}

```
{
  "MerchID": 1,
  "SaveCard": 0,
  "AcctHolder": {
    "Firstname": "Fred",
    "Lastname": "Smith",
    "Company": "",
    "Title": "",
    "Url": "",
    "BillingAddress": {
      "Address1": "1307 Broad Hollow Road",
      "Address2": "",
      "City": "",
      "State": "",
      "ZIP": "11747",
      "Country": "USA"
    },
    "Email": "tester@easypaysolutions.com",
    "Phone": "8777248472"
  },
  "Amounts": {
    "BaseAmt": 20.00,
    "Surcharge": 0,
    "TotalAmt": 20.00,
    "ConfirmTotalAmt": true
  },
  "Refdata": {
    "ServiceDesc": "Throat Culture",
    "ClientRefID": "1876345",
    "RPGuid": "dcaa9ac0-71a8-4dd4-ad2f-fbe107d1e789",
    "POSUser": "Sally Smith"
  }
}
```

{% endtab %}

{% tab title="Sample Response" %}

```

{
  "CreditCardSaleCompositeResult": {
    "AVSresult": "U",
    "AcquirerResponseEMV": "8A023030910A2C2DD8CE50C3BBFD3030",
    "CVVresult": "",
    "ErrCode": 0,
    "ErrMsg": "",
    "FunctionOk": true,
    "IsPartialApproval": false,
    "RequiresVoiceAuth": false,
    "RespMsg": "APPROVED 534551",
    "ResponseApprovedAmount": 0,
    "ResponseAuthorizedAmount": 20,
    "ResponseBalanceAmount": 0,
    "TxApproved": true,
    "TxID": 21964,
    "TxnCode": "534551",
    "ConsentResult": {
      "CardLast4": "",
      "ConsentCreated": false, 
      "ConsentID": 0,
      "ConsentRequested": false,
      "ErrCode": 0,
      "ErrMsg": "",
      "ExpDate": ""
    }
  }
 }
```

{% endtab %}

{% tab title="Header Parameters" %}
A unique session key used for authentication in API calls. This key is generated upon successful authentication and must be included in all subsequent requests.

Example: `A1842D663E9A4A72XXXXXXXX303541303234373138`

***

**Content-Type** string <mark style="color:orange;">required</mark>

Example: `application/json`

***

**Accept** string <mark style="color:orange;">required</mark>

Example: `application/json`
{% endtab %}

{% tab title="Body" %}

* **MerchID** (integer, required) - Merchant identification number&#x20;
* **SaveCard** (integer, required) - Card storage flag (0 or 1). Use 1 to store the card for future card not present transactions.
* **AcctHolder** (object, required) - Cardholder and billing information - **Amounts** (object, required) - Transaction amount details:
* **BaseAmt** (number, required) - Base transaction amount - **Surcharge** (number, required) - Surcharge/fee amount. You may supply a fee but only if these have been properly configured for each merchant record.
* **TotalAmt** (number, required) - Total amount (BaseAmt + Surcharge)
* **ConfirmTotalAmt** (boolean, optional, default: false) - If true, the customer will be shown an approve amount button on the Ingenico device.
* **Refdata** (object, required) - Reference data for transaction tracking:
* **ServiceDesc** (string) - Description of service/product
* **ClientRefID** (string) - Client reference identifier
* **RPGuid** (string) - Unique transaction GUID
* **POSUser** (string) - POS user/operator name
  {% endtab %}
  {% endtabs %}

{% hint style="info" %}
IMPORTANT : Always check your response to determine the fees and final amoount which are approved as this may differ from what was requested. The ResponseAuthorizedAmount element shows the amount that was charged.
{% endhint %}


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter, and the optional `goal` query parameter:

```
GET https://docs.number.tech/documentation/getting-started/integration-options/ingenico/process-a-card-sale.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
