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.

The Payment Platform can be set up to review refund requests before they are sent to the provider. The response is then the same, result = ACCEPTED, and the refund callback comes only after the request is approved and processed. If the request is rejected, no refund is made and the payment does not change. If callbacks about rejected refund requests are enabled for your account, you receive a callback with result = CANCELLED, otherwise no callback is sent. See Cancelled refund request. Ask your account manager which of these settings apply to your account.

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.

Crypto payments​

A crypto payment can be refunded only in SETTLED status, in full or in parts. A crypto payment in PENDING status is not reversed: the request returns Refund is not allowed. The refund goes out in the currency and network of the payment, and you do not send a refund address. amount can have as many decimal places as the crypto currency has, for example 8 for BTC or 18 for ETH. The response to a crypto refund always contains amount and currency of the refund. Whether a crypto refund is possible depends on the payment provider of the MID; if the provider does not support it, the request returns error 204005 Payment action not supported. Crypto payments are refunded only with CREDITVOID: the Checkout refund request returns Refund is not allowed for them.

After a partial refund always send amount, as for any other payment. Without it the request asks for the full payment amount, not for what is left: it is accepted, and for a crypto payment the response even shows the full amount, but the refund then fails and no callback is sent.

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
Crypto currencies: up to as many decimal places as the currency has, see Crypto payments.
Example: 0.00010100 (BTC)
-
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
amountCrypto payments only: amount of the refund, with as many decimal places as the crypto currency has
currencyCrypto payments only: currency of the refund

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

Cancelled refund request​

Sent when a refund request for your payment is rejected in the Payment Platform before it reaches the provider, if notifications about rejected refund requests are enabled for your account. It is sent for a refund requested with CREDITVOID and for a refund requested in the admin panel. No refund transaction is created, so there is no creditvoid_id or creditvoid_date, and the payment status does not change. For a payment made through Checkout the callback comes in the Checkout format instead, with type = refund and status = cancelled.

ParameterDescription
actionCREDITVOID
resultCANCELLED
statusPayment status, unchanged, for example SETTLED
order_idTransaction ID in the Merchant's system
trans_idTransaction ID in the Payment Platform
amountAmount of the payment, not of the refund
refund_request_idID of the rejected refund request in the Payment Platform. Each refund request of a payment has its own ID
refund_amountAmount of the rejected refund request
hashSpecial signature, used to validate callback, see Appendix A, Callback signature