---
title: Payment cards Extraction
slug: api-marketplace/payment-cards-extraction
description: Looking for a document that's not currently available? Don't worry, we've got you covered! Stay tuned for the upcoming release of this document, which will be provided in the near future. Stay updated with the latest information and be prepared to access 
createdAt: 2023-04-20T22:04:46.000Z
---

## Introduction

The Payment cards extraction API is designed to process images of debit and credit cards to extract essential information like the cardholder's name, card number, and expiration date from a given image, facilitating various financial and security applications.

**Use cases**

- **E-commerce**

  : Streamline payment processes by allowing customers to quickly input card details through image uploads, reducing manual entry errors.
- **Financial Services**

  : Improve user experience in banking apps by offering quick card detail verification and updates through image submission.
- **Fraud Prevention**

  : Enhance security measures by cross-referencing extracted card information with existing databases to detect fraudulent activities.

***

## API details

### Endpoint

:::CodeblockTabs
Production Environment

```jsx
POST https://api.signzy.app/api/v3/paymentCard/extraction
```
:::

:::CodeblockTabs
UAT/Testing Environment

```jsx
POST https://api-preproduction.signzy.app/api/v3/paymentCard/extraction
```
:::

***

### Request headers&#x20;

| **Name**      | **Value**        | **Required** | **Description**                                                                                            |
| ------------- | ---------------- | ------------ | ---------------------------------------------------------------------------------------------------------- |
| Content-Type  | application/json | Mandatory    | The type of content that the request body contains.                                                        |
| Authorization | XXXXXXXXXXXXXXX  | Mandatory    | An authentication token to authorize the request. Reach out to the Signzy support team to get one created. |

***

### Request body parameters

| **Parameter** | **Data type** | **Description**                                                                                                        | **Required** |
| ------------- | ------------- | ---------------------------------------------------------------------------------------------------------------------- | ------------ |
| file          | String        | A URL of the image. <br />Acceptable image format TIFF/TIF, JPEG/JPG, PNG, PDF(maximum 2 pages) containing salary slip | Mandatory    |

```json
{
    "file": "https://staging-persist.signzy.tech/api/files/5038366/download/xxxxxx.pdf"
}
```

***

### Code samples

:::CodeblockTabs
```curl
curl --location 'https://api-preproduction.signzy.app/api/v3/paymentCard/extraction' \
--header 'Content-Type: application/json' \
--header 'Authorization: <Auth key>' \
--data '{
    "file": "https://staging-persist.signzy.tech/api/files/5100743/download/2b48bc401dd258924b7b213.png"
}'
```

```nodejs
const axios = require('axios');
let data = JSON.stringify({
  "file": "https://persist.signzy.tech/api/files/795927779/download/xxxxxxxxxxxxxxxxxxxxxxx.png"
});

let config = {
  method: 'post',
  maxBodyLength: Infinity,
  url: 'https://api.signzy.app/api/v3/extract/salary-slip',
  headers: { 
    'Content-Type': 'application/json', 
    'Authorization': '<Token>'
  },
  data : data
};

axios.request(config)
.then((response) => {
  console.log(JSON.stringify(response.data));
})
.catch((error) => {
  console.log(error);
});

```

```python
import http.client
import json

conn = http.client.HTTPSConnection("api.signzy.app")
payload = json.dumps({
  "file": "https://persist.signzy.tech/api/files/795927779/download/xxxxxxxxxxxxxxxxxxxxxxx.png"
})
headers = {
  'Content-Type': 'application/json',
  'Authorization': '<Token>'
}
conn.request("POST", "/api/v3/extract/salary-slip", payload, headers)
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
```

```go
package main

import (
  "fmt"
  "strings"
  "net/http"
  "io/ioutil"
)

func main() {

  url := "https://api.signzy.app/api/v3/extract/salary-slip"
  method := "POST"

  payload := strings.NewReader(`{
    "file": "https://persist.signzy.tech/api/files/795927779/download/xxxxxxxxxxxxxxxxxxxxxxx.png"
}`)

  client := &http.Client {
  }
  req, err := http.NewRequest(method, url, payload)

  if err != nil {
    fmt.Println(err)
    return
  }
  req.Header.Add("Content-Type", "application/json")
  req.Header.Add("Authorization", "<Token>")

  res, err := client.Do(req)
  if err != nil {
    fmt.Println(err)
    return
  }
  defer res.Body.Close()

  body, err := ioutil.ReadAll(res.Body)
  if err != nil {
    fmt.Println(err)
    return
  }
  fmt.Println(string(body))
}
```
:::

***

### Response body parameters

| **Parameter** | **Data Type** | **Description**                                        |
| ------------- | ------------- | ------------------------------------------------------ |
| result        | Object        | result object                                          |
| result.name   | String        | The date of birth of the employee (empty in this case) |
| result.number | String        | The job title of the employee                          |
| result.expiry | String        | The name of the company employing the individual       |

:::CodeblockTabs
200

```json
{
    "result": {
        "name": "Sunita Soni",
        "number": "********5946",
        "expiry": "04/23"
    }
}

```

400

```json
// When wrong format file is requested
{
    "error": {
        "name": "Invalid Input Request JSON Parameter",
        "status": "400",
        "message": "file - Input should be a valid URL, input is empty.",
        "responseCode": "400"
    }
}
```

401

```json
// when wrong authorization is passed
{
    "message": "Invalid authentication credentials"
}
// When authorization is not passed
{
    "message": "No API key found in request"
}
```

413

```azcli
{
  "error": {
       "status": 413, 
       "msg": "The file size is greater than 5 MB"
     }
}
```

422

```azcli
{
  "error": {
       "status": 422,
       "msg": "The pdf file contains more than 2 pages"
     }
}
```

409

```json
{
    "error": {
        "reason": "Error From Upstream",
        "status": 409,
        "message": "Upstream Down",
        "type": "Conflict",
        "statusCode": 409,
        "name": "error"
    }
}
```
:::

***

**Contact Us for Any Assistance**

If you have any questions or need assistance, please reach out to our customer support team. You can contact us via email at <font color="#2166ae">**help\@signzy.com**</font>. We strive to provide prompt and reliable assistance, ensuring your queries are addressed effectively.

We value your feedback and are committed to making your experience smooth and enjoyable. Our team is dedicated to assisting you with any needs you may have. Thank you for choosing our services. We look forward to helping you!



