# Schemas

## returnUrls

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

## consumer

| Parameter    | Type                                | Description                    | Constraints                                    | Required             |
| :----------- | :---------------------------------- | :----------------------------- | :--------------------------------------------- | :------------------- |
| name         | [name](schemas-4#name) Object       | Customer name.                 |                                                |                      |
| address      | [address](schemas-4#address) Object | Customer address.              |                                                | ✅                    |
| email        | String                              | Email provided by customer.    |                                                | :white\_check\_mark: |
| businessName | String(1...35)                      | Business name.                 |                                                |                      |
| phone        | String                              | Customer phone number.         |                                                |                      |
| gender       | String(1...2000)                    | Gender of the customer.        | The possible values are: `m`, `f` , or `null`. |                      |
| dateOfBirth  | String                              | Date of birth of the customer. |                                                |                      |

## name

| Parameter  | Type           | Description           | Constraints | Required             |
| :--------- | :------------- | :-------------------- | :---------- | :------------------- |
| firstName  | String(1...35) | Customer first name.  |             | :white\_check\_mark: |
| lastName   | String(1...35) | Customer last name.   |             | :white\_check\_mark: |
| middleName | String(1...35) | Customer middle name. |             |                      |

## 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. |                          |          |

## action

| Parameter | Type                               | Description                                                                    | Constraints | Required |
| :-------- | :--------------------------------- | :----------------------------------------------------------------------------- | :---------- | :------- |
| qrcode    | [qrcode](schemas-4#qrcode) Object  | Next action to be performed by merchant (or consumer) to complete the payment. |             |          |
| intent    | [intent](schemas-4#intent)  Object | Next action to be performed by merchant (or consumer) to complete the payment. |             |          |

## qrcode

| Parameter | Type   | Description                                                       | Constraints | Required |
| :-------- | :----- | :---------------------------------------------------------------- | :---------- | :------- |
| url       | String | URL of the Bancontact QR code image to be shown to your customer. |             |          |

## intent

| Parameter | Type   | Description                            | Constraints | Required |
| :-------- | :----- | :------------------------------------- | :---------- | :------- |
| url       | String | intent URL to be shared with customer. |             |          |

## 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.         |             | :white\_check\_mark: |
| refundedPendingAmount | Int(1...99999999) | Amount in the smallest currency subunit, as for example eurocents, that has been requested to be refunded. |             | ✅                    |

## browserInformation

| Parameter | Type           | Description                                  | Constraints | Required             |
| :-------- | :------------- | :------------------------------------------- | :---------- | :------------------- |
| shopperIp | String(1...39) | IPv4 or IPv6 address for the consumer.       |             | :white\_check\_mark: |
| accept    | String         | Content-type accepted by the client browser. |             | ✅                    |
| userAgent | String         | User-Agent of the consumer' browser.         |             | ✅                    |

## encryptedCardDetails

| Parameter | Type   | Description                         | Constraints                                                 | Required             |
| :-------- | :----- | :---------------------------------- | :---------------------------------------------------------- | :------------------- |
| data      | String | Client-side encrypted card details. | Find more details [here](client-side-encryption-library)  . | :white\_check\_mark: |

## action(redirect)

| Parameter | Type                                   | Description                                                                    | Constraints | Required |
| :-------- | :------------------------------------- | :----------------------------------------------------------------------------- | :---------- | :------- |
| redirect  | [redirect](schemas-4#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. |             |          |