Check out example codes for "devoluciones redsys api". It will help you in understanding the concepts better.

Code Example 1

{
  "DS_MERCHANT_AMOUNT": "145",
  "DS_MERCHANT_CURRENCY": "978",
  "DS_MERCHANT_MERCHANTCODE": "999008881",
  "DS_MERCHANT_ORDER": "1446068581",
  "DS_MERCHANT_TERMINAL": "1",
  "DS_MERCHANT_TRANSACTIONTYPE": "3"
}

Code Example 2

{
  "Ds_Amount": "145",
  "Ds_AuthorisationCode": "629297",
  "Ds_Card_Brand": "1",
  "Ds_Card_Country": "724",
  "Ds_Currency": "978",
  "Ds_Language": "1",
  "Ds_MerchantCode": "1446068581",
  "Ds_MerchantData": "",
  "Ds_Order": "1234aaa",
  "Ds_Response": "0900",
  "Ds_SecurePayment": "0",
  "Ds_Terminal": "1",
  "Ds_TransactionType": "3"
}

Learn ReactJs, React Native from akashmittal.com