Webhook Refund

Refunds a previously settled card present payment. Use this endpoint to return funds to a cardholder for a transaction that was processed on a terminal. A full refund returns the entire captured amount, while supplying an amount allows a partial refund.

Request Headers

HeaderRequiredDescription
AuthorizationYesBearer YOUR_ACCESS_TOKEN
Content-TypeYesapplication/json

Request Parameters

Path Parameters

ParameterTypeRequiredDescription
location_idstringYesIdentifier of the location processing the refund

Request Body Fields

FieldTypeRequiredDescription
payment_idstringYesIdentifier of the original payment to be refunded.
amountintegerNoAmount to refund, in minor units (cents). When omitted, the full captured amount is refunded.
terminal_idintegerYesIdentifier of the terminal associated with the refund.
webhook_idstringNoIdentifier used to correlate the asynchronous terminal result.

Request Example

{
  "payment_id": "9859",
  "terminal_id": 103,
  "webhook_id": "1999445"
}

To issue a partial refund, include the amount field:

{
  "payment_id": "9859",
  "amount": 100,
  "terminal_id": 103,
  "webhook_id": "1999445"
}

cURL Example

curl --request POST \
  --url https://sandbox-api.softpoint.io/interface/v1/locations/YOUR_LOCATION_ID/webhook/refund \
  --header "Authorization: Bearer YOUR_ACCESS_TOKEN" \
  --header "Content-Type: application/json" \
  --data '{
    "payment_id": "9859",
    "terminal_id": 103,
    "webhook_id": "1999445"
  }'

Success Response

{
  "response": "APPROVED",
  "data": {
    "id": 9859,
    "id_external": "7522739543526339304605",
    "amount": 1999,
    "tip": 0,
    "total": 1999,
    "refunded_amount": 1999,
    "surcharge": 0,
    "transaction_id": "7522739543526339304605",
    "card_holder": null,
    "reference_id": "93f6157aa5714fd798359058a6995bdb",
    "auth_code": "831000",
    "card_type": "AMERICAN_EXPRESS",
    "last4": "2513",
    "entry_type": "Fallback Swipe",
    "emv_tags": "{\"Account\":\"*** **** **** 2513\",\"Card\":\"VISA\",\"Entry Mode\":\"Keyed\",\"Authorization\":\"-\",\"mAuthorizationCode\":\"831000\"}",
    "status": 3
  }
}

Response Fields

FieldTypeDescription
responsestringTransaction outcome. APPROVED indicates the refund succeeded.
dataobjectTransaction detail object.
data.idintegerSoftpoint transaction identifier.
data.id_externalstringExternal reference for the transaction.
data.amountintegerOriginal transaction amount, in minor units.
data.tipintegerTip amount, in minor units.
data.totalintegerTransaction total, in minor units.
data.refunded_amountintegerAmount refunded, in minor units.
data.surchargeintegerSurcharge amount, in minor units.
data.transaction_idstringProcessor transaction identifier.
data.card_holderstringnull
data.reference_idstringReference identifier returned by the processor.
data.auth_codestringAuthorization code returned by the issuer.
data.card_typestringCard brand.
data.last4stringLast four digits of the card number.
data.entry_typestringHow the original card was read.
data.emv_tagsstringJSON-encoded string of EMV tag data.
data.statusintegerNumeric transaction status code.

Error Responses

The refund endpoint uses the standard error envelope. Common scenarios include an unknown terminal and missing required parameters.

Terminal Not Found

{
  "error": {
    "code": 10107,
    "message": "The selected terminal doesn't exist.",
    "details": null
  }
}

Missing Required Parameter

{
  "error": {
    "code": 10109,
    "message": "The request is missing one or more required parameter(s).",
    "details": {
      "payment_id": [
        "missing_required_parameters"
      ]
    }
  }
}

Status Codes

CodeDescription
200Request processed. Inspect response for the outcome.
400Missing or invalid request parameters.
401Missing or invalid access token.
404The selected terminal does not exist.

Workflow Placement

The refund endpoint closes out a completed card-present payment:

  1. Process a sale or capture an authorization.

  2. Identify the original payment to be reversed.

  3. Submit the refund, optionally specifying a partial amount.

  4. Confirm the result using refunded_amount.

Notes

  • Amounts are expressed in minor units (cents).

  • Omit the amount field to refund the full captured amount. Supply amount to refund a portion.

  • Confirm the outcome with the refunded_amount field rather than assuming the full amount was returned.

  • Refunds are tied to the original payment_id; ensure the payment has settled before attempting a refund.

Common Mistakes

  • Submitting a refund before the original payment has settled.

  • Sending the refund amount in major units (dollars) instead of minor units (cents).

  • Omitting payment_id or terminal_id, which results in error code 10109.

  • Expecting a partial refund without including the amount field, which results in a full refund.

Body Params
Response

Language
Credentials
Bearer
LoadingLoading…
Response
Click Try It! to start a request and see the response here! Or choose an example:
application/json