Transaction: Clone Transaction
See also the Transaction response object.
Cloning a transaction will create a new transaction by copying all the attributes, except amount, of the original transaction. Instead of cloning transactions, a better practice in most cases is to use the Vault to save and reuse payment method or customer information.
- C#
var request = new TransactionCloneRequest
{
Amount = 10.00M,
Options = new TransactionOptionsCloneRequest
{
SubmitForSettlement = true
}
};
Result<Transaction> result = gateway.Transaction.
CloneTransaction("TransactionId", request);
If the transaction can't be found, it will throw a NotFoundException
.