Skip to main content

Credit2Void

Credit2Void request​

Credit2Void request is used to return the funds of a payment. It creates either a REVERSAL or a REFUND transaction. You send the same request in both cases: the Payment Platform chooses the transaction by the payment status at the moment it processes the request.

Payment statusTransactionAmountstatus in the callback
PENDING: the payment is authorized but not capturedREVERSAL: the held funds are releasedFull amount only. A partial amount is rejected with error 100000 and the message Not acceptable to request the reversal for partial amount. To return a part of the funds, capture the payment first, then refund that partREVERSAL
SETTLED: a SALE, or a SALE with auth=Y after CAPTUREREFUND: the funds are returned to the accountFull or partial. Several partial refunds are allowedREFUND when the whole amount is refunded, SETTLED while a part of the amount is not refunded yet

A payment in any other status cannot be refunded or reversed: the request returns an error.

A payment stays in PENDING status until it is captured. This is the case after a SALE with auth=Y, and after any SALE if the Payment Platform has enabled two-stage mode on your MID. See Two-stage payments. This is why the same request creates a REVERSAL for one payment and a REFUND for another: a request sent before the capture creates a REVERSAL, and one sent after it creates a REFUND. The SALE callback shows the payment status at the moment the SALE was processed, and the payment may have been captured since. To see the current status, send a GET_TRANS_STATUS request.

The response to the request does not say which transaction was created. Check status in the callback: it is the status of the payment after the transaction.

This request is sent by POST in the background (e.g. through PHP CURL).

note

Do not use VOID to release a held authorization: VOID accepts only a payment in SETTLED status on the same financial day.

Request parameters​

ParameterDescriptionLimitationsRequired
actionAction to perform= CREDITVOID+
client_keyUnique client key (CLIENT_KEY)+
trans_idTransaction ID in the Payment PlatformString up to 255 characters+
amountThe amount for partial refund. Several partial refunds allowed. For a payment in PENDING status only the full amount is accepted.Format depends on currency.
Send Integer type value for currencies with zero-exponent.
Example: 1000
Send Float type value for currencies with exponents 2, 3, 4.
Format for 2-exponent currencies: XX.XX
Example: 100.99
Pay attention that currencies 'UGX', 'JPY', 'KRW', 'CLP' must be send in the format XX.XX, with the zeros after comma.
Example: 100.00
Format for 3-exponent currencies: XXX.XXX
Example: 100.999.
Format for 4-exponent currencies: XXX.XXXX
Example: 100.9999
-
hashSpecial signature to validate your request to Payment PlatformSee Appendix A, Creditvoid signature.+

Response parameters​

ParameterDescription
actionCREDITVOID
resultACCEPTED
order_idTransaction ID in the Merchant's system
trans_idTransaction ID in the Payment Platform

Callback parameters​

Successful refund/reversal response

ParameterDescription
actionCREDITVOID
resultSUCCESS
statusREFUND or REVERSAL (the whole amount is returned) / SETTLED (a part of the amount is not returned yet). See Credit2Void request
order_idTransaction ID in the Merchant's system
trans_idTransaction ID in the Payment Platform
creditvoid_idRefund/reversal transaction ID in the Payment Platform. Every refund or reversal transaction, including a partial or declined one, has its own ID. trans_id is the ID of the original payment.
creditvoid_dateDate of the refund/reversal
amountAmount of refund
connector_name *Connector's name (Payment Gateway)
acquirer_name *Name of the acquirer set on the MID that processed the payment. Not sent if the MID has no acquirer
mid_descriptor *Descriptor set on the MID that processed the payment. It is a fixed value of the MID, unlike descriptor, which is the bank's descriptor of the payment (or the MID descriptor if the bank returns none). Not sent if the MID has no descriptor
rrn *Retrieval Reference Number value from the acquirer system
approval_code *Approval code value from the acquirer system
gateway_id *Gateway ID – transaction identifier provided by payment gateway
extra_gateway_id *Extra Gateway ID – additional transaction identifier provided by payment gateway.
merchant_name *Merchant Name
mid_name *MID Name
issuer_country *Issuer Country
issuer_bank *Issuer Bank
hashSpecial signature, used to validate callback. See Appendix A, Callback signature.

* The parameters are included if the appropriate setup is configured in the admin panel (see “Add Extended Data to Callback” block in the Configurations -> Protocol Mappings section).

Unsuccessful refund/reversal response

ParameterDescription
actionCREDITVOID
resultDECLINED
statusPayment status, unchanged: PENDING if the payment is still waiting for capture, SETTLED otherwise
order_idTransaction ID in the Merchant's system
trans_idTransaction ID in the Payment Platform
creditvoid_idRefund/reversal transaction ID in the Payment Platform. Every refund or reversal transaction, including a partial or declined one, has its own ID. trans_id is the ID of the original payment.
decline_reasonDescription of the cancellation of the transaction
hashSpecial signature, used to validate callback. See Appendix A, Callback signature.

Undefined refund/reversal response

ParameterDescription
actionCREDITVOID
resultUNDEFINED
statusPENDING if the payment is still waiting for capture, SETTLED otherwise
order_idTransaction ID in the Merchant's system
trans_idTransaction ID in the Payment Platform
creditvoid_idRefund/reversal transaction ID in the Payment Platform. Every refund or reversal transaction, including a partial or declined one, has its own ID. trans_id is the ID of the original payment.
creditvoid_dateTransaction date in the Payment Platform
amountAmount of refund
hashSpecial signature, used to validate callback, see Appendix A, Callback signature