Card Refunds

Card Refund is a standalone transaction which is linked to an original card deposit transaction. In order to trigger a Refund, the original card deposit should be in PendingToBeCaptured (306) or CapturedByProvider (27) state. The amount of the refund transaction can be up to the amount to the original transaction (partial vs. full refunds).

Refunds can be triggered only with the Backend2Backend Integration.

The following method IDs are covered in this section:

IDNameCredit/Debit StateReversal State
88VISA RefundRefunded (125)Cancelled(113)
89ECMC RefundRefunded (125)Cancelled(113)
90Maestro RefundRefunded (125)Cancelled(113)
115AMEX RefundRefunded (125)Cancelled(113)
154Diners RefundRefunded (125)Cancelled(113)
171AirplusUATPRefundRefunded (125)Cancelled(113)
188JCB RefundRefunded (125)Cancelled(113)
190Discover RefundRefunded (125)Cancelled(113)

Payment method interaction type: Synchronous Execution (see Interaction Types).

📘

Apple Pay and Google Pay Refunds

Apple Pay and Google Pay refunds can be triggered as instructed on this page using the respective refund method from the table above i.e. an Apple Pay Visa payment can be refunded with a regular Visa refund, and so on. See our Payment Methods page for the Apple Pay and Google Pay methods supported by PXP.

Backend2Backend Integration

For triggering a card deposit refund the initiatePaymentFromReferenceRequest should be invoked.

In the field initiatePaymentFromReferenceRequest.paymentMethodID the specific payment method ID from the above table should be provided.

The field initiatePaymentFromReferenceRequest.amount should contain the amount to be refund to the customer credit card. Partial refunds are possible.

The following key-value pair should be placed in initiatePaymentFromReferenceRequest.specificPaymentData:

  • key = PaymentDescription
  • value = Your reason for the refund

Example initiatePaymentFromReferenceRequest for Card Refund:

<?xml version="1.0" encoding="utf-8"?>
<initiatePaymentFromReferenceRequest 
    xmlns="http://www.cqrpayments.com/PaymentProcessing"
    xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
    xmlns:xsd="http://www.w3.org/2001/XMLSchema">
	<merchantID>KalixaAcceptDEMO</merchantID>
	<shopID>KalixaAcceptDEMO</shopID>
	<originalPaymentID>616129bf-3ee0-4e63-9998-2fed6e85b7b7</originalPaymentID>
	<merchantTransactionID>20141211_11</merchantTransactionID>
	<paymentMethodID>88</paymentMethodID>
	<amount currencyCode="EUR">10</amount>
	<specificPaymentData>				
		<data xsi:type="keyStringValuePair">
			<key>PaymentDescription</key>
			<value>Your reason for refund</value>
		</data>
	</specificPaymentData>
</initiatePaymentFromReferenceRequest>

Example initiatePaymentFromReferenceResponse for Card Refund (offline refund):

<?xml version="1.0" encoding="utf-8"?>
<initiatePaymentFromReferenceResponse 
    xmlns="http://www.cqrpayments.com/PaymentProcessing"
    xmlns:xsd="http://www.w3.org/2001/XMLSchema"
    xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
	<payment xsi:type="paymentWithPaymentAccount">
		<merchantID>KalixaAcceptDEMO</merchantID>
		<shopID>KalixaAcceptDEMO</shopID>
		<paymentMethod>
			<key>88</key>
			<value>VISA Refund</value>
		</paymentMethod>
		<merchantTransactionID>20141211_1</merchantTransactionID>
		<paymentID>7facb804-6ee0-4a0e-9df9-55e7f8233dac</paymentID>
		<userID>KalxiaTestUser_3</userID>
		<paymentProvider>
			<key>92</key>
			<value>CQRUK</value>
		</paymentProvider>
		<amount currencyCode="GBP">30</amount>
		<creationType>
			<key>2</key>
			<value>MerchantOperator</value>
		</creationType>
		<userIP>195.72.132.1</userIP>
		<state>
			<id>6aab23b7-7dab-466c-ba65-5591f54a4fd8</id>
			<definition>
				<key>306</key>
				<value>PendingToBeCaptured</value>
			</definition>
			<createdOn>2014-12-12T12:28:19.6350814Z</createdOn>
			<paymentStateDetails xsi:nil="true"/>
		</state>
		<isExecuted>false</isExecuted>
		<baseAmount currencyCode="EUR">37.89</baseAmount>
		<paymentDetails xsi:nil="true"/>
		<paymentAccount>
			<paymentAccountID>c8650e17-89ff-4566-a4de-835d8818b3f3</paymentAccountID>
		</paymentAccount>
	</payment>
</initiatePaymentFromReferenceResponse>

The creationType will be automatically set to MerchantOperator (2).
The field initiatePaymentFromReferenceResponse.payment.state.definition will have the key-value 306 PendingToBeCaptured if the refund was accepted (authorised successfully by the schemes).

❗️

Capture Delay

In certain situations the requested refund has to be manually approved by an operator of PXP or a merchant operator before it is captured.

