# Delete a buy instruction

Retires a buy instruction you no longer intend to use, so a fiat payment arriving later with
its memo can never mint against it. Because instructions never expire, this is the only way
to retire an unused one - an abandoned instruction left alone stays `UNUSED` and claimable
indefinitely.
Deletion is permanent and there is no un-delete: create a new instruction with a new id,
which gets a new memo. Transactions already produced from the instruction are unaffected and
keep their `fiatInstructionId` and `memo`.
Only your own `UNUSED` buy instructions can be deleted. A redemption (`FIAT`) instruction is
reported as `404`, since this operation only addresses your `CRYPTO` instructions.

Endpoint: DELETE /v1/stablecoin/fiat-instructions/{id}
Version: 1.0.0
Security: oauth2

## Security:

  - `oauth2` (unknown)
    oauth2 scopes: rlusd_customers:write

## Path parameters:

  - `id` (string, required)
    Fiat instruction UUID

## Response 200:

  - `200` (unknown)
    Instruction deleted. The body is empty, and a subsequent `GET` or `DELETE` on the id
returns `404 FIAT_INSTRUCTION_NOT_FOUND`.

## Response 401:

  - `401` (unknown)
    Missing or expired access token

## Response 401 fields (application/problem+json):

  - `type` (string)
    URI reference identifying the problem type

  - `title` (string)
    Short, human-readable summary of the problem

  - `status` (integer)
    HTTP status code

  - `code` (string)
    Machine-readable error code
    Enum: "TRANSACTION_NOT_FOUND", "TRANSACTION_INVALID_STATUS_TRANSITION", "TRANSACTION_DESTINATION_TYPE_IMMUTABLE", "FIAT_INSTRUCTION_NOT_FOUND", "FIAT_INSTRUCTION_ALREADY_EXISTS", "FIAT_INSTRUCTION_INVALID_STATUS_TRANSITION", "STABLECOIN_BANK_DETAILS_NOT_FOUND", "WALLET_NOT_FOUND", "WALLET_NOT_APPROVED", "FORBIDDEN", "UPSTREAM_UNAVAILABLE", "INVALID_REQUEST_BODY", "UNKNOWN_EXCEPTION"

## Response 403:

  - `403` (unknown)
    The caller is not entitled to the operation - either the access token lacks the scope
the operation requires, or the tenant is not entitled to the API at all (`FORBIDDEN`).

## Response 403 fields (application/problem+json):

  - `type` (string)
    URI reference identifying the problem type

  - `title` (string)
    Short, human-readable summary of the problem

  - `status` (integer)
    HTTP status code

  - `code` (string)
    Machine-readable error code
    Enum: "TRANSACTION_NOT_FOUND", "TRANSACTION_INVALID_STATUS_TRANSITION", "TRANSACTION_DESTINATION_TYPE_IMMUTABLE", "FIAT_INSTRUCTION_NOT_FOUND", "FIAT_INSTRUCTION_ALREADY_EXISTS", "FIAT_INSTRUCTION_INVALID_STATUS_TRANSITION", "STABLECOIN_BANK_DETAILS_NOT_FOUND", "WALLET_NOT_FOUND", "WALLET_NOT_APPROVED", "FORBIDDEN", "UPSTREAM_UNAVAILABLE", "INVALID_REQUEST_BODY", "UNKNOWN_EXCEPTION"

## Response 404:

  - `404` (unknown)
    Unknown id, another customer's instruction, an already-deleted instruction, or a
redemption (`FIAT`) instruction (`FIAT_INSTRUCTION_NOT_FOUND`).

## Response 404 fields (application/problem+json):

  - `type` (string)
    URI reference identifying the problem type

  - `title` (string)
    Short, human-readable summary of the problem

  - `status` (integer)
    HTTP status code

  - `code` (string)
    Machine-readable error code
    Enum: "TRANSACTION_NOT_FOUND", "TRANSACTION_INVALID_STATUS_TRANSITION", "TRANSACTION_DESTINATION_TYPE_IMMUTABLE", "FIAT_INSTRUCTION_NOT_FOUND", "FIAT_INSTRUCTION_ALREADY_EXISTS", "FIAT_INSTRUCTION_INVALID_STATUS_TRANSITION", "STABLECOIN_BANK_DETAILS_NOT_FOUND", "WALLET_NOT_FOUND", "WALLET_NOT_APPROVED", "FORBIDDEN", "UPSTREAM_UNAVAILABLE", "INVALID_REQUEST_BODY", "UNKNOWN_EXCEPTION"

## Response 409:

  - `409` (unknown)
    The instruction is `USED` or `CANCELED` (`FIAT_INSTRUCTION_INVALID_STATUS_TRANSITION`) -
a claimed memo cannot be retired.

## Response 409 fields (application/problem+json):

  - `type` (string)
    URI reference identifying the problem type

  - `title` (string)
    Short, human-readable summary of the problem

  - `status` (integer)
    HTTP status code

  - `code` (string)
    Machine-readable error code
    Enum: "TRANSACTION_NOT_FOUND", "TRANSACTION_INVALID_STATUS_TRANSITION", "TRANSACTION_DESTINATION_TYPE_IMMUTABLE", "FIAT_INSTRUCTION_NOT_FOUND", "FIAT_INSTRUCTION_ALREADY_EXISTS", "FIAT_INSTRUCTION_INVALID_STATUS_TRANSITION", "STABLECOIN_BANK_DETAILS_NOT_FOUND", "WALLET_NOT_FOUND", "WALLET_NOT_APPROVED", "FORBIDDEN", "UPSTREAM_UNAVAILABLE", "INVALID_REQUEST_BODY", "UNKNOWN_EXCEPTION"

## Response 500:

  - `500` (unknown)
    Unexpected server error

## Response 500 fields (application/problem+json):

  - `type` (string)
    URI reference identifying the problem type

  - `title` (string)
    Short, human-readable summary of the problem

  - `status` (integer)
    HTTP status code

  - `code` (string)
    Machine-readable error code
    Enum: "TRANSACTION_NOT_FOUND", "TRANSACTION_INVALID_STATUS_TRANSITION", "TRANSACTION_DESTINATION_TYPE_IMMUTABLE", "FIAT_INSTRUCTION_NOT_FOUND", "FIAT_INSTRUCTION_ALREADY_EXISTS", "FIAT_INSTRUCTION_INVALID_STATUS_TRANSITION", "STABLECOIN_BANK_DETAILS_NOT_FOUND", "WALLET_NOT_FOUND", "WALLET_NOT_APPROVED", "FORBIDDEN", "UPSTREAM_UNAVAILABLE", "INVALID_REQUEST_BODY", "UNKNOWN_EXCEPTION"

