---
title: "Create a transaction and make the payment directly with a credit card"
method: POST
path: "/v1/transactions/cards"
tags: ["Transactions"]
---

# Create a transaction and make the payment directly with a credit card

`POST /v1/transactions/cards`

Create a transaction and make the payment directly with a credit card.
  ## Data Only - Optional property (Fees can be included in transactions where data_only is not sent) ##
DataOnly is a protocol similar to 3D Secure (3DS) with the primary goal of reducing fraud rates and increasing approval rates compared to common transactions. By collecting more comprehensive data from the client during the transaction process, issuers can make more informed decisions based on a deeper analysis of the data provided.

### Information required for data only ###

#### color_depth (number, default: 24): 
- Represents the color depth of the palette used to display images, measured in bits per pixel. It indicates how many bits are used to represent the color of each pixel, which impacts the quality of colors displayed on the screen. This value can be obtained from the client browser using the window.screen.colorDepth property.

#### device_type (string, default: BROWSER)
- Indicates the type of device on which authentication occurs. Helps to identify the usage environment and tailor the user experience to the device. The default value is BROWSER, but it can vary based on the client's device. This information can be obtained from the client browser through user-agent analysis.

#### java_enabled (boolean, default: false)
- A boolean field indicating whether the client browser has the capability to run Java. It returns true if Java support is enabled and false otherwise. This value can be obtained from the client browser using the navigator.javaEnabled() property.

#### language (string, default: BR)
- Represents the browser's preferred language in IETF BCP 47 format, containing between 1 and 8 characters. It can be used to adapt the interface to the user's language preference. This value can be obtained from the client browser using the navigator.language property.

#### screen_height (number, default: 500)
- Represents the total height of the client's screen in pixels. The value can be obtained from the client browser using the screen.height property.

#### screen_width (number, default: 500)
- Represents the total width of the client's screen in pixels. The value can be obtained from the client browser using the screen.width property.

#### time_zone_offset (number, default: -3)
- Represents the time difference, in hours, between UTC and the local time of the cardholder's browser. The value typically ranges between -12 and +14. This can be obtained from the client browser using new Date().getTimezoneOffset() and converting it from minutes to hours (with the sign reversed).

#### ip_address (string, example: 10.0.0.1)
- Represents the client's IP address (IPv4) used to uniquely identify a device on the network. This value can be obtained from the client browser via the navigator.connection property or using external IP detection services. If not provided, the IP address will be automatically extracted from the request made.

### All fields: ##
```json
"data_only": {
  "color_depth": 24,
  "screen_width": 2560,
  "screen_height": 1440,
  "java_enabled": false,
  "device_type": "BROWSER",
  "language": "BR",
  "time_zone_offset": -3,
  "ip_address": "200.164.21.168"
}
```

### Mandatory fields only: ##
```json
"data_only": {
  "color_depth": 24,
  "screen_width": 2560,
  "screen_height": 1440,
  "java_enabled": false
}
```

## Request body

