For a general case, you will need to:
1) get the list of payments you'd need to operate with the value of fields might be needed in the later steps
2) bulk void/refund the payments
("Void" transaction might not be supported by the payment gateway where the payment processed and it might also fail if itās already passed the time limit when a void transaction is acceptable by the payment gateway. For those 2 cases, please use refund payment to complete the charge back)
3) (if needed) change the customer accounts' default payment gateway
4) bulk create payments again
(main operations here are using API as an example, but API is not the only approach we have)
DSE filter to find out payments
Data Source
[Invoice Settlement not enabled] Invoice Payment
[Invoice Settlement enabled] Payment Application
Fields
Account: ID, Payment Gateway Name
Invoice: ID, Balance
Payment: Amount, Gateway, ID, Payment Number, Status, Type
Payment Method Snapshot: Credit Card Type, Payment Method ID, Type
Filters
Payment.Status=Processed
Payment.Type=Electronic
(adding other filters customer needs)
Time Frame
(select the required time frame)
Void Payment
https://www.zuora.com/developer/api-reference/#operation/Action_POSTupdate
PUT https://rest.apisandbox.zuora.com/v1/action/update
{
"objects": [
{
"Id": "2c92c0f8707b709e01707f5ee8b6359e",
"Status": "Voided"
},
{
"Id": "2c92c0f8707b70a401707f5c3cbe7591",
"Status": "Voided"
}
],
"type": "Payment"
}
Refund Payment
https://www.zuora.com/developer/api-reference/#operation/Action_POSTcreate
POST https://rest.apisandbox.zuora.com/v1/action/create
{
"objects":
[
{"AccountId": "2c92c0f969051fe301690ac8c2c520a0",
"Amount": 5,
"Comment": "this is comments",
"PaymentId": "2c92c0f8709a185601709e1e99d87762",
"ReasonCode": "Standard Refund",
"RefundInvoicePaymentData": {
"RefundInvoicePayment": []
},
"SourceType": "Payment",
"Type": "Electronic"
},
{"AccountId": "2c92c0f9555cf11d0155761484d2576f",
"Amount": 5,
"Comment": "this is comments",
"PaymentId": "2c92c0f8709a185601709e1e9a38776b",
"ReasonCode": "Standard Refund",
"RefundInvoicePaymentData": {
"RefundInvoicePayment": []
},
"SourceType": "Payment",
"Type": "Electronic"
}
],
"type":"Refund"
}
Batch update customer account gateway
https://community.zuora.com/t5/Billing-Payments/How-to-bulk-update-customer-account-s-payment-gateway/td-p/30173
Create Payment
https://www.zuora.com/developer/api-reference/#operation/Action_POSTcreate
POST https://rest.apisandbox.zuora.com/v1/action/create
{
"objects":
[
{"AccountId":"2c92c0f969051fe301690ac8c2c520a0",
"Amount":10,
"AppliedInvoiceAmount":10,
"AppliedCreditBalanceAmount": 0,
"EffectiveDate":"2018-10-13",
"PaymentMethodId":"2c92c0f9709a26d801709e16d7e40755",
"InvoiceId":"2c92c0996905120701690ae084e22dd4",
"Status":"Processed",
"Type":"Electronic"
},
{"AccountId":"2c92c0f9555cf11d0155761484d2576f",
"Amount":10,
"AppliedInvoiceAmount":10,
"AppliedCreditBalanceAmount": 0,
"EffectiveDate":"2018-10-13",
"PaymentMethodId":"2c92c0f85d3a5d65015d3aba32ff77aa",
"InvoiceId":"2c92c0945e5e74b8015e6f7cc01b1627",
"Status":"Processed",
"Type":"Electronic"
}
],
"type":"Payment"
}
... View more