WordPress at a glance
function is not described

WC_Order::get_checkout_payment_url() public WC 1.0

Generates a URL so that a customer can pay for their (unpaid - pending) order. Pass 'true' for the checkout version which doesn't offer gateway choices.

{} It's a method of the class: WC_Order{}

Hooks from the method
Return

String.

Usage

$WC_Order = new WC_Order();
$WC_Order->get_checkout_payment_url( $on_checkout );
$on_checkout(true/false)
If on checkout.

Code of WC_Order::get_checkout_payment_url() WC 5.0.0

<?php
public function get_checkout_payment_url( $on_checkout = false ) {
	$pay_url = wc_get_endpoint_url( 'order-pay', $this->get_id(), wc_get_checkout_url() );

	if ( $on_checkout ) {
		$pay_url = add_query_arg( 'key', $this->get_order_key(), $pay_url );
	} else {
		$pay_url = add_query_arg(
			array(
				'pay_for_order' => 'true',
				'key'           => $this->get_order_key(),
			),
			$pay_url
		);
	}

	return apply_filters( 'woocommerce_get_checkout_payment_url', $pay_url, $this );
}