In that case, the initiatePaymentFromReferenceResponse.payment.state.definition field will have the key-value 320 RefundInitiated (instead of PendingToBeCaptured).

Only when the operator approves the refund later on, the state of the refund payment will change to PendingToBeCaptured and the refund will be cleared with the schemes.

If a refund cannot be created due to invalid data (e.g. unknown originalPaymentID) the following error codes are returned in an exception message:

Error CodeReasonDescription
504Missing fieldNot all required fields necessary for specific payment method have been sent.
e.g. amount or PaymentDescription (mandatory for refunds)
1002Invalid refund amountThere are 2 possible reasons for this error:
The amount of the refund is higher than the amount of the original payment
The amount of the refund is higher than the allowed refundable amount (calculated as [original payment amount] - sum [all partial refunds])
1003Original payment is refundable / not in a refundable stateIf the original payment has not yet reached PendingToBeCapturedor CapturedByProvider, the refund is not possible.
On the other hand, the original payment could have already reached a state that is not refundable anymore. For that case this error code can be returned as well.
1004Invalid payment methodThe specified refund payment method ID is not allowed for the original deposit’s payment method.

State Diagram

Notifications

A refund payment which is in state PendingToBeCaptured will be sent by PXP for clearing with the schemes at the next possible point of time. When this was done successfully, the state of the state will change to Refunded (key-value 125).

The standard notification mechanism is used for notifying the merchant in the background (asynchronously) about payment state changes. For more information see PaymentStateChangedNotification.

Example handlePaymentStateChangedNotificationRequest for ECMC Refund in Refunded state:

<?xml version="1.0" encoding="utf-8"?>
<handlePaymentStateChangedNotificationRequest
    xmlns="http://www.cqrpayments.com/PaymentProcessing"
    xmlns:xsd="http://www.w3.org/2001/XMLSchema"
    xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
	<payment xsi:type="paymentWithPaymentAccount">
		<merchantID>KalixaAcceptDEMO</merchantID>
		<shopID>KalixaAcceptDEMO</shopID>
		<paymentMethod>
			<key>89</key>
			<value>ECMC Refund</value>
		</paymentMethod>
		<merchantTransactionID>20141215_4</merchantTransactionID>
		<paymentID>f1147803-edb4-48f1-a9dd-ac595e1341b9</paymentID>
		<userID>KalxiaTestUser_5</userID>
		<paymentProvider>
			<key>92</key>
			<value>CQRUK</value>
		</paymentProvider>
		<amount currencyCode="EUR">30.0000</amount>
		<creationType>
			<key>2</key>
			<value>MerchantOperator</value>
		</creationType>
		<userIP>195.72.132.1</userIP>
		<state>
			<id>d08ff23f-1374-47b6-ae92-ee4655f7911c</id>
			<definition>
				<key>125</key>
				<value>Refunded</value>
			</definition>
			<createdOn>2014-12-15T11:39:22.867</createdOn>
			<paymentStateDetails xsi:nil="true" />
		</state>
		<isExecuted>true</isExecuted>
		<baseAmount currencyCode="EUR">30.0000</baseAmount>
		<paymentDetails>
			<detail xsi:type="keyStringValuePair">
				<key>ProviderExternalID</key>
				<value>207764</value>
			</detail>
			<detail xsi:type="keyIntValuePair">
				<key>ParentPaymentCreationTypeID</key>
				<value>1</value>
			</detail>
			<detail xsi:type="keyStringValuePair">
				<key>AuthorizationSequenceValue</key>
				<value>095355</value>
			</detail>
		</paymentDetails>
		<paymentAccount>
			<paymentAccountID>906004724</paymentAccountID>
		</paymentAccount>
	</payment>
</handlePaymentStateChangedNotificationRequest>

Online Refund - Responses

A refund payment which is in state PendingToBeCaptured will be submitted online and will then be moved to state Refunded (key-value 125).

Example initiatePaymentFromReferenceResponse for a ECMC Refund with Online Refund in PendingToBeCaptured state:

📘

Details

Please note that this response includes the following values:

  • ProviderResponseCode set to 0
  • the PaymentStateReasonID
  • MerchantAdviceCode
  • SchemeAccountReference
