> The index of all pages is at [llms.txt](https://developers.qliro.com/llms.txt). Add `.md` to any page URL for its Markdown.

# Retry merchant payment (/api-reference/admin/merchant-payment/retry-merchant-payment)

`POST https://payments.qliro.com/checkout/adminapi/v2/merchantpayment/retry`

Production: `https://payments.qliro.com/checkout/adminapi`. Staging: `https://pago.qit.nu/checkout/adminapi`

Retries a failed payment for an existing order, with a different payment method.

The response only confirms that Qliro received the request. Qliro sends the result in a notification with the `OrderId` and `PaymentTransactionId`.

## Body (application/json)

- `RequestId` (string): A GUID formatted string used to avoid the same request being executed multiple times. The GUID will be stored for 7 days, and during that time, any requests sent with the same GUID will be denied. https://guidgenerator.com/online-guid-generator.aspx. Format: `guid`
- `MerchantApiKey` (string, required): Will be provided by Qliro Checkout when setting up merchant account. Length: `0 <= x <= 50`
- `OrderId` (integer): Id of the order for which to retry is to be performed. Format: `int64`
- `PaymentMethod` (object, required): Payment method for the specific purchase
  - `Name` (string, required): Can be ‘CREDITCARDS’ , ‘QLIRO_INVOICE’. Length: `x >= 1`
  - `Subtype` (string | null): Required only if QLIRO_INVOICE. Value is 'INVOICE'
  - `MerchantSavedCreditCardId` (string | null): Required if CREDITCARDS Will be used to identify customer. Format: `guid`
- `Customer` (object | null): Customer information
  - `PersonalNumber` (string | null): A national identification number to identify the customer. Length: `0 <= x <= 50`
  - `VatNumber` (string | null): Value added tax number for 'Company' customers. Length: `0 <= x <= 50`
  - `Email` (string | null): The customer's email address. Length: `0 <= x <= 255`
  - `JuridicalType` (string | null): 'Physical' or 'Company'. If 'Company', the PersonalNumber parameter will be interpreted as an organization number
  - `MobileNumber` (string | null): The customer's mobile number. Length: `0 <= x <= 50`
- `BillingAddress` (object | null): Customer billing address
  - `FirstName` (string, required): The first name of a physical customer's address. Length: `0 <= x <= 100`
  - `LastName` (string, required): The last name of a physical customer's address. Length: `0 <= x <= 100`
  - `CompanyName` (string | null): The name of an organization customer's address. Length: `0 <= x <= 100`
  - `Street` (string, required): The street name and number of the address. Length: `0 <= x <= 100`
  - `Street2` (string | null): Additional street information of the address. Length: `0 <= x <= 40`
  - `PostalCode` (string, required): The postal code of the address. Length: `0 <= x <= 15`
  - `City` (string, required): The city of the address. Length: `0 <= x <= 100`
  - `CareOf` (string | null): Used if the addressee doesn't have a standard address. Length: `0 <= x <= 100`
  - `Area` (string | null): The Area of the address. Length: `0 <= x <= 100`
  - `AreaCode` (string | null): The AreaCode in ISO3166-2 format. Meant to be used for USA and should look like this: 'US-CA'. Length: `0 <= x <= 10`
- `Country` (string | null): Two upper case characters. In accordance with ISO 3166-1

## Responses

### 200 (application/json)

Request received.

- `PaymentTransactions` (object[] | null)
  - `PaymentTransactionId` (integer): Format: `int64`
  - `Status` (InfrastructureConstantsPaymentTransactionStatus): Values: `0`, `1`, `2`, `3`, `4`, `5`, `6`

Example:

```json
{
  "PaymentTransactions": [
    {
      "PaymentTransactionId": 0,
      "Status": 0
    }
  ]
}
```

### 400 (application/json)

- `ErrorCode` (string | null): Unique error code
- `ErrorMessage` (string | null): Detailed error message
- `ErrorReference` (string): A tracking ID from Qliro Checkout. Format: `guid`

Example:

```json
{
  "ErrorCode": "string",
  "ErrorMessage": "string",
  "ErrorReference": "string"
}
```

### 500 (application/json)

- `ErrorCode` (string | null): Unique error code
- `ErrorMessage` (string | null): Detailed error message
- `ErrorReference` (string): A tracking ID from Qliro Checkout. Format: `guid`

Example:

```json
{
  "ErrorCode": "string",
  "ErrorMessage": "string",
  "ErrorReference": "string"
}
```

## Example request

```bash
curl -X POST "https://payments.qliro.com/checkout/adminapi/v2/merchantpayment/retry" \
  -H "Content-Type: application/json" \
  -d '{
  "MerchantApiKey": "HATS",
  "PaymentMethod": {
    "Name": "QLIRO_INVOICE"
  }
}'
```
