> For the complete documentation index, see [llms.txt](https://mekacash-1.gitbook.io/mekacash-api/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://mekacash-1.gitbook.io/mekacash-api/payment/charge-s2s-transaction.md).

# Charge S2S Transaction

Some card required address verification (USA Card), and other card card required 3D secure (VISA).

\
For card that required address verification, use Validation endpoint to confirm, while card required 3D secure use the link return in api response to confirm the card token from your browser and after confirm use validation endpoint to verify the transaction.

## Charge Card

<mark style="color:green;">`POST`</mark> <https://mekacash.co.uk/api/charge>

**Headers**

| Name             | Value                 |
| ---------------- | --------------------- |
| Content-Type \*  | `application/json`    |
| Authorization \* | `Bearer <SECRET KEY>` |

**Request Body**

<table><thead><tr><th>Name</th><th width="137.56640625">Type</th><th width="137.796875">Required</th><th>Description</th></tr></thead><tbody><tr><td>firstname *</td><td>string</td><td>true</td><td>first name</td></tr><tr><td>lastname *</td><td>string</td><td>true</td><td>last name</td></tr><tr><td>email *</td><td>string</td><td>true</td><td>email</td></tr><tr><td>phone *</td><td>string</td><td>true</td><td>phone</td></tr><tr><td>country *</td><td>string</td><td>true</td><td>country code (US)</td></tr><tr><td>state *</td><td>string</td><td>true</td><td>state</td></tr><tr><td>city *</td><td>string</td><td>true</td><td>city</td></tr><tr><td>address *</td><td>string</td><td>true</td><td>address</td></tr><tr><td>zip_code *</td><td>string</td><td>true</td><td>portal code</td></tr><tr><td>currency *</td><td>string</td><td>true</td><td>currency code (USD/EUR)</td></tr><tr><td>amount *</td><td>decimal</td><td>true</td><td>amount</td></tr><tr><td>cardName</td><td>string</td><td>true</td><td>card holder name</td></tr><tr><td>cardNumber *</td><td>string</td><td>true</td><td>card number</td></tr><tr><td>expMonth *</td><td>string</td><td>true</td><td>card expiry month </td></tr><tr><td>expYear *</td><td>string</td><td>true</td><td>card expiry year</td></tr><tr><td>cardCVV *</td><td>string</td><td>true</td><td>card CVV</td></tr><tr><td>ip_address *</td><td>string</td><td>true</td><td>ip address</td></tr><tr><td>reference *</td><td>string</td><td>true</td><td>transaction reference</td></tr><tr><td>callback_url *</td><td>string</td><td>true</td><td>callback url</td></tr></tbody></table>

**Response**

{% tabs %}
{% tab title="200 : OK" %}

```json
{
  "status" : "success",
  "message" : "success",
  "data" : {
      "reference" : "abssjsu222",
      "orderid" : "1282827",
      "link" : "https://mekacash.co.uk/api/checkout/a292929acvvb"
  }
}
```

{% endtab %}

{% tab title="400 : Bad Request" %}

```json
{
    "status":"failed",
    "message":"Bad Request"
}
```

{% endtab %}

{% tab title="401 : Unauthorized" %}

```json
{
    "status":"failed",
    "message":"Invalid Token"
}
```

{% endtab %}
{% endtabs %}
