# 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

## Security:

  - `JWT` (unknown)
    http bearer JWT

## Path parameters:

  - `id` (string, required)
    The unique identifier of the payment to mark funds as available for. The payment must already be in `success` status, must not have direct settlement enabled, and must have a transaction recorded against it; otherwise the call is rejected with `400`. If funds are already available the call is a no-op and returns `200`.

## Response 200:

  - `200` (unknown)
    Payment funds available status updated successfully

## 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: plink_E602dMzgjpDC

  - `data.payin_type` (string | null)
    The type of the payin. This is set only for payments associated to a payin.
- `payment_link` — the payment was made through a payment link.
- `orders` — the payment was made against an order.
- `add_funds` — the payment tops up your own Glomo balance.
    Enum: "payment_link", "orders", "add_funds", "null"

  - `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.
- `in_progress` — the payment has started and has not completed yet.
- `action_required` — Glomo needs more information before the payment can complete. Respond to the
open RFI to continue.
- `under_review` — the information you submitted is being reviewed.
- `success` — the payment completed. Terminal. Funds can still be held for compliance review; see
`compliance_status`.
- `failed` — the payment did not complete. Terminal.
    Enum: "in_progress", "action_required", "under_review", "success", "failed"

  - `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`.
- `under_review` — the payment is being reviewed and its funds are held.
- `action_required` — documents are needed before the review can finish. Respond to the open RFI.
- `approved` — the review passed and the funds are released.
- `rejected` — the payment did not pass the review.
    Enum: "action_required", "under_review", "approved", "rejected", "null"

  - `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-reference/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, as a count of documents. `1` when the requirement does not set a higher limit.
    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 (includes customer-borne fees if applicable), in the smallest unit of `payment_currency`, the customer-side currency. `374580` is 3,745.80 AED when `payment_currency` is AED.
    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 payment amount in the smallest unit of `converted_currency`, the merchant-side currency. `100000` is $1,000.00 when `converted_currency` is USD. Always the same value as `requested_amount`. For a payment against an order, payment link or subscription, it is the amount requested and excludes customer-borne fees, which are counted only in `payment_amount`. A bank transfer that is not yet connected to an order or payment link shows the amount and currency received. Once it is connected and the amount received matches the payin's quote, it shows the merchant-side amount like any other payment.
    Example: 100000

  - `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 requested by the merchant, in the smallest unit of `requested_currency`, the merchant-side currency. `100000` is $1,000.00 when `requested_currency` is USD. Always the same value as `converted_amount`. For a payment against an order, payment link or subscription, it excludes customer-borne fees, which are counted only in `payment_amount`. A bank transfer that is not yet connected to an order or payment link shows the amount and currency received. Once it is connected and the amount received matches the payin's quote, it shows the merchant-side amount like any other payment.
    Example: 100000

  - `data.purpose_code` (string)
    Purpose code recorded against this payment, from the fixed set of [payin purpose codes](/payin/purpose-codes). For a payment connected to a payin this is normally the payin's purpose code. It can be empty.
    Example: S0001

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

  - `data.notes` (object)
    Custom field values for this payment. See [Custom Fields](/payin/custom-fields).
    Example: {"policy_number":"POL-001"}

  - `data.request_id` (string | null)
    The `request_id` you sent when creating this payment; `null` if you sent none. Look the payment up with `GET /v1/payments?request_id=<your_request_id>`.
    Example: your-internal-id

  - `data.error_code` (string)
    The error code for the respective error. Error code mappings can be found in the [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)
    When the payment was completed, as an ISO 8601 date-time in UTC. `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", "null"

  - `data.created_at` (string)
    When the payment was created, as an ISO 8601 date-time in UTC.
    Example: 2024-12-06T11:38:37.130Z

  - `data.updated_at` (string)
    When the payment was last updated, as an ISO 8601 date-time in UTC.
    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 unit of this entry's `currency` (cents for USD), aggregated across all rules for this fee bearer. `250` is $2.50 when `currency` is USD.
    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", "null"

  - `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 unit of this line's `currency` (cents for USD). `1800` is $18.00 when `currency` is USD.
    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:

  - `400` (unknown)
    Bad Request - Payment validation failed

## 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`
- **Settlement Error:** `Payment must not have direct settlement enabled`
- **Transaction Error:** `No transaction found for payment`
    Example: Payment must be in success status

## Response 401:

  - `401` (unknown)
    Unauthorized - Invalid or missing authentication token

## Response 404:

  - `404` (unknown)
    Not Found - Payment with the specified ID not found

