question

joshstrange avatar image
joshstrange asked David Marginian Deactivated answered

How to cancel/void a PreAuth created in the SDK using the REST API

We are creating a preAuth at the start of the checkout process and then we have our own UI for tip/signature flow. Once we get everything we need we capture the preAuth. This all works great but we are trying to figure out how best to handle canceling/voiding the preAuth if we decide to bail out of the sale for whatever reason (need to add something else to the order, cancel the order completely, etc). We don't want a bunch of preAuths waiting to expire.


I see the "Delete an authorization" REST API endpoint but it takes a mId and an authId. The mId isn't a problem but I'm not sure what the "authId" is or where it comes from. In the SDK we get back the following properties that I feel *could* be the authId (Payment.id, Payment.order.id, Payment.cardTransaction.authCode, Payment.cardTransaction.referenceId) but nothing specifically called "authId".


My question is twofold:


1. Can we cancel/void preAuths (created in the SDK) using the REST API?

2. If so, what is the "authId" and where do we get it from?

REST APIClover Android SDK
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

·
David Marginian avatar image
David Marginian Deactivated answered

I am not familiar with the delete authorization endpoint, but it does look like it may work for your situation. I would guess the authorization id is the payment's id. Give it a try on sandbox.

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