---
title: "Get required payment fields"
method: GET
path: "/v2/discovery/fields"
tags: ["Discovery"]
---

# Get required payment fields

`GET /v2/discovery/fields`

## Request

- Base URL: `https://api.sandbox.payall.com`
- URL: `https://api.sandbox.payall.com/v2/discovery/fields`
- Auth: OAuth 2
  - Client credentials
  - Token URL: `/v2/oauth/token`

Provides information about the fields required to make a payment
based on supplied parameters. Different payment channels will yield
various results based on payment processors and compliance requirements.

Data provided by this endpoint can be used to build UI for customers
to provide relevant payment data or to just collect it from internal
system to execute the payment swiftly by avoiding holdups due to
missing data.

Please note that response from this endpoint will not include base fields
required by Recipient entities (like first or last name of a person).

Sample response for B2P payment of 100 PLN to Poland from EUR account:
```
{
    "dob": {
      "title": "Date of birth",
      "data_type": "DATE",
    },
    "registration_address": {
      "city": {
        "mask": "^[a-zA-Z\/\\\\-:().,='+0-9\\\\s]{1,35}$",
        "title": "City",
        "data_type": "STRING",
        "max_length": 255,
        "min_length": 1,
      },
      "street": {
        "mask": "^[a-zA-Z\/\\-:().,='+0-9\\s]{1,35}$",
        "title": "Street name",
        "data_type": "STRING",
        "max_length": 255,
        "min_length": 1,
      },
      "country": {
        "title": "Country of residence",
        "data_type": "COUNTRY",
      }
    }
}
```

Sample response for B2B payment of 100 PLN to Poland from EUR account:
```
{
    "registration_address": {
      "city": {
        "mask": "^[a-zA-Z\/\\\\-:().,='+0-9\\\\s]{1,35}$",
        "title": "City",
        "data_type": "STRING",
        "max_length": 255,
        "min_length": 1,
      },
      "street": {
        "mask": "^[a-zA-Z\/\\-:().,='+0-9\\s]{1,35}$",
        "title": "Street name",
        "data_type": "STRING",
        "max_length": 255,
        "min_length": 1,
      },
      "country": {
        "title": "Country of residence",
        "data_type": "COUNTRY",
      }
    }
}
```

## Query parameters

- `recipient_country` string, iso-3166-alpha-2, required
- `payment_type` 'B2P' | 'B2B' | 'P2B' | 'P2P', required
- `payer_currency` string, iso-4217, required
- `instrument_category` 'BankAccount' | 'MobileWallet' | 'CashPickup' | 'Card', required
- `amount` integer, required: Amounts are always in the smallest currency unit. Example: 1000.23 USD is represented as 100023 cents.
- `recipient_currency` string, iso-4217, required

## Response `200`

OK

- RequiredFieldsResponse
  - `payer` object
    - `registration_address` object
  - `recipient` object
    - `type` 'Person' | 'Business'
    - `registration_address` object
  - `payment_instrument` object
    - `category` 'BankAccount' | 'MobileWallet' | 'CashPickup' | 'Card'
  - `kyt` object
  - `example` object

---

[API](https://skmtc.dev/payall/apis/payall-m2m-authentication-api.md) - [All operations](https://skmtc.dev/payall/apis/payall-m2m-authentication-api/llms.txt) - [OpenAPI document](https://skmtc.dev/payall/apis/payall-m2m-authentication-api/revisions/5f561eccd6ce?raw)
