---
title: "Schemas"
description: "Schemas used in requests/responses of our API:"
canonical: "https://docs.cm.com/payments/online-payments/guides/checkout/schemas"
---

# Schemas

> Schemas used in requests/responses of our API:

Source: https://docs.cm.com/payments/online-payments/guides/checkout/schemas

Schemas used in requests/responses of our API:

## returnUrls

| Parameter | Type | Description | Constraints | Required |
| :- | :- | :- | :- | :- |
| success | String(1...2000) | Return URL to use when the transaction succeeds. | | ✅ |
| cancelled | String(1...2000) | Return URL to use when the transaction is cancelled. | | ✅ |
| expired | String(1...2000) | Return URL to use when the transaction is expired. | | ✅ |
| failed | String(1...2000) | Return URL to use when the transaction is failed. | | ✅ |

## consumerInRequest

| Parameter | Type | Description | Constraints | Required |
| :- | :- | :- | :- | :- |
| givenName | String(1...35) | Customer given name. | | |
| middleName | String(1...35) | Customer middle name. | | |
| familyName | String(1...35) | Customer family name. | | |
| email | String | Email provided by customer. | | |
| gender | String(1...2000) | Gender of the customer. | The possible values are: `m`, `f` , or `null`. | |
| address | [addressInRequest](https://docs.cm.com/payments/online-payments/guides/checkout/schemas#addressinrequest) Object | Customer address. | | |
| phone | String | Customer phone number. | | |
| dateOfBirth | String | Date of birth of the customer. | | |

## addressInRequest

| Parameter | Type | Description | Constraints | Required |
| :- | :- | :- | :- | :- |
| street | String(1...100) | Street. | | |
| houseNumber | String(1...35) | House and number. | | |
| postalCode | String(1...35) | Postal code. | | |
| city | String(1...35) | City. | | |
| countryCode | String | Country code. | ISO 3166-1 country code. | |
| state | String(1...40) | State. | | |
| additionalData | String(1...35) | Additional address information. | | |

## consumer

| Parameter | Type | Description | Constraints | Required |
| :- | :- | :- | :- | :- |
| givenName | String(1...35) | Customer given name. | | |
| middleName | String(1...35) | Customer middle name. | | |
| familyName | String(1...35) | Customer family name. | | |
| email | String | Email provided by customer. | | |
| gender | String(1...2000) | Gender of the customer. | The possible values are: `m`, `f` , or `null`. | |
| address | [address](https://docs.cm.com/payments/online-payments/guides/checkout/schemas#address) Object | Customer address. | | |
| phone | String | Customer phone number. | | |
| dateOfBirth | String | Date of birth of the customer. | | |

## address

| Parameter | Type | Description | Constraints | Required |
| :- | :- | :- | :- | :- |
| street | String(1...100) | Street. | | |
| houseNumber | String(1...35) | House and number. | | |
| postalCode | String(1...35) | Postal code. | | |
| city | String(1...35) | City. | | |
| countryCode | String | Country code. | ISO 3166-1 country code. | |
| state | String(1...40) | State. | | |
| additionalData | String(1...35) | Additional address information. | | |

## orderItem

| Parameter | Type | Description | Constraints | Required |
| :- | :- | :- | :- | :- |
| code | String(1...50) | A code that identifies the item. | | ✅ |
| name | String(1...50) | A human readable name for the item. | | |
| description | String(1...100) | Additional item description. | | |
| unitPrice | Int(1...99999999) | Unit price (including VAT) of the item, specified in the smallest currency subunit, as for example eurocents. | | ✅ |
| quantity | Int(1...1000000000) | The number of items. | | ✅ |
| vatAmount | Int(1...99999999) | VAT amount of one unit, specified in the smallest currency subunit, as for example eurocents. | | ✅ |
| vatRate | Number(0...99.9) | Percentage of VAT applied. Only the first decimal value will be taken into account, the rest will be ignored. | | ✅ |

## action

| Parameter | Type | Description | Constraints | Required |
| :- | :- | :- | :- | :- |
| redirect | [redirect](https://docs.cm.com/payments/online-payments/guides/checkout/schemas#redirect) Object | Next action to be performed by merchant (or consumer) to complete the payment. | | |

## redirect

| Parameter | Type | Description | Constraints | Required |
| :- | :- | :- | :- | :- |
| url | String | URL where consumer should be redirected to by the merchant to perform the payment. | | |

## refund

| Parameter | Type | Description | Constraints | Required |
| :- | :- | :- | :- | :- |
| refundedAmount | Int(0...99999999) | Amount in the smallest currency subunit, as for example eurocents, that has already been refunded. | | ✅ |
| refundedPendingAmount | Int(1...99999999) | Amount in the smallest currency subunit, as for example eurocents, that has been requested to be refunded. | | ✅ |

## payment

| Parameter | Type | Description | Constraints | Required |
| - | - | - | - | - |
| id | String(36) | Payment unique identifier. | | ✅ |
| type | String | The type of payment. | The possible values are: `bancontact`, `creditcard`, `ideal`, `paypal`, `giropay`. | ✅ |
| status | String | `OPEN` - Payment has been created. This is the initial status.  <br />`SUCCESS` - Payment has succeeded.  <br />`CANCELLED` - Payment has not succeeded; cancelled by the consumer.  <br />`EXPIRED` - Payment has not succeeded; expired.  <br />`FAILURE` - Payment has not succeeded; unknown reason.  <br />`AUTHORIZED` - Payment is authorized.  <br />`PENDING` - Payment could not be completed yet; waiting for something.  <br />`CHARGEBACK` - Payment chargeback was created. | | ✅ |
| createdAt | String(RFC3339) | Creation time. | ISO 8601 date and time. | ✅ |
