ReadyRemit Transfer Request

Transfer request structure sent to your callback

Overview

The ReadyRemitTransferRequest type defines the structure of transfer requests that the SDK sends to your verifyFundsAndCreateTransfer callback. This object contains all the information needed to verify funds and create a transfer on your backend.


Definition

export type ReadyRemitTransferRequest = {
  fields?: [ReadyRemitTransferRequestField] | undefined;
  quoteBy: string;
  quoteHistoryId: string;
  recipientAccountId?: string | undefined;
  recipientId: string;
  sourceAccountId?: string | undefined;
}

export type ReadyRemitTransferRequestField = {  
  id: string;
  type: string;
  value: string;
}

Properties

PropertyTypeRequiredDescription
fieldsReadyRemitTransferRequestField[]NoAdditional custom fields for the transfer
quoteBystringYesThe entity that provided the quote
quoteHistoryIdstringYesUnique identifier for the quote used in this transfer
recipientAccountIdstringNoThe recipient's account identifier
recipientIdstringYesUnique identifier for the recipient
sourceAccountIdstringNoThe source account identifier for the transfer

ReadyRemitTransferRequestField Properties

PropertyTypeRequiredDescription
idstringYesUnique identifier for the field
typestringYesThe data type of the field
valuestringYesThe value of the field

Sample Usage

import type { 
  ReadyRemitTransferRequest, 
  ReadyRemitTransferResponse, 
  ReadyRemitError 
} from 'react-native-ready-remit-sdk';

const verifyFundsAndCreateTransfer = async (
  request: ReadyRemitTransferRequest
): Promise<ReadyRemitTransferResponse | ReadyRemitError> => {
  console.log('Transfer Request:', {
    recipientId: request.recipientId,
    quoteHistoryId: request.quoteHistoryId,
    sourceAccountId: request.sourceAccountId,
  });

  // Forward the request to your backend
  const response = await fetch('https://your-api.com/transfers', {
    method: 'POST',
    headers: { 'Content-Type': 'application/json' },
    body: JSON.stringify({
      recipient_id: request.recipientId,
      quote_history_id: request.quoteHistoryId,
      source_account_id: request.sourceAccountId,
      recipient_account_id: request.recipientAccountId,
      fields: request.fields,
    }),
  });

  if (!response.ok) {
    return {
      code: 'TRANSFER_FAILED',
      message: 'Transfer could not be processed',
    };
  }

  const data = await response.json();
  return { transferId: data.id };
};

Example Request Object

{
  "recipientId": "RCP-123456",
  "quoteBy": "convera",
  "quoteHistoryId": "QH-2026-0204-ABC123",
  "sourceAccountId": "SRC-789012",
  "recipientAccountId": "RCPA-345678",
  "fields": [
    {
      "id": "purpose_of_transfer",
      "type": "string",
      "value": "family_support"
    }
  ]
}

Related