---
title: "Submit refund instruction"
method: POST
path: "/devices/{serialNumber}/refund-instructions"
tags: ["refundInstructions"]
---

# Submit refund instruction

`POST /devices/{serialNumber}/refund-instructions`

Use this method to submit an instruction request to initiate a refund on a payment device.  

In the request, include the refund amount and currency.  

If the request is successful, our gateway returns information about the refund instruction and a refundInstructionId, which you need for the following methods:
- [Retrieve refund instruction](https://docs.payroc.com/api/schema/payroc-cloud/refund-instructions/retrieve) - View the details of the refund instruction.
- [Cancel refund instruction](https://docs.payroc.com/api/schema/payroc-cloud/refund-instructions/delete) - Cancel the refund instruction.

## Path parameters

- `serialNumber` string, required

## Headers

- `Authorization` string, required
- `Idempotency-Key` string, uuid, required

## Request body

- RefundInstructionRequest — Object that contains information about the instruction request to initiate a refund on a payment device.
  - `operator` string — Operator who initiated the request.
  - `processingTerminalId` string, required — Unique identifier that we assigned to the terminal.
  - `order` RefundInstructionOrder, required — Object that contains information about the refund.
    - `orderId` string, required — Unique identifier that the merchant assigns to the transaction.
    - `dateTime` string, date-time — Date and time that the processor processed the transaction. Our gateway returns this value in the [ISO 8601](https://www.iso.org/iso-8601-date-and-time-format.html) format.
    - `description` string, required — Description of the transaction.
    - `amount` integer, required — Total amount of the transaction. The value is in the currency’s lowest denomination, for example, cents.
    - `currency` 'AED' | 'AFN' | 'ALL' | 'AMD' | 'ANG' | 'AOA' | 'ARS' | 'AUD' | 'AWG' | 'AZN' | 'BAM' | 'BBD' | 'BDT' | 'BGN' | 'BHD' | 'BIF' | 'BMD' | 'BND' | 'BOB' | 'BOV' | 'BRL' | 'BSD' | 'BTN' | 'BWP' | 'BYR' | 'BZD' | 'CAD' | 'CDF' | 'CHE' | 'CHF' | 'CHW' | 'CLF' | 'CLP' | 'CNY' | 'COP' | 'COU' | 'CRC' | 'CUC' | 'CUP' | 'CVE' | 'CZK' | 'DJF' | 'DKK' | 'DOP' | 'DZD' | 'EGP' | 'ERN' | 'ETB' | 'EUR' | 'FJD' | 'FKP' | 'GBP' | 'GEL' | 'GHS' | 'GIP' | 'GMD' | 'GNF' | 'GTQ' | 'GYD' | 'HKD' | 'HNL' | 'HRK' | 'HTG' | 'HUF' | 'IDR' | 'ILS' | 'INR' | 'IQD' | 'IRR' | 'ISK' | 'JMD' | 'JOD' | 'JPY' | 'KES' | 'KGS' | 'KHR' | 'KMF' | 'KPW' | 'KRW' | 'KWD' | 'KYD' | 'KZT' | 'LAK' | 'LBP' | 'LKR' | 'LRD' | 'LSL' | 'LTL' | 'LVL' | 'LYD' | 'MAD' | 'MDL' | 'MGA' | 'MKD' | 'MMK' | 'MNT' | 'MOP' | 'MRO' | 'MRU' | 'MUR' | 'MVR' | 'MWK' | 'MXN' | 'MXV' | 'MYR' | 'MZN' | 'NAD' | 'NGN' | 'NIO' | 'NOK' | 'NPR' | 'NZD' | 'OMR' | 'PAB' | 'PEN' | 'PGK' | 'PHP' | 'PKR' | 'PLN' | 'PYG' | 'QAR' | 'RON' | 'RSD' | 'RUB' | 'RWF' | 'SAR' | 'SBD' | 'SCR' | 'SDG' | 'SEK' | 'SGD' | 'SHP' | 'SLL' | 'SOS' | 'SRD' | 'SSP' | 'STD' | 'STN' | 'SVC' | 'SYP' | 'SZL' | 'THB' | 'TJS' | 'TMT' | 'TND' | 'TOP' | 'TRY' | 'TTD' | 'TWD' | 'TZS' | 'UAH' | 'UGX' | 'USD' | 'USN' | 'USS' | 'UYI' | 'UYU' | 'UZS' | 'VEF' | 'VES' | 'VND' | 'VUV' | 'WST' | 'XAF' | 'XCD' | 'XOF' | 'XPF' | 'YER' | 'ZAR' | 'ZMW' | 'ZWL', required — Currency of the transaction. The value for the currency follows the [ISO 4217](https://www.iso.org/iso-4217-currency-codes.html) standard.
  - `customer` Customer — Object that contains the customer's contact details and address information. Contains parameters required for [Level 2, Level 3, and CEDP transactions](https://docs.payroc.com/knowledge/card-payments/enhanced-data).
    - `firstName` string — Customer's first name.
    - `lastName` string — Customer's last name.
    - `dateOfBirth` string, date — Customer's date of birth. The format for this value is **YYYY-MM-DD**.
    - `referenceNumber` string — Identifier of the transaction, also known as a customer code. For requests, you must send a value for **referenceNumber** if the customer provides one. Required for [Level 2, Level 3, and CEDP transactions](https://docs.payroc.com/knowledge/card-payments/enhanced-data).
    - `billingAddress` Address — Object that contains information about the address.
      - `address1` string, required — Address line 1.
      - `address2` string — Address line 2.
      - `address3` string — Address line 3.
      - `city` string, required — City.
      - `state` string, required — Name of the state or state abbreviation.
      - `country` string, required — Two-digit country code for the country that the business operates in. The format follows the [ISO-3166-1](https://www.iso.org/iso-3166-country-codes.html) standard.
      - `postalCode` string, required — Zip code or postal code.
    - `shippingAddress` Shipping — Object that contains information about the customer and their shipping address. Contains parameters required for [Level 3 and CEDP transactions](https://docs.payroc.com/knowledge/card-payments/enhanced-data).
      - `recipientName` string — Recipient's name. Required for [Level 3 and CEDP transactions](https://docs.payroc.com/knowledge/card-payments/enhanced-data).
      - `address` Address — Object that contains information about the address.
        - `address1` string, required — Address line 1.
        - `address2` string — Address line 2.
        - `address3` string — Address line 3.
        - `city` string, required — City.
        - `state` string, required — Name of the state or state abbreviation.
        - `country` string, required — Two-digit country code for the country that the business operates in. The format follows the [ISO-3166-1](https://www.iso.org/iso-3166-country-codes.html) standard.
        - `postalCode` string, required — Zip code or postal code.
    - `contactMethods` ContactMethod[] — Array of polymorphic objects, which contain contact information. The value of the type parameter determines which variant you should use: - `email` - Email address - `phone` - Phone number - `mobile` - Mobile number - `fax` - Fax number
      - union
        - object — email variant
          - `type` 'email', required — Discriminator value: email
          - `value` string, required — Email address.
        - object — phone variant
          - `type` 'phone', required — Discriminator value: phone
          - `value` string, required — Phone number.
        - object — mobile variant
          - `type` 'mobile', required — Discriminator value: mobile
          - `value` string, required — Mobile number.
        - object — fax variant
          - `type` 'fax', required — Discriminator value: fax
          - `value` string, required — Fax number.
    - `notificationLanguage` 'en' | 'fr' — Language that the customer uses for notifications. This code follows the [ISO 639-1](https://www.iso.org/iso-639-language-code) alpha-2 standard.
  - `ipAddress` IpAddress — Object that contains the IP address of the device that sent the request.
    - `type` 'ipv4' | 'ipv6', required — Internet protocol version of the IP address.
    - `value` string, required — IP address of the device.
  - `customizationOptions` CustomizationOptions — Object that contains available options to customize certain aspects of an instruction.
    - `ebtDetails` EbtDetails — Object that contains information about the Electronic Benefit Transfer (EBT) transaction.
      - `benefitCategory` 'cash' | 'foodStamp', required — Indicates if the balance relates to an EBT Cash account or an EBT SNAP account. - `cash` – EBT Cash - `foodStamp` – EBT SNAP
      - `withdrawal` boolean — Indicates whether the customer wants to withdraw cash. **Note:** Cash withdrawals are available only from EBT Cash accounts.
    - `entryMethod` 'deviceRead' | 'manualEntry' | 'deviceReadOrManualEntry' — Indicates how you want the device to capture the card details. - `deviceRead` - Device prompts the cardholder to tap, swipe, or insert their card. - `manualEntry` - Device prompts the merchant or cardholder to manually enter card details. - `deviceReadOrManualEntry` - Device prompts the cardholder to tap, swipe, or insert their card. The device also displays an option for the merchant or cardholder to manually enter card details.
    - `closedLoopOptions` CustomizationOptionsClosedLoopOptions — mifare variant
      - `type` 'mifare', required — Discriminator value: mifare

## Response `202`

Successful request. We accepted the refund instruction.

- RefundInstruction
  - `status` 'canceled' | 'completed' | 'failure' | 'inProgress', required — Indicates the current status of the instruction. - `canceled` – The instruction was canceled before it was completed. - `completed` – The instruction has completed. Use the link object to check the resource. - `failure` – The instruction failed. Check the errorMessage field for more information. - `inProgress` – The instruction is currently in progress.
  - `errorMessage` string — Description of the error that caused the instruction to fail. **Note:** We return this field only if the status is `failure`.
  - `link` Link — Object that contains HATEOAS links for the resource.
    - `rel` string, required — Indicates the relationship between the current resource and the target resource.
    - `method` string, required — HTTP method that you need to use with the target resource.
    - `href` string, required — URL of the target resource.
  - `refundInstructionId` string, required — Unique identifier that we assigned to the refund instruction.

## Other responses

- `400` — Validation error
- `401` — Identity could not be verified
- `403` — Do not have permissions to perform this action
- `404` — Resource not found
- `406` — Not acceptable
- `409` — Conflict
- `415` — Unsupported media type
- `500` — An error has occured

---

[API](https://skmtc.dev/payroc/apis/schema.md) · [All operations](https://skmtc.dev/payroc/apis/schema/llms.txt) · [OpenAPI document](https://skmtc-service-production.skmtc.workers.dev/v1/apis/payroc/schema/revisions/1d9d3e305945/schema)
