---
updatedAt: 2026-10-05T13:51:03.000Z
agentTools:
  projectIndex: https://valorapi.readme.io/llms.txt
---

# Refund Offset Sale

To perform a refund transaction, provide **ref\_txn\_id** or all of the following transaction details: **auth\_code and rrn**.

# OpenAPI definition

```json
{
  "openapi": "3.1.0",
  "info": {
    "title": "ecommerce-api",
    "version": "1.0"
  },
  "servers": [
    {
      "url": "https://securelink-staging.valorpaytech.com:443/"
    }
  ],
  "security": [
    {}
  ],
  "paths": {
    "/?issuerefund": {
      "post": {
        "summary": "Refund Offset Sale",
        "description": "",
        "operationId": "direct-sale-auth-copy-1",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "required": [
                  "appid",
                  "appkey",
                  "epi",
                  "txn_type",
                  "amount",
                  "surchargeIndicator",
                  "ref_txn_id",
                  "sale_refund"
                ],
                "properties": {
                  "appid": {
                    "type": "string",
                    "description": "Merchant APP ID (Alphanumeric - Length of 32 chars and special chars $@%#)",
                    "default": "h6tSvf0Cz7fSB86B44bkLEplS15AsWYo"
                  },
                  "appkey": {
                    "type": "string",
                    "description": "Merchant APP KEY (Alphanumeric - Length of 32 chars and special chars $@%#)",
                    "default": "zOKj0LUOiW4L9jFRrMbMiJQ5KxQEpSMm"
                  },
                  "epi": {
                    "type": "string",
                    "description": "EPI is an end point identifier, Identify the device on valor infrastructure, it's a 10 digit number starts with 2",
                    "default": "2412333540"
                  },
                  "txn_type": {
                    "type": "string",
                    "description": "Transaction type should be set as refund",
                    "default": "refund"
                  },
                  "amount": {
                    "type": "number",
                    "description": "Transaction amount - Maximum amount $99,999.99 (Ex: 0.1 to 99,999.99). A request should not be sent when the amount is 0. The amount must be greater than zero",
                    "default": 10,
                    "format": "double"
                  },
                  "surchargeIndicator": {
                    "type": "string",
                    "description": "Set 0 for transactions processed through a traditional MID with no custom fee. Set 1 for transactions processed through a cash discounting MID with a custom fee.",
                    "default": "0"
                  },
                  "invoicenumber": {
                    "type": "string",
                    "description": "Invoice number field must contain a maximum of 100 characters and may include only alphanumeric characters. < and > are not allowed.",
                    "default": "inv0001"
                  },
                  "ref_txn_id": {
                    "type": "string",
                    "description": "A unique response transaction id from the response of a sale transaction (Numeric - Length of 20 chars)"
                  },
                  "sale_refund": {
                    "type": "string",
                    "description": "Should be set as value 1",
                    "default": "1"
                  },
                  "auth_code": {
                    "type": "string",
                    "description": "Approval code response from sale transaction (Alphanumeric - Max length of 8 chars)"
                  },
                  "rrn": {
                    "type": "string",
                    "description": "RRN number from sale txn response (Numeric - Max length of 15 chars)"
                  },
                  "additional_prompts": {
                    "type": "array",
                    "description": "Custom inputs, with a maximum of 25 entries allowed.",
                    "items": {
                      "properties": {
                        "PROMPT_NAME": {
                          "type": "string",
                          "description": "The prompt name should allow up to maximum 30  characters",
                          "default": "Vehicle Number1"
                        },
                        "PROMPT_VALUE": {
                          "type": "string",
                          "description": "The prompt value should allow up to maximum 30 characters",
                          "default": "12"
                        }
                      },
                      "type": "object"
                    }
                  },
                  "child_epi": {
                    "type": "string",
                    "description": "If the merchant has multi-MIDs, they need to send both the child EPI and the parent EPI in the EPI request"
                  },
                  "duplicate_transaction_check": {
                    "type": "integer",
                    "description": "Set to 1 to enable duplicate transaction checking based on the portal setting. Set to 0 to disable it. For example, By Invoice Number declines transactions with the same invoice number in the same batch. The PO number is required when the Invoice Number duplicate check is enabled in the settings.",
                    "format": "int32"
                  },
                  "po_number": {
                    "type": "string",
                    "description": "When sending the invoice number for the duplicate transaction check, the PO number must also be provided (alphanumeric, maximum 25 characters)."
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "200",
            "content": {
              "application/json": {
                "examples": {
                  "Result": {
                    "value": "{\n  \"error_no\": \"S00\",\n  \"error_code\": \"00\",\n  \"amount\": \"3.00\",\n  \"tax\": \"\",\n  \"customfee\": \"\",\n  \"msg\": \"APPROVED\",\n  \"txnid\": \"10962696\",\n  \"desc\": \"APPROVAL TAS646 \",\n  \"additional_info\": null,\n  \"epi\": \"2412333540\",\n  \"channel\": \"ECOMM\",\n  \"created_date\": \"01/09/2026\",\n  \"created_time\": \"04:10:16\",\n  \"rrn\": \"624408500177\",\n  \"activeTapToPayBatch\": 0\n}"
                  }
                },
                "schema": {
                  "type": "object",
                  "properties": {
                    "error_no": {
                      "type": "string",
                      "example": "S00"
                    },
                    "error_code": {
                      "type": "string",
                      "example": "00"
                    },
                    "amount": {
                      "type": "string",
                      "example": "3.00"
                    },
                    "tax": {
                      "type": "string",
                      "example": ""
                    },
                    "customfee": {
                      "type": "string",
                      "example": ""
                    },
                    "msg": {
                      "type": "string",
                      "example": "APPROVED"
                    },
                    "txnid": {
                      "type": "string",
                      "example": "10962696"
                    },
                    "desc": {
                      "type": "string",
                      "example": "APPROVAL TAS646 "
                    },
                    "additional_info": {},
                    "epi": {
                      "type": "string",
                      "example": "2412333540"
                    },
                    "channel": {
                      "type": "string",
                      "example": "ECOMM"
                    },
                    "created_date": {
                      "type": "string",
                      "example": "01/09/2026"
                    },
                    "created_time": {
                      "type": "string",
                      "example": "04:10:16"
                    },
                    "rrn": {
                      "type": "string",
                      "example": "624408500177"
                    },
                    "activeTapToPayBatch": {
                      "type": "integer",
                      "example": 0,
                      "default": 0
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "400",
            "content": {
              "application/json": {
                "examples": {
                  "Result": {
                    "value": "{\n  \"error_no\": \"D27\",\n  \"mesg\": \"PROCESSING ERROR\",\n  \"msg\": \"PROCESSING ERROR\",\n  \"desc\": \"INVALID EPI ID\"\n}"
                  }
                },
                "schema": {
                  "type": "object",
                  "properties": {
                    "error_no": {
                      "type": "string",
                      "example": "D27"
                    },
                    "mesg": {
                      "type": "string",
                      "example": "PROCESSING ERROR"
                    },
                    "msg": {
                      "type": "string",
                      "example": "PROCESSING ERROR"
                    },
                    "desc": {
                      "type": "string",
                      "example": "INVALID EPI ID"
                    }
                  }
                }
              }
            }
          }
        }
      }
    }
  },
  "x-readme": {
    "headers": [],
    "explorer-enabled": true,
    "proxy-enabled": true
  },
  "x-readme-fauxas": true
}
```