question

mikhail avatar image
mikhail asked mikhail answered

Custom Tender partial payment issue

We have logic that uses custom tenders for partial order payments for quite some time already. Recently we noticed it doesn't work as it used to. Specifically, the problem is that after partial payment with custom tender, the following credit card payment was used to charge for the remaining order amount (order total - custom tender payment amount), but now it charges the full order amount, and no custom tender amount deduction happening. Here is the example of our ordering flow with regard to clover API calls from our sandbox account and a screenshot illustrating the problem:


screenshot-from-2024-02-09-09-48-00.png

POST https://sandbox.dev.clover.com/v3/merchants/EFHPD5PR65ZQ1/orders/ 
{:externalReferenceId=>"33FDC761", 
  :taxRemoved=>false, 
  :state=>"open", 
  :testMode=>true, 
  :manualTransaction=>false, 
  :orderType=>{:id=>"C8FS4NTQZBD14"}, 
  :total=>1485}
POST https://sandbox.dev.clover.com/v3/merchants/EFHPD5PR65ZQ1/orders/DJTNXSGDRGB1R/bulk_line_items 
{:items=>[
  {:name=>"Service Fee", 
    :price=>100, 
    :isRevenue=>false, 
    :taxRates=>[
      {:id=>"HEAHYQP84G4XP", 
        :name=>"Grocery Item", 
        :isDefault=>true, 
        :rate=>610000}
    ]}, 
  {:name=>"Bacon & Shrimp (Upd)", 
    :price=>1300, 
    :discountAmount=>0, 
    :note=>"\n\n", 
    :taxRates=>[
      {:id=>"HEAHYQP84G4XP", 
        :name=>"Grocery Item", 
        :isDefault=>true, 
        :rate=>610000}
    ]}
]}
POST https://scl-sandbox.dev.clover.com/v1/orders/DJTNXSGDRGB1R/pay 
{:ecomind=>"ecom", 
  :email=>"mikhail@shakacode.com", 
  :external_reference_id=>"33FDC761", 
  :tender=>{:id=>"TJSVH4G2FRF50"}, 
  :source=>"alternate_tender", 
  :amount=>1000}
POST https://scl-sandbox.dev.clover.com/v1/orders/DJTNXSGDRGB1R/pay 
{:ecomind=>"ecom", 
  :email=>"mikhail@shakacode.com", 
  :external_reference_id=>"33FDC761", 
  :source=>"clv_1TSTSbSxfgj3fUiJJ7rSt1dx", 
  :tip_amount=>nil, 
  :level2=>{:tax_amount=>85, :tax_indicator=>1, :pc_order_number=>"33FDC761", :discount_amount=>0}}
PaymentsCustom Tenders
10 |2000

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

1 Answer

·
mikhail avatar image
mikhail answered

any help here?

10 |2000

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

Write an Answer

Hint: Notify or tag a user in this post by typing @username.

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

Welcome to the
Clover Developer Community