---
title: "Create a mock payment"
method: POST
path: "/api/v1/payment/mock"
tags: ["Payments"]
---

# Create a mock payment

`POST /api/v1/payment/mock`

## Request

- Base URL: `https://api.crossborder.jiopay.co.in`
- URL: `https://api.crossborder.jiopay.co.in/api/v1/payment/mock`
- Auth: HTTP bearer

This API is only available in sandbox mode. Creates a mock payment of specified amount for any given Payment link.

## Request body

- CreateMockPaymentRequest: This API is only available in sandbox mode. Creates a mock payment of specified amount for any given Payment link.
  - `amount` integer, required: Amount in cents (minimum 100)
  - `currency` string, required: The currency code in ISO 4217 format
  - `payment_method` 'BankTransfer': Required if no payin_id is passed.
  - `payin_id` string: The unique identifier for the payin. Required if no payment_method is passed.
  - `remitter_name` 'Sanctioned_Entity' | 'Non_Sanctioned_Entity': Name of the remitter. Optional, defaults to Non_Sanctioned_Entity

## Response `201`

Created

- PaymentResponse
  - `id` string: The unique identifier for the payment.
  - `payin_id` string, nullable: The unique identifier for the payin. This is set only for payments associated to a payin.
  - `payin_type` 'payment_link' | 'orders' | 'add_funds': The type of the payin.
  - `subscription_id` string, nullable: The unique identifier for the subscription. This is set only for subscription-related payments.
  - `status` 'success' | 'failed' | 'action_required' | 'in_progress' | 'under_review': The status of the payment.
  - `payment_currency` string: The currency in which the customer pays. The currency code is in ISO 4217 format. For example, AED.
  - `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.
  - `converted_currency` string: The settlement currency after conversion. The currency code is in ISO 4217 format. For example, USD.
  - `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.
  - `requested_currency` string: The currency that was originally requested by the merchant. The currency code is in ISO 4217 format. For example, USD.
  - `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.
  - `purpose_code` string: The purpose code of the payment. This should match the purpose code of the payin.
  - `sender_name` string: The name of the sender.
  - `notes` object: Custom field values for this payment.
  - `error_code` string: The error code for the respective error.
  - `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.
  - `customer_error_description` string, nullable: 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).
  - `paid_at` string, nullable: The timestamp at which the payment was completed. null if the payment has not been paid.
  - `fee_bearer` 'customer' | 'merchant' | 'split': The party bearing the fees for the payment.
  - `fee_collection_mode` 'immediate' | 'deferred', nullable: When merchant-borne fees are collected. immediate deducts fees up front; deferred invoices them later. null when not applicable.
  - `created_at` string: The creation timestamp of the payment.
  - `updated_at` string: The last update timestamp of the payment.
  - `customer_id` string: The unique identifier for the customer.
  - `merchant_id` string: The unique identifier for the merchant (business) that owns the payment.
  - `product_name` string, nullable: The name of the product associated with the payment.
  - `product_description` string, nullable: The description of the product associated with the payment.
  - `country` string: The country of the sender. Country should be sent as an ISO 3166-1 alpha-3 code.
  - `fee_breakdown` FeeBreakdown: 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.
    - `fx_fee` FeeBreakdownEntry[]: Foreign exchange fee lines.
      - `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.
      - `currency` string: The currency code in ISO 4217 format. For example, USD.
      - `bearer` 'customer' | 'merchant': The party bearing this fee.
      - `collection_mode` 'immediate' | 'deferred', nullable: When merchant-borne fees are collected. immediate deducts fees up front; deferred invoices them later. null when not applicable.
      - `taxes` TaxEntry[]: Taxes applied on this fee (for example, GST). Empty when no tax applies to the underlying rules.
        - `amount` number: The tax amount in the smallest currency unit (cents). For example, 1800 cents is $18.00.
        - `currency` string: The currency code in ISO 4217 format. For example, USD.
        - `name` string: The name of the tax applied on the fee. For example, GST.
        - `bps` number: The tax rate in basis points. For example, 1800 represents 18%.
    - `txn_fee` FeeBreakdownEntry[]: Transaction fee lines.
      - `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.
      - `currency` string: The currency code in ISO 4217 format. For example, USD.
      - `bearer` 'customer' | 'merchant': The party bearing this fee.
      - `collection_mode` 'immediate' | 'deferred', nullable: When merchant-borne fees are collected. immediate deducts fees up front; deferred invoices them later. null when not applicable.
      - `taxes` TaxEntry[]: Taxes applied on this fee (for example, GST). Empty when no tax applies to the underlying rules.
        - `amount` number: The tax amount in the smallest currency unit (cents). For example, 1800 cents is $18.00.
        - `currency` string: The currency code in ISO 4217 format. For example, USD.
        - `name` string: The name of the tax applied on the fee. For example, GST.
        - `bps` number: The tax rate in basis points. For example, 1800 represents 18%.
    - `referral_fee` FeeBreakdownEntry[]: Referral fee lines.
      - `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.
      - `currency` string: The currency code in ISO 4217 format. For example, USD.
      - `bearer` 'customer' | 'merchant': The party bearing this fee.
      - `collection_mode` 'immediate' | 'deferred', nullable: When merchant-borne fees are collected. immediate deducts fees up front; deferred invoices them later. null when not applicable.
      - `taxes` TaxEntry[]: Taxes applied on this fee (for example, GST). Empty when no tax applies to the underlying rules.
        - `amount` number: The tax amount in the smallest currency unit (cents). For example, 1800 cents is $18.00.
        - `currency` string: The currency code in ISO 4217 format. For example, USD.
        - `name` string: The name of the tax applied on the fee. For example, GST.
        - `bps` number: The tax rate in basis points. For example, 1800 represents 18%.
  - `documents` PaymentDocument[]: The attached documents for the payment.
    - `id` string: The unique identifier for the Document.
    - `type` string: The type of the Document.
    - `status` 'pending' | 'uploaded' | 'rejected' | 'approved'
    - `rfi_doc_id` string, nullable: The unique identifier for the RFI Document. This will be null if the document is not an RFI Document.
  - `settlement_id` string: A unique identifier generated for the settlement batch in which this payment is included. This ID can be used to track and reconcile payments against corresponding settlements.
  - `funds_available` boolean: Indicates whether the funds for this payment are currently available. true: funds are available and can be included in a payout or settlement. false: funds are still in transit with the payment partner and are not yet available for use.
  - `payment_method` PaymentMethodInfo: Specifies the method used by the customer to complete the payment. This can include various options such as swift_transfer, card, and other payment methods.
    - `type` 'swift_transfer' | 'card': The type of payment method used for the transaction.
    - `id` string: The unique identifier for the payment method instance.
    - `details` union: Additional details specific to the payment method type. The structure varies based on the payment method type.
      - SwiftTransferDetails
        - `sender_name` string: The name of the sender as provided by the payment method.
        - `sender_country` string: The country code of the sender.
        - `sender_account_number` string: The account number of the sender (for bank transfers).
        - `remittance_information` string, nullable: Additional remittance information provided with the payment.
      - CardMethodDetails
        - `card_network` string: The card network (e.g., Visa, Mastercard, American Express).
        - `card_type` string: The type of card (e.g., credit, debit).
        - `end_digits` string: The last few digits of the card number for identification.
        - `country_code` string: The country code associated with the card.
        - `card_holder_name` string: The name of the card holder.
        - `card_bin` string: The IIN (also known as BIN) is the card-number prefix that identifies the network, card type and issuing country.
        - `issuer_name` string: The name of the card issuing bank or financial institution.
  - `auto_debit` boolean, nullable: 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.
  - `fees` DeprecatedFees: 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.
    - `txn_fee` DeprecatedTxnFee
      - `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.
      - `currency` string: The currency code in ISO 4217 format. For example, USD.
    - `fx_fee` object: The foreign exchange fee charged for the payment.
    - `referral_fee` object: The referral fee charged for the payment.

---

[API](https://skmtc.dev/jiopay/apis/cross-border.md) - [All operations](https://skmtc.dev/jiopay/apis/cross-border/llms.txt) - [OpenAPI document](https://skmtc.dev/jiopay/apis/cross-border/revisions/b3e97f5918d4?raw)
