James Lappin edited this page Aug 21, 2017 · 3 revisions

Create an intent for the Payment Activity with the required extras (the details in the following snippet are dummy data – use the data for your account instead):

A collection can only be performed on a successful pre-authorization. You will need the receiptId contained in the response from the pre-authorization.

var collectionModel = new CollectionModel()
    //the receipt of the original pre-authorization
    ReceiptId = receipt1.ReceiptId,

    // the amount to be collected
    Amount = 1.01m,

var response = await client.Collections.Create(collectionModel);
if (response.HasError)
    // Your error handling should go here.
    // You can see more detailed about the error by looking at response.Error

var receipt = response.Response as PaymentReceiptModel;
if (receipt != null)
    // Deal with a successful payment.
    Console.WriteLine("Payment successful. Transaction Reference {0}", receipt.ReceiptId);
You can’t perform that action at this time.
You signed in with another tab or window. Reload to refresh your session. You signed out in another tab or window. Reload to refresh your session.
Press h to open a hovercard with more details.