<?xml version="1.0" encoding="utf-8"?>
<initiatePaymentFromReferenceResponse xmlns:xsd="http://www.w3.org/2001/XMLSchema"
                                      xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
                                      xmlns="http://www.cqrpayments.com/PaymentProcessing">
	<payment xsi:type="paymentWithPaymentAccount">
		<merchantID>B2BTestMerchant</merchantID>
		<shopID>150010</shopID>
		<paymentMethod>
			<key>89</key>
			<value>ECMC Refund</value>
		</paymentMethod>
		<merchantTransactionID>92ee6e90-245c-440e-8625-2090216b48aa</merchantTransactionID>
		<paymentID>b5d09407-c4d3-4d5e-b7f5-80c551c83359</paymentID>
		<userID>a347e97b-42f3-4ce5-bba5-b66b9e</userID>
		<paymentProvider>
			<key>92</key>
			<value>CQRUK</value>
		</paymentProvider>
		<amount currencyCode="EUR">10.00</amount>
		<creationType>
			<key>1</key>
			<value>User</value>
		</creationType>
		<userIP>127.0.0.1</userIP>
		<state>
			<id>8a82dcfc-d7ed-4d40-9abd-50e52a30b695</id>
			<definition>
				<key>306</key>
				<value>PendingToBeCaptured</value>
			</definition>
			<createdOn>2024-02-16T21:45:38.5555336Z</createdOn>
			<paymentStateDetails>
				<detail xsi:type="keyStringValuePair">
					<key>ProviderResponseCode</key>
					<value>0</value>
				</detail>
				<detail xsi:type="keyStringValuePair">
					<key>PaymentStateReasonID</key>
					<value>1</value>
				</detail>
			</paymentStateDetails>
		</state>
		<isExecuted>false</isExecuted>
		<baseAmount currencyCode="EUR">10</baseAmount>
		<paymentDetails>
			<detail xsi:type="keyIntValuePair">
				<key>OriginalPaymentID</key>
				<value>51039519</value>
			</detail>
			<detail xsi:type="keyStringValuePair">
				<key>AuthorizationMID</key>
				<value>2234567890</value>
			</detail>
			<detail xsi:type="keyStringValuePair">
				<key>CardAcceptorNameLocation</key>
				<value>B2BTestMerchant          London       GB</value>
			</detail>
			<detail xsi:type="keyStringValuePair">
				<key>MerchantAdviceCode</key>
				<value>01</value>
			</detail>
			<detail xsi:type="keyStringValuePair">
				<key>SchemeTransactionIdentifier</key>
				<value>MECMGRPTG6UP</value>
			</detail>
			<detail xsi:type="keyStringValuePair">
				<key>SchemeSettlementDate</key>
				<value>0217</value>
			</detail>
			<detail xsi:type="keyStringValuePair">
				<key>ProviderExternalID</key>
				<value>19777771</value>
			</detail>
		</paymentDetails>
		<paymentAccount>
			<paymentAccountID>ae3d8f6d-7e1e-4394-9017-4b69782884ae</paymentAccountID>
			<details>
				<detail xsi:type="keyStringValuePair">
					<key>MaskedNumber</key>
					<value>510108******0033</value>
				</detail>
				<detail xsi:type="keyStringValuePair">
					<key>AccountOwnerToken</key>
					<value>c6132d2f-3f7e-46d4-a30a-65a57a7559ee</value>
				</detail>
				<detail xsi:type="keyIntValuePair">
					<key>ExpiryMonth</key>
					<value>1</value>
				</detail>
				<detail xsi:type="keyIntValuePair">
					<key>ExpiryYear</key>
					<value>2099</value>
				</detail>
				<detail xsi:type="keyStringValuePair">
					<key>HolderName</key>
					<value>BddTestUser</value>
				</detail>
				<detail xsi:type="keyStringValuePair">
					<key>CardType</key>
					<value>Mastercard</value>
				</detail>
				<detail xsi:type="keyStringValuePair">
					<key>SchemeAccountReference</key>
					<value>638430038869887177ZOZRQCDMIHU</value>
				</detail>
			</details>
		</paymentAccount>
	</payment>
</initiatePaymentFromReferenceResponse>

Example initiatePaymentFromReferenceResponse for a ECMC Refund with Online Refund in RefundRefusedByProvider state:

📘

Details

Please note that this response includes the following values:

  • _ProviderResponseCode
  • the PaymentStateReasonID
  • MerchantAdviceCode
  • SchemeAccountReference

