> For the complete documentation index, see [llms.txt](https://docs.2checkout.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.2checkout.com/get-started-with-the-2checkout-api/get-started-with-the-2checkout-api/authentication-and-use-cases/2checkout-api-use-cases/retrying-the-payment-for-an-order.md).

# Retrying the payment for an order

You can retry making a payment if the initial payment fails, without placing a new order. You can use other payment details or a different payment method.

## Availability

Available for all orders placed via API and on all 2Checkout accounts.

## Request sample

To retry a payment for an already placed order, provide the order reference number in the Place Order API call in the `RefNo` parameter placed in the root of the request object.

```json
{ 
   "Language":"en", 
   "Country":"US", 
   "CustomerIP":"10.10.10.10", 
   "RefNo":"123456622", 
   "Source":"Website", 
   "ExternalCustomerReference":"externalCustomerId", 
   "Currency":"USD", 
   "MachineId":"123456789", 
   "Items":[ 
      { 
         "Code":"5DCB30C6B0", 
         "Quantity":1 
      } 
   ], 

   "BillingDetails":{ 
      "FirstName":"Customer First Name", 
      "LastName":"Customer Last Name", 
      "CountryCode":"US", 
      "State":"California", 
      "City":"San Francisco", 
      "Address1":"Example Street", 
      "Zip":"90210", 
      "Email":"example@email.com" 
   }, 
   "PaymentDetails":{ 
      "Type":"TEST", 
      "Currency":"USD", 
      "PaymentMethod":{ 
         "CardNumber":"4111111111111111", 
         "CardType":"VISA", 
         "ExpirationYear":"2023", 
         "ExpirationMonth":"12", 
         "HolderName":"John Doe", 
         "CCID":"123", 
         "Vendor3DSReturnURL":"http:\/\/yoursuccessurl.com", 
         "Vendor3DSCancelURL":"http:\/\/yourcancelurl.com" 
      }, 
      "CustomerIP":"10.10.10.10" 
   } 
}
```


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation by asking a question.

Perform an HTTP GET request on the following URL with the `ask` and `goal` query parameters:

```
GET https://docs.2checkout.com/get-started-with-the-2checkout-api/get-started-with-the-2checkout-api/authentication-and-use-cases/2checkout-api-use-cases/retrying-the-payment-for-an-order.md?ask=<question>&goal=<user_goal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is what the user is ultimately trying to achieve, the reason they need the answer. Sharing it helps GitBook give you a better, more relevant answer. A goal is most helpful when it describes the outcome the user wants rather than restating the question. For example, with `ask=how do I create an API token`, a goal like `automate deployments from our CI pipeline` lets GitBook tailor the answer to that use case.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
