question

jainh avatar image
jainh asked logomaniya answered

Making a partial refund

I'm trying to test whether if I can make a partial payment on a transaction that I had made before.

I have a Transaction Id, multi-pay token (if needed), Is there a possibility of doing a partial refund without creating an order using the endpoint --> https://scl-sandbox.dev.clover.com/v1/refunds


I'm aware that the endpoint can only do full refunds and no partial, but just checking if there is any way as creating an order and then doing partial refund is tedious.


Could you please suggest or advice me on this.

Refund
10 |2000

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

parquet76 avatar image
parquet76 answered parquet76 edited

Have you seen the docs? https://docs.clover.com/docs/ecommerce-refunding-payments#refund-charges

See the big Note:

NOTE

/v1/refunds can be used only to refund charges created with /v1/charges. The /v1/refunds endpoint does not support partial refunds for charges that include taxes or tips or charges that have more than one line item.

You can partially refund payments created with /v1/orders/{orderId}/pay with the /v1/orders/{orderId}/returns endpoint.

2 comments
10 |2000

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

jainh avatar image jainh commented ·

Yes sir, I went through the documentation, and that is why I mentioned if there is any way to do partial refunds without creating an order. If you know of any way, then do let me know. I'm already creating charges using /v1/charges, but just need to do partial refund on that. It seems like a long way to create an order and then do partial refund on that.

0 Likes 0 ·
parquet76 avatar image parquet76 jainh commented ·

An order will be created internally when you create a charge. Read all the comments here - https://community.clover.com/questions/33628/ecommerce-partial-refund.html. If you get the line item id and pass that to the returns endpoint with a partial amount it should work. Sequence of steps:

1) Get the charge, the response will contain the order id.

2) Get the line items for the order.

3) Pass the line item id and a partial amount to the returns endpoint.

0 Likes 0 ·
logomaniya avatar image
logomaniya answered

If you’re trying to perform a partial refund on a transaction in Clover’s API, you’re correct that the /v1/refunds endpoint only supports full refunds. However, there are ways to achieve a partial refund using the Clover API or by managing the process with some additional steps. Here’s a detailed guide to help you navigate the process and explore your options:

1. Understanding Clover's Refund Capabilities

Clover’s API provides different endpoints and methods for handling transactions and refunds. The /v1/refunds endpoint indeed supports only full refunds, and as of the latest information available, there isn’t a direct API call for partial refunds using this endpoint.

2. Performing a Partial Refund

Since the /v1/refunds endpoint does not support partial refunds directly, you will need to work around this limitation. Here are some methods and steps you can take:

Option A: Use the Clover Dashboard for Partial Refunds

The easiest method, though not programmatic, is to manually process partial refunds through the Clover Dashboard:

Source: https://subwaysurferapk.org/

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