4D Payments SDK 2016 .NET Edition

Questions / Feedback?

RepeatSale Method

Used to submit a recurring transaction.


public void RepeatSale(string PNRef);
Public Sub RepeatSale(ByVal PNRef As String)


The RepeatSale transaction can be used by merchants to enable simplified re-use of cards previously used by a customer, as well as for recurring transactions. By using the Global Transport Gateway's RepeatSale transaction instead of a new Sale transaction, sensitive cardholder data such as the card number and expiration date do not have to be stored locally by the merchant, which reduces the likelihood of that cardholder data being compromised. Because all sensitive cardholder data is stored by Global Payments, the merchant only needs to store PNRef numbers.

Keep in mind that the recurring logic (how often the transactions are processed, the length of contract, etc.) must be managed by the merchant and is not a function of the RepeatSale transaction feature of the Global Transport Gateway. Please note that PNRef numbers and cardholder data are only stored for 24 months from the date of the last activity on the Global Transport Gateway.

In order to perform a RepeatSale transaction, an initial Sale (or Partial Authorization) transaction must occur first. Once the original transaction is processed, the merchant should store the PNRef number that is returned in the transaction response. The merchant should always use the PNRef number of the most recent RepeatSale transaction Response for future re-use or recurring payments. An example is shown below:

  component.UserId = "4dpayments_ecom";
  component.Password = "Passw0rd";  
  component.Card.Number = "4003000123456781";
  component.Card.ExpMonth = 12;
  component.Card.ExpYear = 15;
  component.TransactionAmount = "8.00";
  component.InvoiceNumber = "1234567890";
  String pnref = component.Response.PNRef;

  component.UserId = "4dpayments_ecom";
  component.Password = "Passw0rd";  
  component.TransactionAmount = "8.00";
  component.InvoiceNumber = "1234567890";

Copyright (c) 2021 4D Payments Inc. - All rights reserved.
4D Payments SDK 2016 .NET Edition - Version 16.0 [Build 8017]