<?xml version="1.0" encoding="utf-8"?>
<initiatePaymentFromReferenceResponse xmlns:xsd="http://www.w3.org/2001/XMLSchema"
                                      xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
                                      xmlns="http://www.cqrpayments.com/PaymentProcessing">
	<payment xsi:type="paymentWithPaymentAccount">
		<merchantID>B2BTestMerchant</merchantID>
		<shopID>150010</shopID>
		<paymentMethod>
			<key>89</key>
			<value>ECMC Refund</value>
		</paymentMethod>
		<merchantTransactionID>d7839394-d980-4fad-9015-9eee935a1856</merchantTransactionID>
		<paymentID>2b2800ca-d59f-4ca7-8fc2-db1e9fa65693</paymentID>
		<userID>b9b38fc2-227e-492c-a1ff-f8f2cd</userID>
		<paymentProvider>
			<key>92</key>
			<value>CQRUK</value>
		</paymentProvider>
		<amount currencyCode="EUR">10.00</amount>
		<creationType>
			<key>1</key>
			<value>User</value>
		</creationType>
		<userIP>127.0.0.1</userIP>
		<state>
			<id>ac530515-1d35-49fc-ade8-f8b15cc96d28</id>
			<definition>
				<key>309</key>
				<value>RefundRefusedByProvider</value>
			</definition>
			<createdOn>2024-02-16T21:50:53.4573816Z</createdOn>
			<description>Not sufficient funds</description>
			<paymentStateDetails>
				<detail xsi:type="keyStringValuePair">
					<key>ProviderResponseCode</key>
					<value>51</value>
				</detail>
				<detail xsi:type="keyStringValuePair">
					<key>PaymentStateReasonID</key>
					<value>1</value>
				</detail>
			</paymentStateDetails>
		</state>
		<isExecuted>false</isExecuted>
		<baseAmount currencyCode="EUR">10</baseAmount>
		<paymentDetails>
			<detail xsi:type="keyIntValuePair">
				<key>OriginalPaymentID</key>
				<value>51039521</value>
			</detail>
			<detail xsi:type="keyStringValuePair">
				<key>AuthorizationMID</key>
				<value>2234567890</value>
			</detail>
			<detail xsi:type="keyStringValuePair">
				<key>CardAcceptorNameLocation</key>
				<value>B2BTestMerchant          London       GB</value>
			</detail>
			<detail xsi:type="keyStringValuePair">
				<key>MerchantAdviceCode</key>
				<value>02</value>
			</detail>
			<detail xsi:type="keyStringValuePair">
				<key>SchemeTransactionIdentifier</key>
				<value>MECY3RK83ZN6</value>
			</detail>
			<detail xsi:type="keyStringValuePair">
				<key>SchemeSettlementDate</key>
				<value>0217</value>
			</detail>
			<detail xsi:type="keyStringValuePair">
				<key>ProviderExternalID</key>
				<value>19777773</value>
			</detail>
		</paymentDetails>
		<paymentAccount>
			<paymentAccountID>6d6ccbf2-7231-4c20-923a-bd350df2c6e8</paymentAccountID>
			<details>
				<detail xsi:type="keyStringValuePair">
					<key>MaskedNumber</key>
					<value>511609******6079</value>
				</detail>
				<detail xsi:type="keyStringValuePair">
					<key>AccountOwnerToken</key>
					<value>379f8f27-a647-4024-9c48-ad04c54f7427</value>
				</detail>
				<detail xsi:type="keyIntValuePair">
					<key>ExpiryMonth</key>
					<value>1</value>
				</detail>
				<detail xsi:type="keyIntValuePair">
					<key>ExpiryYear</key>
					<value>2099</value>
				</detail>
				<detail xsi:type="keyStringValuePair">
					<key>HolderName</key>
					<value>BddTestUser</value>
				</detail>
				<detail xsi:type="keyStringValuePair">
					<key>CardType</key>
					<value>Mastercard</value>
				</detail>
				<detail xsi:type="keyStringValuePair">
					<key>SchemeAccountReference</key>
					<value>638434978299605807VYKGMQRTLFO</value>
				</detail>
			</details>
		</paymentAccount>
	</payment>
</initiatePaymentFromReferenceResponse>

Example initiatePaymentResponse for a ECMC Refund with Online Refund in RefundRefusedByProvider state:

📘

Details

Please note that this response includes the following values:

  • the ProviderResponseCode
  • the PaymentStateReasonID
  • the MerchantAdviceCode
  • the SchemeAccountReference
<?xml version="1.0" encoding="utf-8"?>
<initiatePaymentResponse xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://www.cqrpayments.com/PaymentProcessing">
	<payment xsi:type="paymentWithPaymentAccount">
		<merchantID>B2BTestMerchant</merchantID>
		<shopID>150010</shopID>
		<paymentMethod>
			<key>89</key>
			<value>ECMC Refund</value>
		</paymentMethod>
		<merchantTransactionID>17a075ac-7bdb-4e0d-a1d4-5fd2467e73dc</merchantTransactionID>
		<paymentID>df370185-f6c4-4d0e-bacc-a8b0de8365bc</paymentID>
		<userID>38b33aa4-e6e9-479c-83d2-dd7300</userID>
		<paymentProvider>
			<key>92</key>
			<value>CQRUK</value>
		</paymentProvider>
		<amount currencyCode="EUR">10.00</amount>
		<creationType>
			<key>1</key>
			<value>User</value>
		</creationType>
		<userIP>127.0.0.1</userIP>
		<state>
			<id>b012cd1d-5dc3-4753-ba16-536b21800ca7</id>
			<definition>
				<key>309</key>
				<value>RefundRefusedByProvider</value>
			</definition>
			<createdOn>2024-02-22T17:43:23.5138017Z</createdOn>
			<description>Not sufficient funds</description>
			<paymentStateDetails>
				<detail xsi:type="keyStringValuePair">
					<key>ProviderResponseCode</key>
					<value>51</value>
				</detail>
				<detail xsi:type="keyStringValuePair">
					<key>PaymentStateReasonID</key>
					<value>1</value>
				</detail>
			</paymentStateDetails>
		</state>
		<isExecuted>false</isExecuted>
		<baseAmount currencyCode="EUR">10</baseAmount>
		<paymentDetails>
			<detail xsi:type="keyStringValuePair">
				<key>CardAcceptorNameLocation</key>
				<value>B2BTestMerchant          London       GB</value>
			</detail>
			<detail xsi:type="keyStringValuePair">
				<key>MerchantAdviceCode</key>
				<value>02</value>
			</detail>
			<detail xsi:type="keyStringValuePair">
				<key>SchemeTransactionIdentifier</key>
				<value>MECF58KYCPHB</value>
			</detail>
			<detail xsi:type="keyStringValuePair">
				<key>SchemeSettlementDate</key>
				<value>0223</value>
			</detail>
			<detail xsi:type="keyStringValuePair">
				<key>ProviderExternalID</key>
				<value>19805236</value>
			</detail>
		</paymentDetails>
		<paymentAccount>
			<paymentAccountID>446c666a-d0f1-4928-81ca-eb7b4519e79e</paymentAccountID>
			<details>
				<detail xsi:type="keyStringValuePair">
					<key>MaskedNumber</key>
					<value>511609******6079</value>
				</detail>
				<detail xsi:type="keyStringValuePair">
					<key>AccountOwnerToken</key>
					<value>379f8f27-a647-4024-9c48-ad04c54f7427</value>
				</detail>
				<detail xsi:type="keyIntValuePair">
					<key>ExpiryMonth</key>
					<value>4</value>
				</detail>
				<detail xsi:type="keyIntValuePair">
					<key>ExpiryYear</key>
					<value>2030</value>
				</detail>
				<detail xsi:type="keyStringValuePair">
					<key>HolderName</key>
					<value>TEST1</value>
				</detail>
				<detail xsi:type="keyStringValuePair">
					<key>CardType</key>
					<value>Mastercard</value>
				</detail>
				<detail xsi:type="keyStringValuePair">
					<key>SchemeAccountReference</key>
					<value>638434978299605807VYKGMQRTLFO</value>
				</detail>
			</details>
		</paymentAccount>
	</payment>
