Skip to content

Conversation

@duncanmcclean
Copy link
Owner

This pull request implements a "Pay on delivery" payment gateway, allowing customers to pay for purchases offline.

Usage

Simply add the built-in pay_on_delivery payment gateway to your gateways array:

// config/statamic/cargo.php

'gateways' => [
    'pay_on_delivery' => [], // [tl! add]
],

Note

The "Pay on delivery" gateway will only be shown to customers when their selected shipping option supports it.

// app/ShippingMethods/LocalPostageService.php

public function options(Cart $cart): Collection  
{  
	return collect([  
		ShippingOption::make($this)  
			->name(__('Standard Shipping'))  
            ->price(499)
            ->acceptsPaymentOnDelivery(true), // [tl! add]
        ]);  
}

When orders are placed using "Pay on delivery":

  • They'll start with a status of "Payment Pending"
  • When you ship the order, update the status to "Shipped"
  • Once the delivery company has collected payment and confirmed delivery, update the status to "Payment Received"

Depending on the delivery company, you may be able to automate the final status update via a custom API integration.


Related: #79

@duncanmcclean duncanmcclean marked this pull request as ready for review January 2, 2026 12:35
@duncanmcclean duncanmcclean merged commit 09ebe0e into main Jan 2, 2026
13 checks passed
@duncanmcclean duncanmcclean deleted the pay-on-delivery branch January 2, 2026 12:35
@github-actions
Copy link

github-actions bot commented Jan 2, 2026

Released as part of v1.0.0-alpha.13.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants