mercadopago
Version:
Mercadopago SDK for Node.js
48 lines (47 loc) • 1.56 kB
TypeScript
/**
* Request and internal-client types for the refund order operation.
*
* @module clients/order/refund/types
*/
import { MercadoPagoConfig } from '../../../mercadoPagoConfig';
import type { Options } from '../../../types';
/**
* Public-facing input for {@link Order.refund}.
*/
export declare type OrderRefundData = {
/** Unique order identifier to refund. */
id: string;
/** Refund details. Omit for a full refund of all transactions. */
body?: RefundRequest;
/** Per-call request options (timeout, idempotency key, etc.). */
requestOptions?: Options;
};
/**
* Internal client payload passed to the refund order REST call.
*/
export declare type OrderRefundClient = {
/** SDK configuration (access token, default options). */
config: MercadoPagoConfig;
/** Unique order identifier to refund. */
id: string;
/** Refund details. Omit for a full refund of all transactions. */
body?: RefundRequest;
};
/**
* Refund request body specifying which transactions to refund.
*
* When omitted or empty, the API performs a full refund of the entire order.
*/
export declare type RefundRequest = {
/** Individual transaction refund entries for partial refunds. */
transactions?: TransactionRefundRequest[];
};
/**
* Single transaction refund entry within a partial refund request.
*/
export declare type TransactionRefundRequest = {
/** Payment transaction identifier to refund. */
id?: string;
/** Amount to refund for this transaction as a decimal string. */
amount?: string;
};