</initiatePaymentResponse>


Online Refund - Notifications

The standard notification mechanism is used for notifying the merchant in the background (asynchronously) about payment state changes. For more information see PaymentStateChangedNotification.

Example handlePaymentStateChangedNotificationRequest for ECMC Refund in Refunded state:

<?xml version="1.0" encoding="utf-16"?>
<handlePaymentStateChangedNotificationRequest xmlns="http://www.cqrpayments.com/PaymentProcessing"
                                              xmlns:xsd="http://www.w3.org/2001/XMLSchema"
                                              xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
	<payment xsi:type="paymentWithPaymentAccount">
		<merchantID>B2BTestMerchant</merchantID>
		<shopID>150010</shopID>
		<paymentMethod>
			<key>89</key>
			<value>ECMC Refund</value>
		</paymentMethod>
		<merchantTransactionID>a87dad41-2ae6-4a05-b891-16fcae4f7647</merchantTransactionID>
		<paymentID>59e4a653-5f8a-4c8d-8b75-25bdb54cd14e</paymentID>
		<userID>6951f228-7b70-43e9-9ab3-56523a</userID>
		<paymentProvider>
			<key>92</key>
			<value>CQRUK</value>
		</paymentProvider>
		<amount currencyCode="EUR">10.0000</amount>
		<creationType>
			<key>1</key>
			<value>User</value>
		</creationType>
		<userIP>127.0.0.1</userIP>
		<state>
			<id>00752e74-b844-469f-9b98-9e1426ce80c6</id>
			<definition>
				<key>125</key>
				<value>Refunded</value>
			</definition>
			<createdOn>2024-02-16T21:17:23.857</createdOn>
			<paymentStateDetails xsi:nil="true"/>
		</state>
		<isExecuted>true</isExecuted>
		<baseAmount currencyCode="EUR">10.0000</baseAmount>
		<paymentDetails>
			<detail xsi:type="keyStringValuePair">
				<key>ProviderExternalID</key>
				<value>19777769</value>
			</detail>
			<detail xsi:type="keyStringValuePair">
				<key>AuthorizationMID</key>
				<value>2234567890</value>
			</detail>
			<detail xsi:type="keyStringValuePair">
				<key>MerchantAdviceCode</key>
				<value>01</value>
			</detail>
			<detail xsi:type="keyStringValuePair">
				<key>SchemeTransactionIdentifier</key>
				<value>MECS6O1M7FE0</value>
			</detail>
			<detail xsi:type="keyStringValuePair">
				<key>SchemeSettlementDate</key>
				<value>0217</value>
			</detail>
			<detail xsi:type="keyStringValuePair">
				<key>CardAcceptorNameLocation</key>
				<value>B2BTestMerchant          London       GB</value>
			</detail>
			<detail xsi:type="keyStringValuePair">
				<key>OriginalPaymentID</key>
				<value>4ef8676f-63e0-44b0-88df-32a23a9ee296</value>
			</detail>
			<detail xsi:type="keyStringValuePair">
				<key>OriginalPaymentMerchantTransactionID</key>
				<value>3f0e5fb5-7cb8-4cf1-a209-5087d0a9b92c</value>
			</detail>
			<detail xsi:type="keyStringValuePair">
				<key>OriginalPaymentMethodID</key>
				<value>1</value>
			</detail>
			<detail xsi:type="keyStringValuePair">
				<key>OriginalPaymentMethodName</key>
				<value>ECMC Deposit</value>
			</detail>
		</paymentDetails>
		<paymentAccount>
			<paymentAccountID>86641b76-8bd3-4149-85b1-467d9ee9ebf4</paymentAccountID>
			<details>
				<detail xsi:type="keyStringValuePair">
					<key>MaskedNumber</key>
					<value>510108******0033</value>
				</detail>
				<detail xsi:type="keyStringValuePair">
					<key>AccountOwnerToken</key>
					<value>c6132d2f-3f7e-46d4-a30a-65a57a7559ee</value>
				</detail>
				<detail xsi:type="keyIntValuePair">
					<key>ExpiryMonth</key>
					<value>1</value>
				</detail>
				<detail xsi:type="keyIntValuePair">
					<key>ExpiryYear</key>
					<value>2099</value>
				</detail>
				<detail xsi:type="keyStringValuePair">
					<key>HolderName</key>
					<value>BddTestUser</value>
				</detail>
				<detail xsi:type="keyStringValuePair">
					<key>CardType</key>
					<value>Mastercard</value>
				</detail>
				<detail xsi:type="keyStringValuePair">
					<key>SchemeAccountReference</key>
					<value>638430038869887177ZOZRQCDMIHU</value>
				</detail>
			</details>
		</paymentAccount>
	</payment>
