> ## Documentation Index
> Fetch the complete documentation index at: https://docs.pods.finance/llms.txt
> Use this file to discover all available pages before exploring further.

# Pods KYC

> Integrate Sumsub reusable KYC or BigDataCorp iframe KYC with Pods

Use Pods KYC when your application owns the user experience, but wants Pods to handle the Avenia side of KYC and expose one normalized status for money movement.

Pods supports these KYC providers:

| Provider | Use when | Pods receives |
| - | - | - |
| Sumsub reusable KYC | You own a Sumsub account and can generate reusable share tokens. | CPF, a short-lived Sumsub share token, Sumsub applicant id, email, and wallet address. |
| Pods Hosted KYC | You do not operate Sumsub. Pods returns a hosted verification link. See [Pods Hosted KYC](https://docs.pods.finance/guides/kyc/pods-hosted.md). | CPF, email, and wallet address. Documents and selfie stay with the verification provider. |
| BigDataCorp iframe | You want Pods to create the document/liveness iframe and manage the Avenia submit. | CPF, email, wallet address, safe BigDataCorp refs/status, and address data only during final submit. |

For every provider, Pods creates or reuses the internal Avenia subaccount, tracks the KYC attempt, and exposes one normalized status back to you.

> [!NOTE]
>
> Pods does not store Sumsub share tokens, full CPF, raw document images, base64 payloads, or address data. For every provider, Pods stores only the salted CPF hash and last four digits. BigDataCorp profiles also retain safe provider references, while every flow retains status fields and Avenia ids needed for audit and retry.

## Architecture overview

**1. Pods provisions your access**

Pods sends your server-to-server API key, API base URL, Avenia partner token, and Avenia recipient client id.

**2. Choose your provider**

Use Sumsub share tokens when you already operate Sumsub. Use BigDataCorp iframe when you want Pods to open the document/liveness capture session.

**3. Run provider capture**

Sumsub users complete WebSDK in your app. BigDataCorp users complete the iframe URL returned by Pods.

**4. Submit to Pods**

Sumsub integrations submit the fresh share token. BigDataCorp integrations submit the completed profile with address data for Avenia.

**5. Poll Pods status**

When the Pods status becomes `approved`, the user is approved for the Pods money movement products enabled in your integration.

## Before you start

Pods sends you these integration values:

| Value | Source | Used for |
| - | - | - |
| `PODS_API_BASE_URL` | Pods | Base URL for Pods API requests. |
| `PODS_API_KEY` | Pods | Server-to-server authentication from your backend. |
| `AVENIA_PARTNER_TOKEN` | Pods | Paste once in Sumsub Dashboard to add Avenia as a reusable identity recipient. |
| `AVENIA_FOR_CLIENT_ID` | Pods | Send as `forClientId` when generating Sumsub share tokens for Avenia. |

> [!NOTE]
>
> Avenia has no direct relationship with your company in this flow. Pods manages the Avenia relationship internally and gives you the Avenia values needed for Sumsub reusable identity sharing.

## 1. Configure the Sumsub level

Create an individual Sumsub verification level named exactly:

```text theme={null}
pods-kyc-level
```

The fixed name keeps setup, monitoring, support, and runbooks consistent across integrations.

Open [Sumsub Individual levels](https://cockpit.sumsub.com/checkus/sdkIntegrations/levels/individual?limit=100), create a **Standard** level, and configure the required steps.

![Create an individual Sumsub level](https://mintcdn.com/pods-322144f0/z7LxiXc9Lqv5HF9b/images/kyc/sumsub-level-setup/01-create-level.png?fit=max\&auto=format\&n=z7LxiXc9Lqv5HF9b\&q=85\&s=5b731d813784b7f90b6cb1c8c61adb14)

![Select Standard level type](https://mintcdn.com/pods-322144f0/z7LxiXc9Lqv5HF9b/images/kyc/sumsub-level-setup/02-select-standard.png?fit=max\&auto=format\&n=z7LxiXc9Lqv5HF9b\&q=85\&s=bfe807bbd139b12c4d1acbdeda7f6109)

### Required Sumsub steps

| Step | Configuration |
| - | - |
| Identity document | Allow ID card, passport, driver's license, and residence permit. The applicant submits one accepted document. |
| Selfie | Use advanced liveness check. |
| Applicant data | Require first name, last name, TIN, tax residence country, email, date of birth, street, street line 2, country, city, state, building number, and postcode. |

Add the identity document and selfie steps first.

![Identity document and selfie steps](https://mintcdn.com/pods-322144f0/z7LxiXc9Lqv5HF9b/images/kyc/sumsub-level-setup/03-identity-selfie-add-step.png?fit=max\&auto=format\&n=z7LxiXc9Lqv5HF9b\&q=85\&s=690c4a92c85961a3bfc19c4453861ec1)

Then add the applicant data step.

![Select Applicant data as a new step](https://mintcdn.com/pods-322144f0/z7LxiXc9Lqv5HF9b/images/kyc/sumsub-level-setup/04-select-applicant-data.png?fit=max\&auto=format\&n=z7LxiXc9Lqv5HF9b\&q=85\&s=e5cc7e5233a5302b649789effc7ed0c6)

Add each required applicant data field as a separate required field.

![Add applicant data fields](https://mintcdn.com/pods-322144f0/z7LxiXc9Lqv5HF9b/images/kyc/sumsub-level-setup/05-add-applicant-fields.png?fit=max\&auto=format\&n=z7LxiXc9Lqv5HF9b\&q=85\&s=f1807e974f1b019bf447a3b19917aaed)

Create the level.

![Create the Sumsub level](https://mintcdn.com/pods-322144f0/z7LxiXc9Lqv5HF9b/images/kyc/sumsub-level-setup/06-create-level.png?fit=max\&auto=format\&n=z7LxiXc9Lqv5HF9b\&q=85\&s=ffb4ef23dfe4dcd16bc941787d5bc97a)

### Brazilian users

For Brazilian users, Avenia requires:

* CPF in the Sumsub `TIN` field.
* Country of Tax ID set to Brazil.
* Full name.
* Date of birth.
* One identity document: `ID_CARD`, `PASSPORT`, `DRIVERS`, or `RESIDENCE_PERMIT`.
* Sumsub review answer `GREEN`.

Reference:

* [Sumsub verification levels](https://docs.sumsub.com/docs/verification-levels)
* [Sumsub configure verification levels](https://docs.sumsub.com/docs/configure-verification-levels)
* [Avenia Sumsub shared token flow](https://integration-guide.avenia.io/docs/KYC/kycSumsubSharedToken/)

## 2. Add Avenia as a reusable identity recipient

Before generating reusable KYC share tokens, add Avenia as a recipient in Sumsub.

1. Go to `Reusable identity` -> `Partners`.
2. Open the `Recipients` tab.
3. Click `Add recipient`.
4. Enter the `AVENIA_PARTNER_TOKEN` provided by Pods.
5. Save the recipient setup.

![Open Reusable identity partners](https://mintcdn.com/pods-322144f0/z7LxiXc9Lqv5HF9b/images/kyc/sumsub-recipient-setup/01-open-reusable-identity-partners.png?fit=max\&auto=format\&n=z7LxiXc9Lqv5HF9b\&q=85\&s=7db57a7cf3ee93285dc23d261fd24d9c)

![Open the Recipients tab and add a recipient](https://mintcdn.com/pods-322144f0/z7LxiXc9Lqv5HF9b/images/kyc/sumsub-recipient-setup/02-add-recipient.png?fit=max\&auto=format\&n=z7LxiXc9Lqv5HF9b\&q=85\&s=4f59956937cc337160cc562842d051bb)

![Enter the Avenia partner token](https://mintcdn.com/pods-322144f0/z7LxiXc9Lqv5HF9b/images/kyc/sumsub-recipient-setup/03-enter-partner-token.png?fit=max\&auto=format\&n=z7LxiXc9Lqv5HF9b\&q=85\&s=9f67ffbbed49e7c770bffc58fdd793c9)

After the recipient is available, use the `AVENIA_FOR_CLIENT_ID` from Pods when generating share tokens. This is Avenia's Sumsub recipient/client id. It is separate from the partner token and from your Pods API key.

Reference: [Sumsub partner management](https://docs.sumsub.com/docs/manage-sharing-partners).

## 3. Create a Sumsub app token

Create the Sumsub app token after Reusable Identity is enabled and after Avenia is added as a recipient. This order matters because the token must include permission to share applicant data.

1. Open Sumsub Dashboard.
2. Go to `Dev space` -> `App tokens`.
3. Create a new app token.
4. Ensure `Reusable Identity` -> `Share applicants data` is selected.
5. Save the token and secret key securely. Sumsub only shows the secret once.

![Generate a Sumsub app token](https://mintcdn.com/pods-322144f0/z7LxiXc9Lqv5HF9b/images/kyc/sumsub-app-token-setup/01-create-app-token.png?fit=max\&auto=format\&n=z7LxiXc9Lqv5HF9b\&q=85\&s=889b3942b27802881a7c32d05cf74148)

![Enable Reusable Identity share applicants data permission](https://mintcdn.com/pods-322144f0/MiP1ktVEeA9eMtMP/images/kyc/sumsub-app-token-setup/03-share-applicants-data-permission.png?fit=max\&auto=format\&n=MiP1ktVEeA9eMtMP\&q=85\&s=065901b8cb278901fa8eec3567b236ad)

![Save the generated Sumsub app token and secret key](https://mintcdn.com/pods-322144f0/z7LxiXc9Lqv5HF9b/images/kyc/sumsub-app-token-setup/02-save-generated-token.png?fit=max\&auto=format\&n=z7LxiXc9Lqv5HF9b\&q=85\&s=8b569992154018e2f60fa1c9f93382ff)

Store them in your backend:

```bash theme={null}
SUMSUB_API_BASE_URL="https://api.sumsub.com"
SUMSUB_APP_TOKEN="..."
SUMSUB_SECRET_KEY="..."
SUMSUB_LEVEL_NAME="pods-kyc-level"
AVENIA_FOR_CLIENT_ID="..."
```

> [!WARNING]
>
> If Sumsub enables Reusable Identity after you already created an app token, create a new app token and make sure `Reusable Identity` -> `Share applicants data` is selected.

> [!NOTE]
>
> A valid app token still requires active Sumsub credits/license. If Sumsub returns `license-key-exhausted` or `Not enough credit`, ask Sumsub to enable credits for the target environment.

Reference: [Sumsub app tokens](https://docs.sumsub.com/reference/authentication).

## 4. Run WebSDK and confirm approval

Use your backend to create a Sumsub WebSDK access token for the applicant and mount WebSDK in your application. Use the same `pods-kyc-level` level name configured above.

Your backend must only continue to Pods after Sumsub reaches:

```text theme={null}
reviewStatus = completed
reviewResult.reviewAnswer = GREEN
```

You can detect that result by receiving Sumsub webhooks or by polling Sumsub from your backend. If you use webhooks, the target must point to your backend, not to Pods.

Required signal:

| Signal | Required? | Purpose |
| - | - | - |
| `applicantReviewed` with `completed + GREEN` | Yes | Generate the share token and submit it to Pods. |
| `applicantReviewed` with `completed + RED` | Yes | Do not submit to Pods. Keep the user blocked or route them to retry/support. |
| `applicantPending` | Recommended | Useful for monitoring pending reviews. |
| `applicantAwaitingUser` | Recommended | Useful to prompt the user to complete missing steps. |
| `applicantAwaitingService` or `applicantOnHold` | Recommended | Useful for operations visibility. |
| `applicantCreated` | Optional | Logging only. Do not call Pods from this event. |

Reference:

* [Sumsub user verification webhooks](https://docs.sumsub.com/docs/user-verification-webhooks)
* [Sumsub receive verification results](https://docs.sumsub.com/docs/receive-and-interpret-results-via-api)
* [Sumsub WebSDK integration](https://docs.sumsub.com/docs/get-started-with-web-sdk)

## 5. Generate the Sumsub share token

After Sumsub returns `completed + GREEN`, your backend calls Sumsub to generate a fresh share token for that applicant and the Avenia recipient.

```http theme={null}
POST https://api.sumsub.com/resources/accessTokens/shareToken
```

Request:

```json theme={null}
{
  "applicantId": "SUMSUB_APPLICANT_ID",
  "forClientId": "AVENIA_FOR_CLIENT_ID",
  "ttlInSecs": 600
}
```

Use the approved Sumsub applicant id and reuse the same `AVENIA_FOR_CLIENT_ID` provided by Pods. Generate a fresh `shareToken` for each approved applicant import. Sumsub share tokens are short-lived and invalidated after usage.

Response:

```json theme={null}
{
  "token": "SUMSUB_SHARE_TOKEN",
  "forClientId": "AVENIA_FOR_CLIENT_ID"
}
```

Reference:

* [Sumsub generate share token API](https://docs.sumsub.com/reference/generate-share-token)
* [Sumsub reusable KYC via API](https://docs.sumsub.com/docs/reusable-kyc-via-api)
* [Avenia shared token flow](https://integration-guide.avenia.io/docs/KYC/kycSumsubSharedToken/)

## 6. Submit the share token to Pods

Send the fresh token from your backend to Pods. Pods does not store the share token.

Pods validates the submitted CPF and imports the token for your customer-scoped Sumsub applicant. Pods stores only the salted hash and the last four digits, never the raw CPF. A CPF supplied in the request cannot prove that a new applicant owns an existing approved identity.

Repeated submissions for the same applicant share one profile and one active import across API instances. If Avenia reports that the token was already imported into that subaccount, Pods checks that same subaccount for an existing `COMPLETED + APPROVED` attempt before adopting it.

```http theme={null}
POST /api/v1/kyc/sumsub-share-token
```

Request:

```json theme={null}
{
  "cpf": "52998224725",
  "shareToken": "SUMSUB_SHARE_TOKEN",
  "sumsubApplicantId": "SUMSUB_APPLICANT_ID",
  "email": "user@example.com",
  "walletAddress": "0x0000000000000000000000000000000000000001"
}
```

| Field | Required | Description |
| - | - | - |
| `cpf` | Yes | Valid Brazilian CPF bound to this applicant. Send digits only or formatted; Pods does not store the raw value. |
| `shareToken` | Yes | The fresh Sumsub token generated for Avenia. |
| `sumsubApplicantId` | Yes | Unique Sumsub applicant id from the approved applicant. Pods uses it for customer-scoped idempotency. |
| `email` | Yes | User email stored on the Pods KYC profile. |
| `walletAddress` | Yes | User wallet stored on the Pods KYC profile and used by money movement flows. Accepts a checksummed EVM address or a Solana public key. |

Pods generates the public `kycUserId` and returns it in the response. Store this id in your backend and use it for future status checks.

Successful response:

```json theme={null}
{
  "kycUserId": "550e8400-e29b-41d4-a716-446655440000",
  "status": "provider_pending"
}
```

After `rejected_retryable`, send a fresh token with the same customer, `sumsubApplicantId`, CPF or tax ID, and linked wallet. Pods keeps the original `kycUserId` and Avenia subaccount, records the previous attempt id, and returns `provider_pending` for the new attempt. Concurrent retries share one active import. An existing attempt in `created`, `provider_pending`, `rejected`, or `blocked` is not reimported.

When the stored profile is already `approved`, a retry with the same `sumsubApplicantId`, customer, CPF or tax ID, and an already linked wallet returns the original `kycUserId` with `status: approved`. It creates no profile, imports no token, and does not change the approved profile's contact or wallet fields. This also applies to legacy approvals copied from another profile or lacking import metadata. The share token remains required in the request but is not validated or consumed on this approved retry.

Pods trusts these identifiers from your authenticated integration; it does not query the provider to prove token ownership on an approved retry. Your backend must authenticate the end user and authorize their use of that KYC profile. The Pods API key authenticates your integration.

A conflicting CPF returns `409 SUMSUB_CPF_MISMATCH`, and a conflicting tax ID returns `409 SUMSUB_TAX_ID_MISMATCH`. An existing profile cannot gain a different wallet through this endpoint; it returns `409 SUMSUB_WALLET_MISMATCH`. If the identity is already approved for your customer under another applicant, the request returns `409 KYC_VERIFIED_BINDING_REQUIRED` without creating a profile. Retry the original applicant. An approved profile without a stored identity hash also returns this error because its identity cannot be matched. Matching a CPF does not authorize reuse across customers.

A `provider_pending` response means Avenia accepted an import for processing. Approval is final only when that applicant's own Avenia attempt is approved. A duplicate-tax-ID rejection remains a rejection; status polling does not substitute another applicant's approved KYC ID.

## 7. BigDataCorp provider flow

Use this flow when Pods will create the BigDataCorp iframe session and later submit the completed verification to Avenia.

### 7.1 Create the iframe session

Your backend starts the BigDataCorp capture by sending CPF, email, and wallet address to Pods.

```http theme={null}
POST /api/v1/kyc/bigdatacorp/sessions
```

Request:

```json theme={null}
{
  "cpf": "52998224725",
  "email": "user@example.com",
  "walletAddress": "0x0000000000000000000000000000000000000001",
  "externalUserId": "app-user-001",
  "restartExistingSession": true
}
```

Set `restartExistingSession` to `true` every time your app opens or retries the BigDataCorp WebView. Pods then creates a fresh iframe session in the same `kycUserId`, preventing a React Native WebView from rendering a cached URL from a previous attempt. Pods does not restart captures that already reached the Avenia submission stage or an approved state.

When `restartExistingSession` is omitted or `false`, Pods returns the same `iframeUrl` and `iframeSessionId` for an active BigDataCorp capture for up to seven minutes. After that window, or when BigDataCorp reports that the capture cannot continue, Pods creates a new session while keeping the same `kycUserId`.

Check `requiresWebView` before mounting a mobile WebView or iframe. When it is `true`, use `iframeSessionId` as the remount key. When it changes, discard the cached WebView instance before showing the new URL.

Successful response:

```json theme={null}
{
  "kycUserId": "550e8400-e29b-41d4-a716-446655440000",
  "iframeSessionId": "bigdatacorp-onboarding-id",
  "iframeUrl": "https://iframe.bigdatacorp.com.br/550e8400-e29b-41d4-a716-446655440000",
  "requiresWebView": true,
  "status": "created"
}
```

Store `kycUserId` in your backend. Your app should open `iframeUrl` for document and liveness capture.

Before opening an iframe, Pods checks approved BigDataCorp profiles for the same CPF hash. When exactly one known local profile is found, Pods immediately creates or updates your customer-scoped KYC profile with the existing Avenia IDs. If that cached profile does not have a valid birth date yet, Pods makes one `account-info` request to its known Avenia subaccount and caches only the normalized date. If no local profile is known, Pods performs a bounded Avenia subaccount scan while the CPF is still present in this request. When exactly one Avenia individual account has the same tax ID, a confirmed identity, and an approved completed KYC attempt, Pods creates or updates your customer-scoped KYC profile and returns `status: "approved"`, a Pods-hosted completion `iframeUrl`, `iframeSessionId: null`, and `requiresWebView: false`. BRLA is enabled for this customer profile. This preserves compatibility with existing mobile WebViews: render the returned URL as usual, then poll the canonical status endpoint with the returned `kycUserId`. New integrations can use `requiresWebView` to avoid starting a BigDataCorp capture when it is `false`.

```json theme={null}
{
  "kycUserId": "550e8400-e29b-41d4-a716-446655440000",
  "iframeSessionId": null,
  "iframeUrl": "https://api.pods.finance/api/v1/kyc/bigdatacorp/already-verified",
  "requiresWebView": false,
  "status": "approved"
}
```

> [!NOTE]
>
> Pods hashes the CPF and stores only the hash and last four digits. The full CPF is not persisted. The Avenia scan runs only while the session request has the CPF in memory and is cached on an unfinished profile for seven minutes, so repeated requests do not repeatedly enumerate subaccounts. Each customer still receives its own KYC profile.

### 7.2 Poll the same status endpoint

While the user completes the iframe, poll:

```http theme={null}
GET /api/v1/kyc/status?kycUserId=550e8400-e29b-41d4-a716-446655440000
```

For BigDataCorp profiles, this endpoint checks the provider while no Avenia KYC attempt exists yet. Status polling does not adopt a previously approved identity or run a new Avenia tax-ID scan. Approved identity reuse is evaluated only when the iframe session starts and during the final Avenia submit, while the intermediate capture keeps its normal `created` or `provider_pending` status. When BigDataCorp has returned the captured images and identity data, `providerResult` becomes `WAITING_ADDRESS_TO_SUBMIT_TO_AVENIA`, and `documentStatus`, `livenessStatus`, and `ageAtVerification` are updated.

Provider-side values returned on the status endpoint:

| `providerResult` | Meaning |
| - | - |
| `PENDING_CAPTURE` | The iframe has not returned the required document and liveness images yet. |
| `PENDING_PROVIDER_REVIEW` | Images exist, but BigDataCorp has not returned usable provider results yet. |
| `PENDING_IDENTITY_DATA` | Images exist, but required identity fields such as CPF, name, or birth date are missing. |
| `WAITING_ADDRESS_TO_SUBMIT_TO_AVENIA` | BigDataCorp capture is ready. Collect the address fields and call the submit endpoint. |
| `AVENIA_IDENTITY_REUSED` | Pods found exactly one approved Avenia identity for the verified CPF, either from a known BigDataCorp profile or the bounded session-time Avenia scan, and linked this customer-scoped KYC profile to it with `status: approved`. BRLA is enabled for this customer profile. |
| `DUPLICATE_TAX_ID_NO_APPROVED_MATCH` | Avenia reported a duplicate tax ID, but Pods could not find one approved KYC profile or Avenia subaccount to reuse. The profile status becomes `rejected_retryable`. |
| `DUPLICATE_TAX_ID_AMBIGUOUS_MATCH` | More than one approved KYC profile or Avenia subaccount matched the CPF. Pods does not choose between them automatically. |
| `DUPLICATE_TAX_ID_SCAN_LIMIT_REACHED` | The bounded Avenia reconciliation scan did not complete. The profile remains retryable for support review. |
| `AVENIA_KYC_SUBMIT_FAILED` | Avenia rejected or failed the final submit before Pods could create a normal pending Avenia attempt. The profile status becomes `rejected_retryable`. |

### Reset an unfinished BigDataCorp profile

Use [Reset BigDataCorp KYC](https://docs.pods.finance/api-reference/kyc/reset-bigdatacorp-kyc) when an unfinished capture or retryable failure needs to be archived. Both email and wallet address must match one BigDataCorp profile belonging to your API key's customer.

```bash theme={null}
curl -X POST "https://api.pods.finance/api/v1/kyc/bigdatacorp/reset" \
  -H "x-api-key: YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"email":"user@example.com","walletAddress":"0x0000000000000000000000000000000000000001"}'
```

Success returns **204 with no body**. The operation archives only the local profile and makes its old `kycUserId` unavailable to status, submit, and currency-unlock requests. It does not contact BigDataCorp or Avenia, delete their data, or open another session. Call the normal sessions endpoint separately when you want to onboard again using the same CPF, email, and wallet. Its existing approved-Avenia-identity reuse behavior still applies.

Each request targets the currently matching active profile. Repeating the request after archival returns 404 unless a replacement profile has been created. Email is trimmed and lowercased, EVM wallet addresses are checksummed, and Solana wallet addresses preserve case.

Only `created` profiles without submission evidence and `rejected_retryable` profiles can be reset. Currency-enabled profiles, approved profiles, final rejections, blocked profiles, and submissions being processed cannot be reset. Known queued or running KYC tasks also prevent reset.

| HTTP / code | Meaning |
| - | - |
| `404 KYC_PROFILE_NOT_FOUND` | No active BigDataCorp profile matches both fields for this customer. |
| `409 KYC_RESET_AMBIGUOUS` | More than one active profile matches; no profile was changed. |
| `409 KYC_RESET_NOT_ALLOWED` | The current KYC state is ineligible. |
| `409 KYC_RESET_IN_PROGRESS` | KYC work is pending or processing. |
| `409 KYC_RESET_CONFLICT` | The target changed during reset; check its current state. |
| `422 VALIDATION_ERROR` | A required field is missing or invalid, or the body contains unexpected fields. |

### 7.3 Submit completed BigDataCorp KYC to Avenia

After BigDataCorp capture is ready and the user is at least 18, submit the address data required by Avenia:

```http theme={null}
POST /api/v1/kyc/bigdatacorp/submit
```

Request:

```json theme={null}
{
  "kycUserId": "550e8400-e29b-41d4-a716-446655440000",
  "phone": "+5511999999999",
  "address": {
    "country": "BRA",
    "state": "SP",
    "city": "Sao Paulo",
    "zipCode": "01001000",
    "streetAddress": "Rua Teste",
    "number": "123",
    "complement": "Sala 1"
  }
}
```

| Field | Required | Description |
| - | - | - |
| `kycUserId` | Yes | Pods KYC user id returned by the BigDataCorp session endpoint. |
| `phone` | No | Phone forwarded to Avenia if available. |
| `address.country` | No | Defaults to `BRA`; only Brazil is accepted. |
| `address.state` | Yes | Brazilian state code, such as `SP`. |
| `address.city` | Yes | City. |
| `address.zipCode` | Yes | Brazilian CEP with 8 digits. |
| `address.streetAddress` | Yes | Street name. |
| `address.number` | Yes | Building number. |
| `address.complement` | No | Optional address complement. |

Pods fetches the required BigDataCorp images on demand, forwards them to Avenia, and moves the status to `provider_pending` when Avenia accepts the submit. Before it creates a subaccount or uploads documents, Pods performs the same exact-CPF Avenia identity resolution used by the session endpoint. If one approved identity already exists, Pods links the current customer profile and returns the unchanged success response shape with `status: "approved"`; BRLA is enabled for the profile. Pods does not persist the address or raw images. A durable Pods background task keeps refreshing the Avenia attempt and writes the final KYC state even when your application stops polling. Continue polling the canonical status endpoint to update your user interface. If your UI retries while the Avenia submission is already running, Pods returns the current `provider_pending` state without sending duplicate documents or KYC requests.

If this endpoint returns `409 BIGDATACORP_CAPTURE_INCOMPLETE`, the BigDataCorp capture is not ready to be sent to Avenia yet. Check `error.details.providerResult`: `PENDING_CAPTURE` means document or liveness images are still missing, `PENDING_PROVIDER_REVIEW` means the provider has not returned a final usable result yet, and `PENDING_IDENTITY_DATA` means required identity fields are missing. Keep polling the status endpoint until it returns `WAITING_ADDRESS_TO_SUBMIT_TO_AVENIA`.

Successful response:

```json theme={null}
{
  "kycUserId": "550e8400-e29b-41d4-a716-446655440000",
  "status": "provider_pending"
}
```

When Pods reuses a previously approved Avenia identity, the response keeps the same schema:

```json theme={null}
{
  "kycUserId": "550e8400-e29b-41d4-a716-446655440000",
  "status": "approved"
}
```

If Avenia rejects the final submit because the tax ID already exists, Pods first attempts to reuse one exact approved BigDataCorp KYC profile. If no local profile matches, Pods performs a bounded Avenia subaccount scan. If that recovery is not unique, the submit request returns `409 AVENIA_IDENTITY_RECONCILIATION_REQUIRED` and Pods persists the retryable diagnostic on the KYC profile. Poll the status endpoint to inspect the normalized result:

```json theme={null}
{
  "kycUserId": "550e8400-e29b-41d4-a716-446655440000",
  "provider": "bigdatacorp",
  "email": "user@example.com",
  "walletAddress": "0x0000000000000000000000000000000000000001",
  "status": "rejected_retryable",
  "brlaEnabled": false,
  "rejectReason": "cannot repeat taxId across multiple users",
  "providerStatus": "400",
  "providerResult": "DUPLICATE_TAX_ID_NO_APPROVED_MATCH",
  "providerMessage": "cannot repeat taxId across multiple users",
  "livenessStatus": "passed",
  "documentStatus": "passed",
  "ageAtVerification": 26,
  "updatedAt": "2026-07-08T02:03:41.856Z"
}
```

## 8. Poll KYC status

Avenia validation is asynchronous. Pods schedules a durable background monitor after a BigDataCorp submit is accepted, so the stored KYC status keeps progressing even when your client is offline. Poll Pods until the status reaches a terminal state to update your own UI. This is the canonical status endpoint for both Sumsub and BigDataCorp profiles.

If you subscribe to it, Pods also pushes each status change to your webhook as a [`KYC_UPDATE`](https://docs.pods.finance/guides/webhooks#kyc_update) event. Its `data` is the same object this endpoint returns, so you can stop polling once the profile is `provider_pending`.

```http theme={null}
GET /api/v1/kyc/status?kycUserId=550e8400-e29b-41d4-a716-446655440000
```

Successful response:

```json theme={null}
{
  "kycUserId": "550e8400-e29b-41d4-a716-446655440000",
  "provider": "sumsub",
  "email": "user@example.com",
  "walletAddress": "0x0000000000000000000000000000000000000001",
  "walletAddresses": ["0x0000000000000000000000000000000000000001"],
  "status": "approved",
  "brlaEnabled": true,
  "rejectReason": null,
  "providerStatus": "COMPLETED",
  "providerResult": "APPROVED",
  "providerMessage": null,
  "livenessStatus": null,
  "documentStatus": null,
  "ageAtVerification": null,
  "bigDataCorpIframeCreatedAt": null,
  "bigDataCorpCompletedAt": null,
  "aveniaSubmissionStartedAt": "2026-06-15T12:04:30.000Z",
  "aveniaSubmittedAt": "2026-06-15T12:05:00.000Z",
  "aveniaApprovedAt": "2026-06-15T12:06:00.000Z",
  "updatedAt": "2026-06-15T12:01:00.000Z"
}
```

For BigDataCorp profiles, these timestamps provide an idempotent operational timeline. Status polling and the background Avenia monitor fill each milestone only once: iframe creation, provider completion, Avenia submission start, Avenia acceptance, and final Avenia approval.

| Status | Meaning |
| - | - |
| `created` | Local user exists, but no Avenia KYC attempt exists yet. |
| `provider_pending` | Avenia KYC attempt exists and is processing. |
| `approved` | Money movement is enabled. |
| `rejected` | Money movement is blocked. |
| `rejected_retryable` | User can retry KYC depending on your UX. This also covers a BigDataCorp duplicate-tax-ID reconciliation that found no unique approved Avenia identity. |
| `blocked` | Avenia import was blocked before a normal pending KYC attempt was created. |

`walletAddress` is the primary wallet (the one stored at session create). `walletAddresses` lists every wallet allowed to quote and ticket against this `kycUserId`. Link extras without creating a second KYC profile:

```http theme={null}
POST /api/v1/kyc/{kycUserId}/wallets
```

```json theme={null}
{ "walletAddress": "0x0000000000000000000000000000000000000002" }
```

Unlink with `DELETE /api/v1/kyc/{kycUserId}/wallets/{walletAddress}`. The last wallet cannot be removed. A wallet can belong to only one `kycUserId` per customer.

## 9. Use onramp and offramp quotes

Money movement routes are available only after KYC status is `approved`.

The active integration uses Swap v2 quote routes. Send all requests from your backend with `x-api-key`; never expose `PODS_API_KEY` to a browser or mobile client.

### Pix onramp: BRL to USDC on Base

Use this when a verified user pays Pix in BRL and receives USDC on Base. When you include `destinationAddress`, the quote response includes Pix payment instructions directly.

```http theme={null}
GET /v2/swap/quote
```

Example:

```bash theme={null}
curl -sS \
  -H "x-api-key: $PODS_API_KEY" \
  "$PODS_API_BASE_URL/v2/swap/quote?originChain=fiat&destinationChain=base&tokenIn=BRL&tokenOut=0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913&amountIn=1000&destinationAddress=0x0000000000000000000000000000000000000001"
```

| Query parameter | Required | Value |
| - | - | - |
| `originChain` | Yes | `fiat` |
| `destinationChain` | Yes | `base` |
| `tokenIn` | Yes | `BRL` |
| `tokenOut` | Yes | Base USDC: `0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913` |
| `amountIn` | Yes | BRL amount in cents. Example: `1000` is BRL 10.00. |
| `destinationAddress` | Yes | User wallet address that will receive USDC. Must match an `approved` KYC profile for that wallet. |

Successful response:

```json theme={null}
{
  "quote": {
    "quoteId": "9be08433-3338-4881-9517-31faa22489c9",
    "originChain": "fiat",
    "destinationChain": "base",
    "tokenIn": {
      "symbol": "BRL",
      "decimals": 2,
      "amount": "1000"
    },
    "tokenOut": {
      "contract": "0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913",
      "symbol": "USDC",
      "decimals": 6,
      "expectedAmountOut": "1769602",
      "chainId": 8453
    },
    "status": "pending",
    "deadlineDate": "2026-06-25T15:38:38.670Z",
    "feeBreakdown": {
      "charges": [
        {
          "kind": "paymentRail",
          "label": "Pix fee",
          "amountRaw": "77",
          "decimals": 2,
          "symbol": "BRL",
          "asset": "tokenIn"
        },
        {
          "kind": "bridgeAndSlippage",
          "label": "Bridge fee + slippage",
          "amountRaw": "8848",
          "decimals": 6,
          "symbol": "USDC",
          "asset": "tokenOut"
        }
      ]
    }
  },
  "paymentInstructions": {
    "method": "PIX",
    "amount": {
      "currency": "BRL",
      "amountRaw": "1000",
      "decimals": 2
    },
    "expiresAt": "2026-06-25T15:43:39.433Z",
    "pix": {
      "copyPaste": "000201010212..."
    }
  },
  "chainId": null,
  "transactionData": [],
  "id": "65f1a2b3c4d5e6f789012345"
}
```

Show `paymentInstructions.pix.copyPaste` to the user as the Pix copy-paste code. Use `quote.feeBreakdown` to display Pix, Pods/customer, and bridge or slippage charges. Top-level `id` is the Action id; poll status with `quote.quoteId`.

### Pix offramp: USDC (Base or Monad) to BRL Pix

Use this when a verified user pays USDC on Base or Monad and receives BRL through Pix. The user must have an `approved` KYC profile for the same `originAddress`. Pass `originAddress` and `pixKey` on the quote — the response includes `transactionData` ready to sign. The examples below use Base; for Monad, set `originChain=monad` and the Monad USDC address (`chainId` 143).

```http theme={null}
GET /v2/swap/quote
```

Example:

```bash theme={null}
curl -sS \
  -H "x-api-key: $PODS_API_KEY" \
  "$PODS_API_BASE_URL/v2/swap/quote?originChain=base&destinationChain=fiat&tokenIn=0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913&tokenOut=BRL&amountIn=1000000&originAddress=0x0000000000000000000000000000000000000001&pixKey=user-pix-key@example.com"
```

| Query parameter | Required | Value |
| - | - | - |
| `originChain` | Yes | `base` or `monad` |
| `destinationChain` | Yes | `fiat` |
| `tokenIn` | Yes | Base USDC: `0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913`; Monad USDC: `0x754704Bc059F8C67012fEd69BC8A327a5aafb603` |
| `tokenOut` | Yes | `BRL` |
| `amountIn` | Yes | USDC amount in smallest units. Example: `1000000` is 1.00 USDC. |
| `originAddress` | Yes | Approved wallet address that will send USDC on the selected origin chain. |
| `pixKey` | Yes | Pix key that will receive BRL. |

Successful response:

```json theme={null}
{
  "quote": {
    "quoteId": "1ed3ff63-58b8-4eb4-9152-723bbdfec724",
    "originChain": "base",
    "destinationChain": "fiat",
    "tokenIn": {
      "contract": "0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913",
      "symbol": "USDC",
      "decimals": 6,
      "amount": "1000000",
      "chainId": 8453
    },
    "tokenOut": {
      "contract": "BRL",
      "symbol": "BRL",
      "decimals": 2,
      "amount": "520",
      "expectedAmountOut": "520",
      "chainId": 0
    },
    "provider": "deframe",
    "status": "pending",
    "deadlineDate": "2026-06-29T22:21:12.230Z",
    "feeBreakdown": {
      "charges": [
        {
          "kind": "paymentRail",
          "label": "Pix fee",
          "amountRaw": "20",
          "decimals": 2,
          "symbol": "BRL",
          "asset": "tokenOut"
        }
      ]
    }
  },
  "chainId": 8453,
  "depositAddress": "0x4444444444444444444444444444444444444444",
  "transactionData": [
    {
      "chainId": "8453",
      "to": "0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913",
      "data": "0x...",
      "value": "0"
    },
    {
      "chainId": "8453",
      "to": "0x...",
      "data": "0x...",
      "value": "0"
    }
  ],
  "id": "65f1a2b3c4d5e6f789012345"
}
```

Execute every transaction in `transactionData`, in order, from `originAddress` on the selected origin chain (`base` → `chainId` 8453, `monad` → `chainId` 143; each transaction carries its own `chainId`). The first transaction transfers USDC to the returned `depositAddress`; the next transaction records the transfer for tracking. After Pods detects and collects the USDC payment, Pods creates the Avenia Pix payout to `pixKey`. Track with `GET /v2/swap/status/{quote.quoteId}`.

### Pix to yield: BRL to a yield-bearing asset

Some routes deposit Pix BRL directly into a yield strategy instead of a plain token. The shape of the flow is identical to the plain Pix onramp above -- only the `tokenOut` changes, from the plain token address to the strategy's yield-bearing asset address (for example a vault share token such as `<yield_asset>` on `<yield_chain>`).

```http theme={null}
GET /v2/swap/quote
```

Example:

```bash theme={null}
curl -sS \
  -H "x-api-key: $PODS_API_KEY" \
  "$PODS_API_BASE_URL/v2/swap/quote?originChain=fiat&destinationChain=<yield_chain>&tokenIn=BRL&tokenOut=<yield_asset_address>&amountIn=1000&destinationAddress=0x0000000000000000000000000000000000000001"
```

| Query parameter | Required | Value |
| - | - | - |
| `originChain` | Yes | `fiat` |
| `destinationChain` | Yes | `<yield_chain>` |
| `tokenIn` | Yes | `BRL` |
| `tokenOut` | Yes | `<yield_asset>` contract address on `<yield_chain>` |
| `amountIn` | Yes | BRL amount in cents. Example: `1000` is BRL 10.00. |
| `destinationAddress` | Yes | User wallet address that will receive `<yield_asset>`. |

Successful response:

```json theme={null}
{
  "quote": {
    "quoteId": "9be08433-3338-4881-9517-31faa22489c9",
    "originChain": "fiat",
    "destinationChain": "<yield_chain>",
    "tokenIn": {
      "symbol": "BRL",
      "decimals": 2,
      "amount": "1000"
    },
    "tokenOut": {
      "contract": "<yield_asset_address>",
      "symbol": "<yield_asset>",
      "decimals": 18,
      "expectedAmountOut": "...",
      "chainId": 0
    },
    "status": "pending",
    "deadlineDate": "2026-06-25T15:38:38.670Z",
    "feeBreakdown": {
      "charges": []
    }
  },
  "paymentInstructions": {
    "method": "PIX",
    "amount": {
      "currency": "BRL",
      "amountRaw": "1000",
      "decimals": 2
    },
    "expiresAt": "2026-06-25T15:43:39.433Z",
    "pix": {
      "copyPaste": "000201010212..."
    }
  },
  "id": "9be08433-3338-4881-9517-31faa22489c9"
}
```

`quote.tokenOut.decimals` reflects the yield-bearing asset's own decimals (for example `18` for a vault share token), not the underlying token's decimals. `quote.tokenOut.amount`/`expectedAmountOut` is a raw **share** amount of `<yield_asset>`, not an underlying-token amount. Store it: it lets you reconstruct the exact deposited share amount later for a full yield-to-Pix withdraw.

There is no on-chain transaction for the user to sign on this side. After the Pix payment settles, Pods collects the BRL, converts it into the strategy's underlying token, deposits into the strategy, and sends the resulting `<yield_asset>` shares to `destinationAddress`.

### Yield to Pix: a yield-bearing asset back to BRL

Use this when a verified user wants to redeem a yield position and receive BRL through Pix. The input token is the yield-bearing asset itself (for example `<yield_asset>` on `<yield_chain>`), not the underlying token, and `amountIn` must be a raw share amount of `<yield_asset>` -- not an underlying-token amount and not a `principal`/`currentPosition` value from the wallet endpoint (see [Check yield position and profit](#check-yield-position-and-profit) below). For a full withdraw, use the wallet's on-chain share balance, or the share amount stored from the deposit quote above.

> [!WARNING]
>
> Do not pass a USDC- or BRL-denominated position value as `amountIn` for a yield-to-Pix quote. `amountIn` here is always a raw share amount of the yield-bearing asset.

```http theme={null}
GET /v2/swap/quote
```

Example:

```bash theme={null}
curl -sS \
  -H "x-api-key: $PODS_API_KEY" \
  "$PODS_API_BASE_URL/v2/swap/quote?originChain=<yield_chain>&destinationChain=fiat&tokenIn=<yield_asset_address>&tokenOut=BRL&amountIn=1000000000000000000&originAddress=0x0000000000000000000000000000000000000001&pixKey=user-pix-key@example.com"
```

| Query parameter | Required | Value |
| - | - | - |
| `originChain` | Yes | `<yield_chain>` |
| `destinationChain` | Yes | `fiat` |
| `tokenIn` | Yes | `<yield_asset>` contract address on `<yield_chain>` |
| `tokenOut` | Yes | `BRL` |
| `amountIn` | Yes | Raw `<yield_asset>` share amount to redeem. |
| `originAddress` | Yes | Approved wallet address that holds the `<yield_asset>` position. |
| `pixKey` | Yes | Pix key that will receive BRL. |

Successful response includes `quote` plus `transactionData` / `chainId` / `id` (same shape as the USDC offramp). Execute every transaction in `transactionData`, in order, from `originAddress`. The first transaction redeems `<yield_asset>` into the strategy's underlying token and sends it directly to `depositAddress`; the next transaction records the transfer for tracking. Pods validates the redeem on-chain before creating the Avenia Pix payout to `pixKey`.

### Check yield position and profit

For routes that hold a yield position, use `GET /v2/wallets/{wallet}` to read the strategy position instead of a plain token balance. Find the entry where `strategy.id` matches the strategy backing `<yield_asset>` on `<yield_chain>`.

`spotPosition.currentPosition`, `principal`, `profit`, and `cumulativeProfit` are all reported in the strategy's **underlying token** terms (for example USDC), even though the wallet's on-chain balance is held as `<yield_asset>` shares. Do not use any of these values as the `amountIn` share amount for a yield-to-Pix quote -- they are reporting values, not share amounts. To withdraw the full position to Pix, use the wallet's on-chain `<yield_asset>` share balance or the share amount stored from the original deposit quote.

If the user instead wants to exit the yield position into the underlying token on-chain (no Pix involved), use that strategy's own withdraw bytecode endpoint, which takes an underlying-token amount rather than a share amount -- see the yield strategy guides for details.

### Use offramp to make a Pix payment to a third party

Use this when a verified user wants to convert USDC (Base or Monad) into a Pix payment sent to someone else, instead of paying themselves back. This is the same offramp flow as above, with two differences: set `thirdParty=true` on the quote, and pass the **recipient's** Pix key in `pixKey` (normal offramp assumes `pixKey` belongs to the same person as `originAddress`; third-party offramp does not).

```http theme={null}
GET /v2/swap/quote
```

Example:

```bash theme={null}
curl -sS \
  -H "x-api-key: $PODS_API_KEY" \
  "$PODS_API_BASE_URL/v2/swap/quote?originChain=base&destinationChain=fiat&tokenIn=0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913&tokenOut=BRL&amountIn=1000000&originAddress=0x0000000000000000000000000000000000000001&pixKey=recipient-pix-key@example.com&thirdParty=true"
```

| Query parameter | Required | Value |
| - | - | - |
| `originChain` | Yes | `base` or `monad` |
| `destinationChain` | Yes | `fiat` |
| `tokenIn` | Yes | Base USDC: `0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913`; Monad USDC: `0x754704Bc059F8C67012fEd69BC8A327a5aafb603` |
| `tokenOut` | Yes | `BRL` |
| `amountIn` | Yes | USDC amount in smallest units. |
| `originAddress` | Yes | Approved wallet address that will send USDC on the selected origin chain. |
| `pixKey` | Yes | Pix key of the **recipient** receiving the payment -- not the origin wallet owner's own key. |
| `thirdParty` | Yes | `true`. Marks this offramp as paying a Pix key that does not belong to `originAddress`'s own KYC profile. |

The response includes `transactionData` like a normal offramp. Execute and track status the same way; only the recipient of the resulting Pix payout differs.

### Track swap status

Track both quote flows with the Swap v2 status endpoint.

```http theme={null}
GET /v2/swap/status/9be08433-3338-4881-9517-31faa22489c9
```

| Status | Meaning |
| - | - |
| `pending` | Payment has not been detected yet, or the quote is still waiting for confirmation. |
| `confirmed` | Payment was detected and output settlement is not final yet. |
| `processing` | Output settlement is in progress. |
| `fulfilled` | Final success state. |
| `expired` | Quote or Pix payment expired before payment was detected. |
| `failed` | Operational failure. Show an error and route to support or retry. |
| `refunded` | Refund flow finished, when applicable. |

A settled Pix quote also returns `fiatSettlement` (`endToEndId`, and `refundEndToEndId` when the Pix was refunded). See [Pix receipt](https://docs.pods.finance/guides/ramp/status.md#pix-receipt).

Reference:

* [Get swap quote](https://docs.pods.finance/guides/swaps/get-quote.md)
* [Execute a swap](https://docs.pods.finance/guides/swaps/execute-swap.md)

## References

* [Sumsub app token authentication](https://docs.sumsub.com/reference/authentication)
* [Sumsub configure verification levels](https://docs.sumsub.com/docs/configure-verification-levels)
* [Sumsub partner management](https://docs.sumsub.com/docs/manage-sharing-partners)
* [Sumsub user verification webhooks](https://docs.sumsub.com/docs/user-verification-webhooks)
* [Sumsub generate share token API](https://docs.sumsub.com/reference/generate-share-token)
* [Sumsub reusable KYC via API](https://docs.sumsub.com/docs/reusable-kyc-via-api)
* [Avenia Sumsub shared token flow](https://integration-guide.avenia.io/docs/KYC/kycSumsubSharedToken/)


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.