> For the complete documentation index, see [llms.txt](https://startbutton.gitbook.io/startbutton-product-api/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://startbutton.gitbook.io/startbutton-product-api/collections/server-to-server-integration-overview/s2s-cards.md).

# S2S — Cards

Use the S2S card API for PCI DSS-compliant integrations. It supports NGN, Mastercard, Visa, and Verve.

Contact Startbutton support via <support@startbutton.africa> to enable this API.

See [Authentication](/startbutton-product-api/getting-started/authentication.md) before making requests.

### Initiate charge

`POST /transaction/initialize/s2s/card`

| Header        | Value               |
| ------------- | ------------------- |
| Authorization | `Bearer SECRET_KEY` |
| Content-Type  | `application/json`  |

```json
{
  "amount": 25000,
  "email": "text-card-ghs@yopmail.com",
  "currency": "NGN",
  "card": {
    "cvv": "081",
    "number": "507850785078507812",
    "expiryMonth": "05",
    "expiryYear": "27"
  }
}
```

The response returns `nextStep`, such as `pin`, `otp`, or a 3DS URL.

### Sample response

{% tabs %}
{% tab title="Pin" %}

```json
{ 
    "success": true, 
    "message": "Payment Request Successful", 
    "data": { 
        "reference": "66caxxxxxxxx", 
        "nextStep": "pin", 
        "message": "Validate card pin" 
    } 
}
```

{% endtab %}

{% tab title="OTP" %}

```json
{ 
    "success": true, 
    "message": "Payment Request Successful", 
    "data": { 
        "reference": "66caxxxxxxxx", 
        "nextStep": "otp", 
        "message": "Validate card pin" 
    } 
}
```

{% endtab %}

{% tab title="3DS Authorisation" %}

```json
{ 
    "success": true, 
    "message": "Payment Request Successful", 
    "data": { 
        "reference": "5f42xxxxxxxx", 
        "nextStep": "https://standard.xxxxx.co/charge/auth/d5e0bb4fi80410a4225?selected_currency=0&lang=en", 
        "message": "Open the provided URL" 
    } 
}
```

To complete 3DS authorization, simply redirect the user to the provided redirect URL (`nextStep`). The user will complete the authorization with their bank, after which we’ll redirect them back to the redirect URL you specified on your dashboard or when initiating the charge.
{% endtab %}
{% endtabs %}

### Verify charge

`POST /transaction/initialize/s2s/card/verify/:nextStep`

| Header        | Value               |
| ------------- | ------------------- |
| Authorization | `Bearer PUBLIC_KEY` |
| Content-Type  | `application/json`  |

```json
{
  "reference": "6abxxxxxxxx",
  "value": "1111"
}
```

Use the customer’s four-digit PIN or six-digit OTP as `value`. Query [Transaction Statuses](/startbutton-product-api/collections/transaction-statuses.md) before delivering value.

**Sample response**

```json
{ 
    "success": true, 
    "message": "Charge attempted", 
    "data": { 
        "reference": "9e9cxxxxxx", 
        "status": "success" 
    } 
}
```