</handlePaymentStateChangedNotificationRequest>

Example handlePaymentStateChangedNotificationRequest for ECMC Refund in RefundRefusedByProvider state:

<?xml version="1.0" encoding="utf-16"?>
<handlePaymentStateChangedNotificationRequest xmlns="http://www.cqrpayments.com/PaymentProcessing"
                                              xmlns:xsd="http://www.w3.org/2001/XMLSchema"
                                              xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
	<payment xsi:type="paymentWithPaymentAccount">
		<merchantID>B2BTestMerchant</merchantID>
		<shopID>150010</shopID>
		<paymentMethod>
			<key>89</key>
			<value>ECMC Refund</value>
		</paymentMethod>
		<merchantTransactionID>17a075ac-7bdb-4e0d-a1d4-5fd2467e73dc</merchantTransactionID>
		<paymentID>df370185-f6c4-4d0e-bacc-a8b0de8365bc</paymentID>
		<userID>38b33aa4-e6e9-479c-83d2-dd7300</userID>
		<paymentProvider>
			<key>92</key>
			<value>CQRUK</value>
		</paymentProvider>
		<amount currencyCode="EUR">10.0000</amount>
		<creationType>
			<key>1</key>
			<value>User</value>
		</creationType>
		<userIP>127.0.0.1</userIP>
		<state>
			<id>b012cd1d-5dc3-4753-ba16-536b21800ca7</id>
			<definition>
				<key>309</key>
				<value>RefundRefusedByProvider</value>
			</definition>
			<createdOn>2024-02-22T17:43:23.513</createdOn>
			<paymentStateDetails>
				<detail xsi:type="keyStringValuePair">
					<key>ProviderResponseCode</key>
					<value>51</value>
				</detail>
				<detail xsi:type="keyIntValuePair">
					<key>PaymentStateReasonID</key>
					<value>1</value>
				</detail>
			</paymentStateDetails>
		</state>
		<isExecuted>false</isExecuted>
		<baseAmount currencyCode="EUR">10.0000</baseAmount>
		<paymentDetails>
			<detail xsi:type="keyStringValuePair">
				<key>ProviderExternalID</key>
				<value>19805236</value>
			</detail>
			<detail xsi:type="keyStringValuePair">
				<key>MerchantAdviceCode</key>
				<value>02</value>
			</detail>
			<detail xsi:type="keyStringValuePair">
				<key>SchemeTransactionIdentifier</key>
				<value>MECF58KYCPHB</value>
			</detail>
			<detail xsi:type="keyStringValuePair">
				<key>SchemeSettlementDate</key>
				<value>0223</value>
			</detail>
			<detail xsi:type="keyStringValuePair">
				<key>CardAcceptorNameLocation</key>
				<value>B2BTestMerchant          London       GB</value>
			</detail>
		</paymentDetails>
		<paymentAccount>
			<paymentAccountID>446c666a-d0f1-4928-81ca-eb7b4519e79e</paymentAccountID>
			<details>
				<detail xsi:type="keyStringValuePair">
					<key>MaskedNumber</key>
					<value>511609******6079</value>
				</detail>
				<detail xsi:type="keyStringValuePair">
					<key>AccountOwnerToken</key>
					<value>379f8f27-a647-4024-9c48-ad04c54f7427</value>
				</detail>
				<detail xsi:type="keyIntValuePair">
					<key>ExpiryMonth</key>
					<value>4</value>
				</detail>
				<detail xsi:type="keyIntValuePair">
					<key>ExpiryYear</key>
					<value>2030</value>
				</detail>
				<detail xsi:type="keyStringValuePair">
					<key>HolderName</key>
					<value>TEST1</value>
				</detail>
				<detail xsi:type="keyStringValuePair">
					<key>CardType</key>
					<value>Mastercard</value>
				</detail>
				<detail xsi:type="keyStringValuePair">
					<key>SchemeAccountReference</key>
					<value>638434978299605807VYKGMQRTLFO</value>
				</detail>
			</details>
		</paymentAccount>
	</payment>