- EdubankTransactionCardsDto
  - `reference_id` string, required — Reference ID of your application VARCHAR(500)
  - `transaction_limit_date` string, required — Deadline to use this transaction for payment
  - `transaction_description` string — Description of the sale for payment
  - `sandbox` boolean, required — Defines whether the account is in test or production mode
  - `is_pinpad_transaction` boolean — Defines that a transaction is pinpad. In this case, the transaction may respect some specific parameters, such as a different pix fees
  - `transaction_items` EdubankTransactionItems[] — Edubank transaction items
    - `item` string, required — Item Description
    - `amount` string, required — Item amount
    - `reference` string — Item reference
    - `note` string — Item note
  - `transaction_details` EdubankTransactionDetails, required
    - `amount` number, required — Gross amount to be paid. Ex: 2010 = 20.10
    - `due_date` string, required — Due date
    - `payment_limit_date` string, required — Deadline for payment
    - `body_instructions` string[] — Up to five bank slip instructions
    - `late_fee` EdubankLateFee
      - `mode` string, required — Billing mode. Accepted values: FIXED (fixed) or PERCENTAGE (percentage)
      - `amount` string, required — Late fee amount. Ex: 2.00
    - `interest` EdubankInterest
      - `mode` string, required — Billing mode. Accepted values: DAILY_AMOUNT, DAILY_PERCENTAGE
      - `amount` string, required — Interest fee amount. Ex: 0.033
    - `discount` EdubankDiscount
      - `mode` string, required — Billing mode. Accepted values: FIXED (fixed) or PERCENTAGE (percentage)
      - `date_1` string, required — Deadline for payment to occur with discount 1. It must be before the date entered in "Due date"
      - `amount_1` number, required — Discount 1 amount. Ex: 2010 = 20.10
      - `date_2` string — Deadline for payment to occur with discount 2. It must be before the date entered in "date_1"
      - `amount_2` number — Discount 2 amount. Ex: 2010 = 20.10
      - `date_3` string — Deadline for payment to occur with discount 3. It must be before the date entered in "date_2"
      - `amount_3` number — Discount 3 amount. Ex: 2010 = 20.10
  - `split_rules` EdubankSplit[] — Split rules for the transaction.<br>All objects in the 'split_rules' array must have the same properties.<br>They must all be by value or by percentage
    - `recipient` string, required — Recipient seller_id
    - `amount` number — Value that will be split. Ex: 2010 = 20.10
    - `percentage` string, required — Split percentage
    - `processing_fee` string, required — Defines which seller should process fees. MAIN = Seller who created the transaction. RECIPIENT = Seller informed in the split.
  - `notification_url` string, required — URL that will receive a POST call when the transaction changes
  - `encrypted_card` string, required — Encrypted edubank card data
  - `data_only` EdubankCardDataOnlyDto
    - `color_depth` number, required — Represents the color depth of the palette used to display images, measured in bits per pixel. It indicates how many bits are used to represent the color of each pixel, influencing the quality of the colors displayed on the screen. It can be obtained in the client browser through the window.screen.colorDepth property
    - `device_type` 'BROWSER' — Indicates the type of device on which authentication occurs, helps identify the usage environment and adapt the user experience according to the device. Default value is BROWSER
    - `java_enabled` boolean, required — Boolean field indicating whether the client browser has the capability to run Java. Returns true if Java support is enabled and false otherwise. The value can be obtained directly from the client browser through the navigator.javaEnabled() property
    - `language` string — Represents the browser's preferred language, in IETF BCP 47 format, containing between 1 and 8 characters. This value can be used to adapt the interface to the user's language. It can be obtained in the client browser through the navigator.language property
    - `screen_height` number, required — The total height of the client screen in pixels. The value is the one returned by the screen.height property
    - `screen_width` number, required — The total width of the client screen in pixels. The value is the one returned by the screen.width property
    - `time_zone_offset` number — Represents the time difference, in hours, between UTC and the local time of the cardholder's browser. Between -12 and +14
    - `ip_address` string — Represents the client IP address (IPv4) used to uniquely identify a device on the network. Obtained from the client browser via the navigator.connection property or via IP discovery services. #If not informed, the IP will be extracted from the request made#

## Response `201`

The object has been successfully created

- EdubankTransactionSuccessResponseCard
  - `status_code` number, required — Status code
  - `transaction_id` string, required — Edubank transaction id
  - `transaction_type` string, required — Type of transaction performed. CARD/PIX/BANK_SLIP/BANK_SLIP_PIX
  - `status` string, required — Current transaction status
  - `payment_id` string, required — Payment id
  - `card_brand` string — Flag of the credit card used
  - `bank_slip_digitable_line` string — Digitable line for payment slip
  - `pix_base64` string — Pix qrcode image in base64

## Other responses

- `400` — Client specified an invalid argument, request body or query param
- `401` — The user is unauthorized
- `403` — Authenticated user is not allowed to access this resource
- `404` — The resource was not found
- `408` — Request timeout
- `422` — Error: Unprocessable Entity
- `429` — Too many requests
- `500` — Internal server error

---

[API](https://skmtc.dev/edubank/apis/api-edubank.md) · [All operations](https://skmtc.dev/edubank/apis/api-edubank/llms.txt) · [OpenAPI document](https://skmtc-service-production.skmtc.workers.dev/v1/apis/edubank/api-edubank/revisions/dce4008191d4/schema)
