10 posts / 0 new
Last post
gayatriajith815
Partial Capture & Refund of the partial capture.

This is our flow, what works for us and where we are stuck.

1. Authorize $100 - WORKS.
2. Capture Partial 1: $50 (use transaction id & tag of the authorization) - WORKS.
3. Capture Partial 2: $25 (use transaction id & tag of the authorization) - WORKS.
4. Capture Partial 3: $25 (use transaction id & tag of the authorization) - WORKS.
5. Refund partial capture 2 (using the transaction id & tag of partial capture #2) - FAILS ("Bad Request (64) - Invalid Refund")

We even tried using the transaction id & tag of the authorization but, it gives the error: "Bad Request (69) - Invalid Transaction Tag"
Can you tell us how to refund the partial capture? We are not storing card details.

Thank you for your help.


christopherlord730
Re: Partial Capture & Refund of the partial capture.

Please provide the correlation ID returned with the error response for further research.


gayatriajith815
Re: Partial Capture & Refund of the partial capture.

Here you go:

With the "capture" transaction's id & tag
{
"correlation_id":"228.5002912523740",
"Error":{
"messages":[
{"code":"400","description":"Bad Request (64) - Invalid Refund"}
]
},
"transaction_status":"Not Processed",
"bank_message":""
}

With the "authorize" transaction's id & tag
{
"correlation_id":"228.0029145626769",
"Error":{
"messages":[
{"code":"400","description":"Bad Request (69) - Invalid Transaction Tag"}
]
},
"transaction_status":"Not Processed",
"bank_message":""
}


christopherlord730
Re: Partial Capture & Refund of the partial capture.

Both correlation IDs show you're passing a reversal_id. I would recommend referring to the Docs & Sandbox for processing a tagged refund or tagged void transaction for the CERT environment. The request type you are submitting is only supported in production and 'refund' is not a supported transaction type for a 'timeout reversal'.

POST
Timeout Reversal for Credit Card Payments

Use this method to submit timeout, reversal for credit and debit card payments. Supported transaction types are 'authorize' & 'purchase'. Note for US domiciled Merchants: This API is available only in production. Do not attempt this on Sandbox.


gayatriajith815
Re: Partial Capture & Refund of the partial capture.

This is the Document that we are referring too - is this incorrect?
https://developer.payeezy.com/payeezy-api/apis/post/transactions/%7Bid%7D-0
If, this is incorrect then, can you tell us when is this type of transaction used?

Are you suggesting we use this document?
https://developer.payeezy.com/payeezy-api/apis/post/transactions-1
If yes, then do we need to generate a unique reversal_id when we make the authorize and capture requests?
Is there a character limit for the reversal_id field? The document does not describe the reversal_id field.
Why do you recommend a Timed Reversal instead of a normal refund?

Hope my questions are clear. Thank you.


gayatriajith815
Re: Partial Capture & Refund of the partial capture.

Also, I noted that, in the transaction id or tag of the capture transaction is not passed. Does it find the capture transaction using the reversal_id? Is there anyway we can test this before making it live?
https://developer.payeezy.com/payeezy-api/apis/post/transactions-1


christopherlord730
Re: Partial Capture & Refund of the partial capture.

It seems there is confusion occurring. I recommend using the tagged void (within the same business day) or tagged refund options if the batch has been submitted/closed. Please refer to the 'capture or reverse a payment' payload and header structure referenced in the Docs & Sandbox. You DO NOT provide a reversal_id in the request unless you are utilizing the timeout reversal request.

If using the timeout reversal (only available in production) you specify the reversal ID with the initial authorization or purchase transaction. You should keep the character limit at 30 characters. The Payeezy Gateway website transaction history will not reflect any reversal IDs you are submitting.


gayatriajith815
Re: Partial Capture & Refund of the partial capture.

I just tried a tagged refund and I get the same error. Can you tell me what is missing?

#1 Authorize
Authorization Request :

{
"amount":"13200",
"card_number":"4242424242424242",
"card_type":"Visa",
"card_holder_name":"Gayatri Ajith",
"card_cvv":"123",
"card_expiry":"0422",
"merchant_ref":"G Localhost",
"currency_code":"USD"
}

Authorization Response:

{
"correlation_id":"228.0043647240919",
"transaction_status":"approved",
"validation_status":"success",
"transaction_type":"authorize",
"transaction_id":"ET100947",
"transaction_tag":"2204517392",
"method":"credit_card",
"amount":"13200",
"currency":"USD",
"cvv2":"M",
"token":{
"token_type":"FDToken",
"token_data":{"value":"2815158494834242"}
},
"card":{
"type":"Visa",
"cardholder_name":"Gayatri Ajith",
"card_number":"4242",
"exp_date":"0422"
},
"bank_resp_code":"100",
"bank_message":"Approved",
"gateway_resp_code":"00",
"gateway_message":"Transaction Normal"
}

#2 Capture
Capture URL: https://api-cert.payeezy.com/v1/transactions/ET100947
Capture Request:

{
"merchant_ref":"Astonishing-Sale",
"transaction_type":"capture",
"method":"credit_card",
"amount":"4400",
"currency_code":"USD",
"transaction_tag":"2204517392"
}

Capture Response:

{
"correlation_id":"228.0043681722859",
"transaction_status":"approved",
"validation_status":"success",
"transaction_type":"capture",
"transaction_id":"ET135030",
"transaction_tag":"2204519114",
"method":"credit_card",
"amount":"4400",
"currency":"USD",
"token":{
"token_type":"FDToken",
"token_data":{"value":"2815158494834242"}
},
"bank_resp_code":"100",
"bank_message":"Approved",
"gateway_resp_code":"00",
"gateway_message":"Transaction Normal"
}

#3 Tagged Refund
Tagged Refund URL: https://api-cert.payeezy.com/v1/transactions/ET135030
Tagged Refund Request:

{
"merchant_ref":"Astonishing-Sale",
"transaction_type":"refund",
"method":"credit_card",
"amount":"13200",
"currency_code":"USD",
"transaction_tag":"2204519114"
}

Tagged Refund Response:

{
"correlation_id":"228.0043692562697",
"Error":{
"messages":[{
"code":"400",
"description":"Bad Request (64) - Invalid Refund"
}]
},
"transaction_status":"Not Processed",
"bank_message":""
}

christopherlord730
Re: Partial Capture & Refund of the partial capture.

I see the transactions posted to the default Acme Socks Sandbox merchant. The reason the 400 error is being returned is because you only captured $44.00 from the $132.00 pre-authorization. Therefore, you can only refund up to $44.00, not $132.00.


gayatriajith815
Re: Partial Capture & Refund of the partial capture.

Yes, very silly error on my end - sorry about that. Thank you very much for pointing it out. Everything works as expected so far.