</handlePaymentStateChangedNotificationRequest>

Example handlePaymentStateChangedNotificationRequest for Visa Refund in Refunded state:

<?xml version="1.0" encoding="utf-16"?>
<handlePaymentStateChangedNotificationRequest xmlns="http://www.cqrpayments.com/PaymentProcessing"
                                              xmlns:xsd="http://www.w3.org/2001/XMLSchema"
                                              xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
	<payment xsi:type="paymentWithPaymentAccount">
		<merchantID>B2BTestMerchant</merchantID>
		<shopID>150010</shopID>
		<paymentMethod>
			<key>88</key>
			<value>VISA Refund</value>
		</paymentMethod>
		<merchantTransactionID>2b4ed8dd-00c5-44c3-b97d-8a1b5769d304</merchantTransactionID>
		<paymentID>265ead83-1d17-4cc6-b9c9-ca9ce7c78e5f</paymentID>
		<userID>CQRB2BTestMerchantSystemUser</userID>
		<paymentProvider>
			<key>92</key>
			<value>CQRUK</value>
		</paymentProvider>
		<amount currencyCode="EUR">10.0000</amount>
		<creationType>
			<key>1</key>
			<value>User</value>
		</creationType>
		<userIP>127.0.0.1</userIP>
		<state>
			<id>1d4da1e7-7871-4df7-b10c-55a4585ff370</id>
			<definition>
				<key>125</key>
				<value>Refunded</value>
			</definition>
			<createdOn>2024-02-22T18:20:13.183</createdOn>
			<paymentStateDetails xsi:nil="true"/>
		</state>
		<isExecuted>true</isExecuted>
		<baseAmount currencyCode="EUR">10.0000</baseAmount>
		<paymentDetails>
			<detail xsi:type="keyStringValuePair">
				<key>ProviderExternalID</key>
				<value>19805307</value>
			</detail>
			<detail xsi:type="keyStringValuePair">
				<key>AuthorizationMID</key>
				<value>2234567890</value>
			</detail>
			<detail xsi:type="keyStringValuePair">
				<key>SchemeTransactionIdentifier</key>
				<value>573570826136424</value>
			</detail>
			<detail xsi:type="keyStringValuePair">
				<key>CardAcceptorNameLocation</key>
				<value>B2BTestMerchant          London       GB</value>
			</detail>
			<detail xsi:type="keyStringValuePair">
				<key>OriginalPaymentID</key>
				<value>468b5f63-a117-442a-bda9-1e1292e7c4d6</value>
			</detail>
			<detail xsi:type="keyStringValuePair">
				<key>OriginalPaymentMerchantTransactionID</key>
				<value>73f3a970-99de-4ab7-8b9d-6e5dd1a4752f</value>
			</detail>
			<detail xsi:type="keyStringValuePair">
				<key>OriginalPaymentMethodID</key>
				<value>2</value>
			</detail>
			<detail xsi:type="keyStringValuePair">
				<key>OriginalPaymentMethodName</key>
				<value>VISA Deposit</value>
			</detail>
		</paymentDetails>
		<paymentAccount>
			<paymentAccountID>03fd2652-eea2-44ef-8603-282b483afbde</paymentAccountID>
			<details>
				<detail xsi:type="keyStringValuePair">
					<key>IssuerCountry</key>
					<value>AT</value>
				</detail>
				<detail xsi:type="keyStringValuePair">
					<key>AccountFundingSource</key>
					<value>Credit</value>
				</detail>
				<detail xsi:type="keyBooleanValuePair">
					<key>FastFunds</key>
					<value>false</value>
				</detail>
				<detail xsi:type="keyStringValuePair">
					<key>IssuerName</key>
					<value/>
				</detail>
				<detail xsi:type="keyStringValuePair">
					<key>MaskedNumber</key>
					<value>411111******1517</value>
				</detail>
				<detail xsi:type="keyStringValuePair">
					<key>AccountOwnerToken</key>
					<value>e5c864c8-69d9-45ba-9657-9e8945085e81</value>
				</detail>
				<detail xsi:type="keyIntValuePair">
					<key>ExpiryMonth</key>
					<value>1</value>
				</detail>
				<detail xsi:type="keyIntValuePair">
					<key>ExpiryYear</key>
					<value>2099</value>
				</detail>
				<detail xsi:type="keyStringValuePair">
					<key>HolderName</key>
					<value>TestUser1</value>
				</detail>
				<detail xsi:type="keyStringValuePair">
					<key>CardType</key>
					<value>Visa</value>
				</detail>
				<detail xsi:type="keyStringValuePair">
					<key>SchemeAccountReference</key>
					<value>638418046494617583PKVLMQICBNZ</value>
				</detail>
			</details>
		</paymentAccount>
	</payment>
</handlePaymentStateChangedNotificationRequest>

_Example handlePaymentStateChangedNotificationRequest for Visa Refund in RefundRefusedByProvider state:

