# Payment object

Crypto creation, fiat creation, payment retrieval, and payment webhooks use the same allow-listed payment schema. Fields that do not apply to a payment type can be absent or `null`.

## Identity and lifecycle

| Field | Type | Description |
| --- | --- | --- |
| `id` | string | Internal public resource ID. |
| `txId` | string | Relay transaction identifier used by the retrieval endpoint. |
| `txRef` | string | Merchant reference supplied at creation. Not an idempotency key. |
| `type` | string | `crypto` or `fiat`. |
| `direction` | string | Payment direction; supported collection requests use `deposit`. |
| `status` | string | Overall payment lifecycle state. See [statuses](/docs/reference/statuses-and-assets). |
| `resourceVersion` | integer | Monotonic public-resource version used by webhooks. |
| `accountingState` | string | `ready` or `review_required` for confirmed-funding accounting. |
| `createdAt` | string | Creation time in ISO 8601 UTC. |
| `updatedAt` | string | Last update time in ISO 8601 UTC. |
| `fundedAt` | string or null | Time Relay established that the target was fully funded. |
| `paymentWindowEndsAt` | string or null | End of the active funding window when that network uses one. |
| `paymentWindowClosedAt` | string or null | Time the funding window was closed. |

## Asset and chain

| Field | Type | Description |
| --- | --- | --- |
| `cryptonetwork` | string | Funding or settlement network. |
| `cryptotoken` | string | Funding or settlement asset symbol. |
| `tokenContractAddress` | string or null | Token contract or mint pinned when the payment was created. |
| `chainId` | integer or null | Numeric EVM chain ID where applicable; `null` for Solana. |
| `chainIdentity` | string or null | Pinned non-EVM chain identity, including Solana genesis identity. |
| `tokenStandard` | string or null | `SPL` for Solana payment intents. |
| `tokenDecimals` | integer or null | Token precision Relay expects for the pinned asset. |
| `depositTokenAccount` | string or null | Solana associated token account that receives the SPL transfer. |

Use these pinned fields for the payment. Do not replace them with newer runtime asset configuration after an intent has been created.

## Amounts and accounting

All fields in this section are exact decimal strings.

| Field | Description |
| --- | --- |
| `expectedAmount` | Exact amount expected at the funding address. For crypto, this includes the quoted fee; for fiat, it represents expected settlement-token proceeds. |
| `originalAmount` | Immutable confirmed-funding target for crypto accounting. |
| `confirmedAmount` | Cumulative eligible amount confirmed on-chain. |
| `outstandingAmount` | Remaining amount required to reach the target. |

Do not use binary floating-point math for these values. Use an arbitrary-precision decimal library and compare values in the token's precision.

## Customer and settlement

| Field | Type | Description |
| --- | --- | --- |
| `useremail` | string | Customer email supplied at creation. |
| `metadata` | object | Merchant metadata supplied at creation. |
| `postTransactionType` | string | `external_wallet` or `organization_settlement`. Historical records may still contain `organization_wallet`. |
| `postTransactionAddress` | string or null | Destination snapshot resolved for this payment. Later dashboard changes do not alter it. |
| `settlementStatus` | string | Independent outgoing-settlement state. |
| `settlementTransactionHash` | string or null | Outgoing settlement transaction hash once available. |

Incoming funding never disappears because outgoing settlement failed. Reconcile `status`, `confirmedAmount`, and `settlementStatus` independently.

## Temporary wallets

`tempWallet` is an array. Creation currently returns one temporary wallet.

| Field | Type | Description |
| --- | --- | --- |
| `id` | string | Temporary wallet resource ID. |
| `address` | string | Owner/deposit address. For Solana tokens, use `depositTokenAccount` as the SPL destination. |
| `network` | string | Wallet network. |
| `createdAt` | string | Creation time. |
| `updatedAt` | string | Last update time. |

## Amount trackers

`paymentamount` is an array of funding and offset accounting records.

| Field | Type | Description |
| --- | --- | --- |
| `id` | string | Tracker ID. |
| `trackerType` | string | `payment_intent` or `payment_intent_offset`. |
| `currencyType` | string | Currency type associated with the tracker. |
| `expectedAmount` | decimal string | Expected amount for this tracker. |
| `amount` | decimal string or null | Observed/applied amount. |
| `feeincrypto` | decimal string or null | Crypto fee associated with the quote. |
| `feeinfiat` | decimal string or null | Fiat fee when applicable. |
| `fiatcurrency` | string or null | Fiat currency when applicable. |
| `tempWallet` | string or null | Associated temporary wallet ID. |
| `transactionId` | string or null | Associated transaction identifier. |
| `txHash` | string or null | On-chain transaction hash. |
| `completedIntent` | boolean or null | Whether the record completed its intent contribution. |
| `status` | string or null | Tracker status. |
| `createdAt` | string | Creation time. |
| `updatedAt` | string | Last update time. |

## Fiat summary fields

These top-level convenience fields are present for fiat intents when available:

| Field | Type | Description |
| --- | --- | --- |
| `rate` | decimal string | Buffered fiat-per-USD rate captured for the intent. |
| `expectedSettlementTokenAmount` | decimal string | Expected crypto settlement amount. |
| `virtualAccountExpiresAt` | string or null | Virtual-account expiry time. |
| `virtualAccountExpiresIn` | integer or null | Provider validity duration in seconds. |

## Fiat detail

`fiatDetail` contains the collection quote, virtual-account instructions, and settlement snapshot.

| Field | Type | Description |
| --- | --- | --- |
| `fiatCurrency` | string | Fiat currency, currently `ngn`. |
| `fiatAmount` | decimal string | Exact customer payment amount. |
| `usdPerFiat` | decimal string | Source USD per fiat-unit rate. |
| `fiatPerUsd` | decimal string | Inverse source rate before Relay's configured buffer. |
| `bufferAmountNgn` | decimal string | Fixed NGN amount added to the effective fiat-per-USD rate. |
| `bufferedFiatPerUsd` | decimal string | Effective quoted fiat-per-USD rate. |
| `usdAmount` | decimal string | Converted USD value. |
| `tokenUsdRate` | decimal string | Settlement token's USD rate. |
| `expectedTokenAmount` | decimal string | Expected settlement-token amount. |
| `settlementNetwork` | string | Destination network snapshot. |
| `settlementToken` | string | Destination token snapshot. |
| `settlementAddress` | string | Destination address snapshot. |
| `externalReference` | string | Provider reference, normally Relay's `txId`. |
| `virtualAccountId` | string or null | Provider virtual-account ID. |
| `virtualAccountNumber` | string or null | Account number shown to the payer. |
| `virtualAccountBankCode` | string or null | Bank code. |
| `virtualAccountAccountName` | string or null | Beneficiary/account name. |
| `virtualAccountCurrencyCode` | string or null | Account currency code. |
| `virtualAccountStatus` | string or null | Provider account state. |
| `virtualAccountValidFor` | integer or null | Effective validity in seconds. |
| `virtualAccountAmountControl` | string or null | Provider amount-control mode. |
| `virtualAccountAmount` | decimal string or null | Amount attached to the virtual account. |
| `virtualAccountExpiryDate` | string or null | Provider expiry time. |
| `virtualAccountCallbackUrl` | string or null | Provider/Relay callback route; do not invoke it from your integration. |
| `settlementBankName` | string or null | Collection bank display name. |
| `createdAt` | string | Detail creation time. |
| `updatedAt` | string | Detail update time. |
