create priced magento order without paying

create priced magento order without paying

September 15, 2026 · Illustrated author avatarBy Stefan Bogdanescu
create priced magento order without paying

Creating Magento Orders Without Payment

In Magento, creating orders without going through the payment gateway is possible using the administration panel or programmatically via the API. This allows you to create test or placeholder orders for various purposes such as inventory management, sales tax calculations, or system testing.

Creating Orders in the Administration Panel

  1. Log in to your Magento admin panel.
  2. Navigate to Sales > Orders in the left-hand menu.
  3. Click on the “Create New Order” button at the top right corner of the page.
  4. Select a customer from the dropdown list or create a new one by clicking “New Customer.”
  5. In the “Add Products” section, search for and select the products you want to add to the order.
  6. Click “Add Selected Items to Order.”
  7. Proceed through the order creation process until you reach the payment step.

To bypass the requirement for payment information:

  • Select “Offline Payment Methods” as the payment method.
  • Choose a specific offline option, such as “Bank Transfer Payment” or “Purchase Order.”
  • Click “Place Order.”

This will create an order with the specified products and prices, but it won’t require actual payment. The status of the order will be set to “Pending payment,” reflecting that payment is still required.

Creating Orders Programmatically

For more advanced use cases, you can utilize Magento’s SOAP API or REST API to create orders programmatically. Here’s a high-level overview of the process:

  1. Create an admin user with sufficient privileges.
  2. Obtain your Magento API credentials (consumer key and consumer secret).
  3. Write a script in your preferred programming language that authenticates against the Magento API.

In PHP, you would use the Magento\Webapi\Model\Service class to generate a service URL:

$serviceUrl = $objectManager->get('Magento\Webapi\Model\Config')->getBackendConfig('webapi_soap_url');
  1. Use cURL or another HTTP client library to send a POST request with the necessary order data in JSON format.

An example of creating an order using the REST API:

$url = 'http://your-magento-site.com/rest/V1/orders';
$data = [
    'entity' => [
        'customer_id' => 1,
        'items' => [
            [ 'sku' => 'product_sku', 'qty' => 2, 'price' => 50 ]
        ],
        'payment_methods' => [
            'method' => 'bank_transfer'
        ],
    ],
];

$curl = curl_init($url);
curl_setopt($curl, CURLOPT_RETURNTRANSFER, true);
curl_setopt($curl, CURLOPT_CUSTOMREQUEST, "POST");
curl_setopt($curl, CURLOPT_POSTFIELDS, json_encode($data));
curl_setopt($curl, CURLOPT_HTTPHEADER, array(
    'Content-Type: application/json',
    'Authorization: Bearer <your-oauth-token>'
));

$response = curl_exec($curl);

This script creates an order for a specific customer with a single item priced at $50, using the “bank transfer” payment method.

Conclusion

Creating Magento orders without payment is a common requirement for testing or special cases. By utilizing either the administration panel’s offline payment methods or by creating custom scripts via the API, you can generate orders with specified products and prices without having to provide actual payment information.

For more detailed tutorials on Magento development and API usage, I recommend checking out the comprehensive guides available at Laravel Company.

Remember that when testing or creating these types of orders, it’s crucial to monitor your inventory levels and sales tax calculations to maintain accurate accounting records within your Magento instance.

Happy coding!

Catalog API Admin Orders

Our network