Title: increment order id
Last modified: February 14, 2017

---

# increment order id

 *  [koubeissyibrahim](https://wordpress.org/support/users/koubeissyibrahim/)
 * (@koubeissyibrahim)
 * [9 years, 2 months ago](https://wordpress.org/support/topic/increment-order-id/)
 * Hello,
 * I’m building a payement gateway plugin, the gateway i’m working with is obliging
   me to generate a new order id for every checkout.
    Here’s my case
 * 1- user checkout
    2- error occurs or cancels the payment 3- a pending order is
   created in woo 4- the user tries another time to checkout
 * how can i change the order id or delete the previous order and generate a new
   order with the same properties of the old one
 * Regards

The topic ‘increment order id’ is closed to new replies.

 * ![](https://ps.w.org/woocommerce/assets/icon.svg?rev=3234504)
 * [WooCommerce](https://wordpress.org/plugins/woocommerce/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/woocommerce/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/woocommerce/)
 * [Active Topics](https://wordpress.org/support/plugin/woocommerce/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/woocommerce/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/woocommerce/reviews/)

## Tags

 * [$order_id](https://wordpress.org/support/topic-tag/order_id/)

 * 0 replies
 * 1 participant
 * Last reply from: [koubeissyibrahim](https://wordpress.org/support/users/koubeissyibrahim/)
 * Last activity: [9 years, 2 months ago](https://wordpress.org/support/topic/increment-order-id/)
 * Status: not resolved