question

jainh avatar image
jainh asked parquet76 edited

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.

1 Answer

·
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 ·

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