Server-side Implementation
Availability
This integration for UnionPay has been deprecated, as UnionPay can now be processed as a credit
card through their partnership with Discover. See our
credit card guide for more information.
Creating transactions
You will receive a payment method nonce when your client successfully tokenizes your customer's
payment information. Pass this nonce to your server and create a transaction.
Collect device data
from the client and include the DeviceDataFromTheClient in the
transaction.
- CS
var request = new TransactionRequest {
Amount = 10.00M,
PaymentMethodNonce = nonceFromTheClient,
DeviceData = deviceDataFromTheClient,
Options = new TransactionOptionsRequest {
SubmitForSettlement = true
}
};
Result<transaction> result = gateway.Transaction.Sale(request);
if (result.IsSuccess()) {
// See result.Target for details
} else {
// Handle errors
}
Delayed settlement
If the UnionPay card is not a debit card,
you can choose to submit the transaction for settlement separately. This can be helpful if you have
a delayed order fulfillment process and prefer to wait to settle the transaction until you're ready
to provide your goods or services. For details on this transaction flow, see the
Transaction: Submit For Settlement
reference.