<?xml version="1.0" encoding="utf-16"?>
<handlePaymentStateChangedNotificationRequest xmlns="http://www.cqrpayments.com/PaymentProcessing"
                                              xmlns:xsd="http://www.w3.org/2001/XMLSchema"
                                              xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
	<payment xsi:type="paymentWithPaymentAccount">    <merchantID>B2BTestMerchant</merchantID>
    <shopID>150010</shopID>
    <paymentMethod>
      <key>88</key>
      <value>VISA Refund</value>
    </paymentMethod>
    <merchantTransactionID>c31513a8-c4e9-45b8-ae2c-617f6d8b598f</merchantTransactionID>
    <paymentID>8a6215a4-3ee7-437c-9bba-658d5f4a9fae</paymentID>
    <userID>CQRB2BTestMerchantSystemUser</userID>
    <paymentProvider>
      <key>92</key>
      <value>CQRUK</value>
    </paymentProvider>
    <amount currencyCode="EUR">10.0000</amount>
    <creationType>
      <key>1</key>
      <value>User</value>
    </creationType>
    <userIP>127.0.0.1</userIP>
    <state>
      <id>c50177f9-0919-4a24-8a6e-95e4096179c9</id>
      <definition>
        <key>309</key>
        <value>RefundRefusedByProvider</value>
      </definition>
      <createdOn>2024-02-22T18:12:15.18</createdOn>
      <paymentStateDetails>
        <detail xsi:type="keyStringValuePair">
          <key>ProviderResponseCode</key>
          <value>5</value>
        </detail>
        <detail xsi:type="keyIntValuePair">
          <key>PaymentStateReasonID</key>
          <value>1</value>
        </detail>
      </paymentStateDetails>
    </state>
    <isExecuted>false</isExecuted>
    <baseAmount currencyCode="EUR">10.0000</baseAmount>
    <paymentDetails>
      <detail xsi:type="keyStringValuePair">
        <key>ProviderExternalID</key>
        <value>19805240</value>
      </detail>
      <detail xsi:type="keyStringValuePair">
        <key>AuthorizationMID</key>
        <value>2234567890</value>
      </detail>
      <detail xsi:type="keyStringValuePair">
        <key>SchemeTransactionIdentifier</key>
        <value>273741078191956</value>
      </detail>
      <detail xsi:type="keyStringValuePair">
        <key>CardAcceptorNameLocation</key>
        <value>B2BTestMerchant          London       GB</value>
      </detail>
      <detail xsi:type="keyStringValuePair">
        <key>OriginalPaymentID</key>
        <value>6352d6c3-36b5-40b3-bb45-3a83324495b9</value>
      </detail>
      <detail xsi:type="keyStringValuePair">
        <key>OriginalPaymentMerchantTransactionID</key>
        <value>bf0a0cc4-dd1d-436a-9e48-ad3a7a016ca9</value>
      </detail>
      <detail xsi:type="keyStringValuePair">
        <key>OriginalPaymentMethodID</key>
        <value>2</value>
      </detail>
      <detail xsi:type="keyStringValuePair">
        <key>OriginalPaymentMethodName</key>
        <value>VISA Deposit</value>
      </detail>
    </paymentDetails>
    <paymentAccount>
      <paymentAccountID>e53e4e28-9e70-41fa-ae77-664871c6728a</paymentAccountID>
      <details>
        <detail xsi:type="keyStringValuePair">
          <key>IssuerCountry</key>
          <value>AT</value>
        </detail>
        <detail xsi:type="keyStringValuePair">
          <key>AccountFundingSource</key>
          <value>Credit</value>
        </detail>
        <detail xsi:type="keyBooleanValuePair">
          <key>FastFunds</key>
          <value>false</value>
        </detail>
        <detail xsi:type="keyStringValuePair">
          <key>IssuerName</key>
          <value />
        </detail>
        <detail xsi:type="keyStringValuePair">
          <key>MaskedNumber</key>
          <value>411111******1277</value>
        </detail>
        <detail xsi:type="keyStringValuePair">
          <key>AccountOwnerToken</key>
          <value>23f8d599-5482-4318-b5d2-b53e00d06100</value>
        </detail>
        <detail xsi:type="keyIntValuePair">
          <key>ExpiryMonth</key>
          <value>1</value>
        </detail>
        <detail xsi:type="keyIntValuePair">
          <key>ExpiryYear</key>
          <value>2099</value>
        </detail>
        <detail xsi:type="keyStringValuePair">
          <key>HolderName</key>
          <value>TestUser1</value>
        </detail>
        <detail xsi:type="keyStringValuePair">
          <key>CardType</key>
          <value>Visa</value>
        </detail>
        <detail xsi:type="keyStringValuePair">
          <key>SchemeAccountReference</key>
          <value>638434996403180354VGDWZEYABCO</value>
        </detail>
      </details>
    </paymentAccount>
  </payment>
</handlePaymentStateChangedNotificationRequest>

InitiatePaymentFromResponse samples

Example handlePaymentStateChangedNotificationRequest for ECMC Refund in PendingToBeCaptured state: