# Mock funds available

This API is only available in sandbox mode. Updates the funds_available status of a payment to simulate  the availability of funds for testing purposes.

Endpoint: PATCH /payment/{id}/mock-funds-available
Version: 1.0.0
Security: JWT

## Path parameters:

  - `id` (string, required)

## Response 200 fields (application/json):

  - `data` (object)

  - `data.id` (string)
    The unique identifier for the payment.
    Example: payt_E602dMzgjpDC

  - `data.payin_id` (string | null)
    The unique identifier for the payin. This is set only for payments associated to a payin.
    Example: payin_E602dMzgjpDC

  - `data.payin_type` (string | null)
    The type of the payin. This is set only for payments associated to a payin.
    Enum: "payment_link", "orders", "add_funds"

  - `data.subscription_id` (string | null)
    The unique identifier for the subscription. This is set only for subscription-related payments.
    Example: sub_68877570b5zeE

  - `data.status` (string)
    The status of the payment.
    Enum: "success", "failed", "action_required", "in_progress", "under_review"

  - `data.compliance_status` (string | null)
    The compliance review status of the payment. Present only for payments that have been screened for sanctions or transaction-monitoring holds; `null` for payments that were not screened. This is separate from `status` — a payment can be `status: success` while `compliance_status` is `action_required`, meaning the payment itself completed but funds are held pending compliance review. See the `rfi` field for what's required when `action_required`.
    Enum: "action_required", "under_review", "approved", "rejected"

  - `data.rfi` (object)
    Present only when a compliance-related Request For Information exists on this payment. Describes why the payment was flagged and what's required to resolve it.

  - `data.rfi.id` (string)
    The unique identifier for the RFI.
    Example: rfi_6a72a39b38jDD

  - `data.rfi.reason_code_description` (string)
    A human-readable description of why this payment was flagged for compliance review.
    Example: The payment has been flagged for a compliance review and requires additional information before it can credited to your account.

  - `data.rfi.reason_code` (string)
    A machine-readable code for the compliance review reason.
    Example: COMPLIANCE_REVIEW

  - `data.rfi.response_deadline` (string | null)
    The deadline by which the requested documents must be submitted. `null` when no deadline has been set.
    Example: 2026-08-21T10:29:00Z

  - `data.rfi.documents_required` (array)
    Present only when `compliance_status` is `action_required`. The documents needed to resolve this RFI. Submit documents against a specific requirement using its `rfi_doc_id` via the [Respond to an RFI](/api-documentation/apis/openapi/rfi/respondrfi) endpoint, passing the `rfi.id` as the RFI identifier.

  - `data.rfi.documents_required.rfi_doc_id` (string)
    The unique identifier for this document requirement.
    Example: rfidoc_6a72a39b38jDD

  - `data.rfi.documents_required.description` (string)
    A human-readable description of what document is needed.
    Example: Passport

  - `data.rfi.documents_required.multiple_allowed` (boolean)
    Whether more than one document can be submitted for this requirement.
    Example: false

  - `data.rfi.documents_required.max_count` (integer)
    The maximum number of documents that can be submitted for this requirement.
    Example: 1

  - `data.payment_currency` (string)
    The currency in which the customer pays. The currency code is in [ISO 4217](https://en.wikipedia.org/wiki/ISO_4217) format. For example, AED.
    Example: AED

  - `data.payment_amount` (number)
    The total amount the customer pays in cents (includes customer-borne fees if applicable). For example, 374580 cents is 3,745.80 AED. The currency is determined by the `payment_currency` field.
    Example: 374580

  - `data.converted_currency` (string)
    The settlement currency after conversion. The currency code is in [ISO 4217](https://en.wikipedia.org/wiki/ISO_4217) format. For example, USD.
    Example: USD

  - `data.converted_amount` (number)
    The final amount after currency conversion in cents (includes all fees). For example, 102000 cents is $1,020.00. The currency is determined by the `converted_currency` field.
    Example: 102000

  - `data.requested_currency` (string)
    The currency that was originally requested by the merchant. The currency code is in [ISO 4217](https://en.wikipedia.org/wiki/ISO_4217) format. For example, USD.
    Example: USD

  - `data.requested_amount` (number)
    The amount originally requested by the merchant in cents, excluding customer-borne fees. For example, 100000 cents is $1,000.00. The currency is determined by the `requested_currency` field.
    Example: 100000

  - `data.purpose_code` (string)
    The purpose code of the payment. This should match the purpose code of the payin.
    Example: S0001

  - `data.sender_name` (string)
    The name of the sender.
    Example: John Doe

  - `data.error_code` (string)
    The error code for the respective error. Error code mappings can be found in the [product guide](../../../../product-guide/payin/payment#error-codes).
    Example: PAYMENT_DECLINED

  - `data.error_description` (string)
    The merchant-facing error description corresponding to the error code. Operational copy for the merchant. See `customer_error_description` for the copy meant for the end-customer.
    Example: The payment attempt was declined. This could be due to issuer rejection, risk assessment, or restrictions on the card or account. The customer should contact their bank or try a different payment meth…

  - `data.customer_error_description` (string | null)
    Customer-facing error copy, written for the merchant to relay to their end-customer. Derives from the same `error_code` as `error_description` but targets a different audience. `null` when there is no `error_code`, or when the error code has no customer-facing variant (some codes are merchant-only, e.g. `ACCOUNT_LOCKED`, `LOGGED_IN_ELSEWHERE`, `FUNCTIONALITY_RESTRICTED`).
    Example: Your payment could not be completed. Please try a different payment method or contact your bank.

  - `data.paid_at` (string | null)
    The timestamp at which the payment was completed. `null` if the payment has not been paid.
    Example: 2024-12-06T11:38:37.130Z

  - `data.fee_bearer` (string)
    The party bearing the fees for the payment.
    Enum: "customer", "merchant", "split"

  - `data.fee_collection_mode` (string | null)
    When merchant-borne fees are collected. `immediate` deducts fees up front; `deferred` invoices them later. `null` when not applicable.
    Enum: "immediate", "deferred"

  - `data.created_at` (string)
    The creation timestamp of the payment.
    Example: 2024-12-06T11:38:37.130Z

  - `data.updated_at` (string)
    The last update timestamp of the payment.
    Example: 2024-12-06T11:38:37.130Z

  - `data.customer_id` (string)
    The unique identifier for the customer.
    Example: cust_E602sMzgjpDC

  - `data.merchant_id` (string)
    The unique identifier for the merchant (business) that owns the payment.
    Example: merch_68c777fcOOMpl

  - `data.product_name` (string | null)
    The name of the product associated with the payment.
    Example: ShieldGuard Insurance

  - `data.product_description` (string | null)
    The description of the product associated with the payment.
    Example: Simple, monthly insurance plan that covers your basic belongings and key digital assets

  - `data.country` (string)
    The country of the sender. Country should be sent as a [ISO 3166-1 alpha-3](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-3) code.
    Example: Ind

  - `data.fees` (object)
    **Deprecated.** Use `fee_breakdown` instead. The fees charged for the payment, aggregated per fee type. `fee_breakdown` provides a per-bearer breakdown including any applicable taxes.

  - `data.fees.txn_fee` (object)

  - `data.fees.txn_fee.amount` (number)
    A positive integer representing the smallest currency unit.  For example, if the amount is $299.00, then pass 29900 in this field.  In the case of three decimal currencies, such as KWD, BHD and OMR, to represent an amount of 295.991, pass the value as 295990.  And in the case of zero decimal currencies such as JPY, for amount ￥295, pass the value as 295.
    Example: 1000

  - `data.fees.txn_fee.currency` (string)
    The currency code in [ISO 4217](https://en.wikipedia.org/wiki/ISO_4217) format. For example, USD.
    Example: USD

  - `data.fee_breakdown` (object)
    A detailed breakdown of the fees charged for the payment, grouped by fee type. Each fee type holds one entry per fee bearer, with any applicable taxes (for example, GST) nested under the entry's `taxes` array.

  - `data.fee_breakdown.fx_fee` (array)
    Foreign exchange fee lines.

  - `data.fee_breakdown.fx_fee.amount` (number)
    The fee amount in the smallest currency unit (cents), aggregated across all rules for this fee bearer. For example, 250 cents is $2.50.
    Example: 250

  - `data.fee_breakdown.fx_fee.currency` (string)
    The currency code in [ISO 4217](https://en.wikipedia.org/wiki/ISO_4217) format. For example, USD.
    Example: USD

  - `data.fee_breakdown.fx_fee.bearer` (string)
    The party bearing this fee.
    Enum: "customer", "merchant"

  - `data.fee_breakdown.fx_fee.collection_mode` (string | null)
    When the fee is collected. Customer-borne fees are always collected immediately; merchant-borne fees follow the payment's collection mode.
    Enum: "immediate", "deferred"

  - `data.fee_breakdown.fx_fee.taxes` (array)
    Taxes applied on this fee (for example, GST). Empty when no tax applies to the underlying rules.

  - `data.fee_breakdown.fx_fee.taxes.amount` (number)
    The tax amount in the smallest currency unit (cents). For example, 1800 cents is $18.00.
    Example: 1800

  - `data.fee_breakdown.fx_fee.taxes.currency` (string)
    The currency code in [ISO 4217](https://en.wikipedia.org/wiki/ISO_4217) format. For example, USD.
    Example: USD

  - `data.fee_breakdown.fx_fee.taxes.name` (string)
    The name of the tax applied on the fee. For example, GST.
    Example: GST

  - `data.fee_breakdown.fx_fee.taxes.bps` (number)
    The tax rate in basis points. For example, 1800 represents 18%.
    Example: 1800

  - `data.fee_breakdown.txn_fee` (array)
    Transaction fee lines.

  - `data.fee_breakdown.referral_fee` (array)
    Referral fee lines.

  - `data.documents` (array)
    The attached documents for the payment.

  - `data.documents.id` (string)
    The unique identifier for the Document.
    Example: doc_nYUqLpuYQ0M8

  - `data.documents.type` (string)
    The type of the Document.
    Example: invoice

  - `data.documents.status` (string)
    Enum: "pending", "uploaded", "rejected", "approved"

  - `data.documents.rfi_doc_id` (string | null)
    The unique identifier for the RFI Document. This will be `null` if the document is not an RFI Document.
    Example: rfidoc_nYUqLpuYQ0M8

  - `data.settlement_id` (string)
    A unique identifier generated by Glomo for the settlement batch in which this payment is included. This ID can be used to track and reconcile payments against corresponding settlements.

  - `data.funds_available` (boolean)
    Indicates whether the funds for this payment are currently available with Glomo.
**Values:**
- `true` - Funds are available with Glomo and can be included in a payout or settlement
- `false` - Funds are still in transit with Glomo's payment partners and are not yet available for use

  - `data.payment_method` (object)
    Specifies the method used by the customer to complete the payment.

  - `data.payment_method.type` (string)
    The type of payment method used for the transaction.
    Enum: "bank_transfer", "pay_via_bank", "card"

  - `data.payment_method.details` (object)
    Additional details specific to the payment method type. The structure varies based on the payment method type.

  - `data.payment_method.details.sender_name` (string)
    The name of the sender as provided by the sending bank.
    Example: Vaibhav LRS

  - `data.payment_method.details.sender_country` (string | null)
    The ISO 3166-1 alpha-3 country code of the sender.
    Example: IND

  - `data.payment_method.details.sender_account_number` (string)
    The account number of the sender.
    Example: 5454545454

  - `data.payment_method.details.receiver_account_number` (string)
    The account number credited by the transfer — the virtual account assigned to you.
    Example: 98765432109876

  - `data.payment_method.details.sender_bank_name` (string | null)
    The name of the sender's bank.
    Example: JPMORGAN CHASE BANK,N.A.

  - `data.payment_method.details.sender_bank_country` (string | null)
    The ISO 3166-1 alpha-3 country code of the sender's bank. This is the country of the bank, which can differ from `sender_country`.
    Example: USA

  - `data.payment_method.details.sender_bank_address` (string | null)
    The registered address of the sender's bank.
    Example: 270 Park Avenue, New York

  - `data.payment_method.details.swift_code` (string | null)
    The sender bank's ISO 9362 BIC. `null` while the identifier is not available.
    Example: CHASUS33

  - `data.payment_method.details.local_routing_number` (string | null)
    The sender bank's domestic routing identifier — a US ABA routing number, a UK sort code, or an Australian BSB. `null` while the identifier is not available.
    Example: 300129

  - `data.payment_method.details.external_reference` (string | null)
    The reference supplied by the partner bank for the incoming transfer, for reconciliation against your own records.
    Example: GLM7A2C1

  - `data.payment_method.details.transfer_type` (string | null)
    The rail the funds arrived on. `swift` for a cross-border SWIFT transfer, `local` for a domestic scheme such as ACH, Faster Payments or SEPA.
    Enum: "swift", "local", null

  - `data.payment_method.details.remittance_information` (string | null)
    Additional remittance information provided with the payment.
    Example: PaymentForLrs

  - `data.payment_method.details.sender_account_number` (string | null)
    The account number debited.
    Example: 5454545454

  - `data.payment_method.details.sender_bank_country` (string | null)
    The ISO 3166-1 alpha-3 country code of the sender's bank.
    Example: IND

  - `data.payment_method.details.external_reference` (string | null)
    The reference supplied by the partner bank, for reconciliation against your own records.
    Example: GLM7A2C1

  - `data.payment_method.details.transfer_type` (string | null)
    The rail used to debit the sender.
    Enum: "swift", "local", null

  - `data.payment_method.details.card_network` (string)
    The card network (e.g., Visa, Mastercard, American Express).
    Example: Visa

  - `data.payment_method.details.card_type` (string)
    The type of card (e.g., credit, debit).
    Example: credit

  - `data.payment_method.details.end_digits` (string)
    The last few digits of the card number for identification.
    Example: 1234

  - `data.payment_method.details.country_code` (string)
    The country code associated with the card.
    Example: US

  - `data.payment_method.details.card_holder_name` (string)
    The name of the card holder.
    Example: John Doe

  - `data.payment_method.details.card_bin` (string)
    The IIN (also known as BIN) is the card-number prefix that identifies the network, card type and issuing country.
    Example: 400000

  - `data.payment_method.details.issuer_name` (string)
    The name of the card issuing bank or financial institution.
    Example: Chase Bank

  - `data.auto_debit?` (boolean | null)
    Indicates whether the payment was made via auto-debit. Present only for subscription payments; `true` for an auto-debit payment, `false` for a manual subscription payment.
    Example: true

  - `message` (string)
    Success message
    Example: Payment funds available status updated successfully

## Response 400 fields (application/json):

  - `error` (string)
    The specific validation error message indicating why the mock funds available operation failed.
**Possible Error Messages:**
- **Payment Status Error:** `Payment must be in success status`
- **Gateway Error:** `Payment must be from LRS gateway`
- **Settlement Error:** `Payment must not have direct settlement enabled`
- **Transaction Error:** `No transaction found for payment`
- **Funds Already Available:** `Transaction already has funds available`
    Example: Payment must be in success status

