Pay
A single transaction to authorise the payment and transfer funds from the payer's account to your account.
For card payments, Pay is a mode where the Authorize and Capture operations are completed at the same time. Pay is the most common type of payment model used by merchants to accept card payments. The Pay model is used when the merchant is allowed to bill the cardholder's account immediately, for example when providing services or goods on the spot.
URL | https://secure.uat.tnspayments.com/api/rest/version/30/merchant/{merchantId}/order/{orderid}/transaction/{transactionid} |
HTTP Method | PUT |
Authentication |
This operation requires authentication via one of the following methods:
|
Request Parameters
apiOperation String =PAY FIXED
order = COMPULSORY
order.amount Decimal = COMPULSORY
order.currency Upper case alphabetic text = COMPULSORY
session.id ASCII Text = OPTIONAL
sourceOfFunds = COMPULSORY
For card payments the source of funds information may be represented by combining one or more of the following: explicitly provided card details, a session identifier which the gateway will use to look up the card details and/or a card token. Precedence rules will be applied in that explicitly provided card details will override session card details which will override card token details. Each of these may represent partial card details, however the combination must result in a full and complete set of card details. See Using Multiple Sources of Card Details for examples.
sourceOfFunds.token Alphanumeric = OPTIONAL
3DSecure = OPTIONAL
3DSecure.acsEci Digits = OPTIONAL
3DSecure.authenticationStatus Enumeration = OPTIONAL
The PARes message is the response received from the card Issuer's Access Control Server (ACS) after the cardholder has completed the authentication process.
3DSecure.authenticationToken Base64 = OPTIONAL
This field corresponds to the Cardholder Authentication Verification Value (CAVV) for Visa, the Accountholder Authentication Value (AAV) for MasterCard and JCB, or the American Express Verification Value (AEVV) for American Express.
3DSecure.enrollmentStatus Enumeration = COMPULSORY
3DSecure.xid Base64 = OPTIONAL
3DSecureId ASCII Text = OPTIONAL
It is not used when the authentication is performed externally.
airline = OPTIONAL
airline.bookingReference Alphanumeric = OPTIONAL
airline.documentType Enumeration = OPTIONAL
airline.itinerary = OPTIONAL
airline.itinerary.leg[n] = OPTIONAL
airline.itinerary.leg[n].carrierCode Regex = OPTIONAL
airline.itinerary.leg[n].conjunctionTicketNumber Alphanumeric = OPTIONAL
airline.itinerary.leg[n].couponNumber Alphanumeric = OPTIONAL
airline.itinerary.leg[n].departureAirport Upper case alphabetic text = OPTIONAL
airline.itinerary.leg[n].departureDate Date = OPTIONAL
airline.itinerary.leg[n].departureTax Decimal = OPTIONAL
airline.itinerary.leg[n].departureTime Time = OPTIONAL
airline.itinerary.leg[n].destinationAirport Upper case alphabetic text = OPTIONAL
airline.itinerary.leg[n].destinationArrivalDate Date = OPTIONAL
airline.itinerary.leg[n].destinationArrivalTime Time = OPTIONAL
airline.itinerary.leg[n].endorsementsRestrictions Alphanumeric = OPTIONAL
airline.itinerary.leg[n].exchangeTicketNumber Alphanumeric = OPTIONAL
airline.itinerary.leg[n].fare Decimal = OPTIONAL
airline.itinerary.leg[n].fareBasis Alphanumeric = OPTIONAL
airline.itinerary.leg[n].fees Decimal = OPTIONAL
airline.itinerary.leg[n].flightNumber Alphanumeric = OPTIONAL
airline.itinerary.leg[n].stopoverPermitted Boolean = OPTIONAL
airline.itinerary.leg[n].taxes Decimal = OPTIONAL
airline.itinerary.leg[n].travelClass Alphanumeric = OPTIONAL
airline.itinerary.numberInParty Digits = OPTIONAL
airline.itinerary.originCountry Upper case alphabetic text = OPTIONAL
airline.passenger[n] = OPTIONAL
airline.passenger[n].firstName String = OPTIONAL
airline.passenger[n].frequentFlyerNumber Digits = OPTIONAL
airline.passenger[n].lastName String = OPTIONAL
airline.passenger[n].middleName String = OPTIONAL
airline.passenger[n].specificInformation Alphanumeric = OPTIONAL
airline.passenger[n].title String = OPTIONAL
airline.planNumber Alphanumeric = OPTIONAL
airline.ticket = OPTIONAL
airline.ticket.conjunctionTicketIndicator Boolean = OPTIONAL
airline.ticket.eTicket Boolean = OPTIONAL
airline.ticket.exchangedTicketNumber Alphanumeric = OPTIONAL
airline.ticket.issue = OPTIONAL
airline.ticket.issue.address String = OPTIONAL
airline.ticket.issue.carrierCode Regex = OPTIONAL
airline.ticket.issue.carrierName Alphanumeric = OPTIONAL
airline.ticket.issue.city Alphanumeric = OPTIONAL
airline.ticket.issue.country Upper case alphabetic text = OPTIONAL
airline.ticket.issue.date Date = OPTIONAL
airline.ticket.issue.travelAgentCode Alphanumeric = OPTIONAL
airline.ticket.issue.travelAgentName Alphanumeric = OPTIONAL
airline.ticket.restricted Boolean = OPTIONAL
airline.ticket.ticketNumber Alphanumeric = OPTIONAL
airline.ticket.totalFare Decimal = OPTIONAL
airline.ticket.totalFees Decimal = OPTIONAL
airline.ticket.totalTaxes Decimal = OPTIONAL
airline.transactionType Enumeration = OPTIONAL
apiOperation String =PAY FIXED
billing = OPTIONAL
billing.address = OPTIONAL
billing.address.city String = OPTIONAL
billing.address.company String = OPTIONAL
billing.address.country Upper case alphabetic text = OPTIONAL
billing.address.postcodeZip Alphanumeric + additional characters = OPTIONAL
billing.address.stateProvince String = OPTIONAL
billing.address.street String = OPTIONAL
billing.address.street2 String = OPTIONAL
constraints = OPTIONAL
constraints.paymentPlans = OPTIONAL
constraints.paymentPlans.numberOfDeferrals Integer = OPTIONAL
constraints.paymentPlans.numberOfPayments Integer = OPTIONAL
constraints.paymentPlans.supported[n] String = OPTIONAL
See Payment Plans for the supported payment plans and their identifiers.
correlationId String = OPTIONAL
currencyConversion = OPTIONAL
You can only provide DCC information on the initial transaction for an order. If provided on subsequent transactions or an order, DCC information will be ignored.
currencyConversion.exchangeRateTime DateTime = OPTIONAL
currencyConversion.marginPercentage Decimal = OPTIONAL
currencyConversion.payerAmount Decimal = OPTIONAL
currencyConversion.payerCurrency Upper case alphabetic text = OPTIONAL
currencyConversion.payerExchangeRate Decimal = OPTIONAL
currencyConversion.provider Enumeration = OPTIONAL
currencyConversion.providerReceipt String = OPTIONAL
currencyConversion.requestId String = OPTIONAL
currencyConversion.uptake Enumeration = OPTIONAL
customer = OPTIONAL
customer.email Email = OPTIONAL
customer.firstName String = OPTIONAL
customer.lastName String = OPTIONAL
customer.mobilePhone String = OPTIONAL
customer.phone String = OPTIONAL
device = OPTIONAL
device.ani String = OPTIONAL
device.aniCallType String = OPTIONAL
device.browser String = OPTIONAL
device.fingerprint String = OPTIONAL
device.hostname String = OPTIONAL
device.ipAddress String = OPTIONAL
order = COMPULSORY
order.acceptPartialAmount Boolean = OPTIONAL
Unless you have been advised by your payment service provider that the gateway supports partial approvals for your acquirer, you can ignore this field.
If the gateway supports partial approvals for your acquirer you must set this field to TRUE else the transaction is rejected by the gateway.
order.amount Decimal = COMPULSORY
order.currency Upper case alphabetic text = COMPULSORY
order.custom String = OPTIONAL
order.customerNote String = OPTIONAL
order.customerOrderDate Date = OPTIONAL
order.customerReference ASCII Text = OPTIONAL
order.description String = OPTIONAL
order.discount = OPTIONAL
order.discount.amount Decimal = OPTIONAL
order.discount.code String = OPTIONAL
order.discount.description String = OPTIONAL
order.notificationUrl Url = OPTIONAL
order.productSKU String = OPTIONAL
order.recurringPaymentAgreement Alphanumeric = OPTIONAL
order.reference String = OPTIONAL
order.requestorName String = OPTIONAL
order.shippingAndHandlingAmount Decimal = OPTIONAL
order.tax[n] = OPTIONAL
order.tax[n].amount Decimal = OPTIONAL
order.tax[n].type String = OPTIONAL
order.taxAmount Decimal = OPTIONAL
If you provide both this value and line item data, then the order.taxAmount MUST equal the total tax amount.
This data may be used to qualify for better interchange rates on corporate purchase card transactions.
order.taxRegistrationId String = OPTIONAL
order.walletIndicator String = OPTIONAL
order.walletProvider Enumeration = OPTIONAL
partnerSolutionId String = OPTIONAL
paymentPlan = OPTIONAL
paymentPlan.numberOfDeferrals Digits = OPTIONAL
paymentPlan.numberOfPayments Digits = COMPULSORY
paymentPlan.planId String = COMPULSORY
posTerminal = OPTIONAL
posTerminal.attended Enumeration = OPTIONAL
posTerminal.cardholderActivated Enumeration = OPTIONAL
posTerminal.entryMode Digits = OPTIONAL
PAN ENTRY Mode
01 - Manual Entry
02 - Magnetic stripe read, but full unaltered contents not provided
04 - OCR/MICR coding read
05 - PAN auto entry via chip
07 - Auto-entry via contactless magnetic chip
79 - Chip card at chip-capable terminal was unable to process transaction using data on the chip or magnetic stripe on the card-therefore, PAN entry via manual entry
80 - Chip card at chip-capable terminal was unable to process transaction using data on the chip therefore; the terminal defaulted to the magnetic stripe read for the PAN. This is referred to as fallback.
90 - Magnetic stripe read and full, unaltered contents provided
91 - Auto-entry via contactless magnetic strip
PIN Entry Mode
0 - Unspecified or unknown
1 - Terminal has PIN entry capability
2 - Terminal does not have PIN entry capability (default)
8 - Terminal has PIN entry capability but PIN pad is not currently operative
posTerminal.inputCapability Enumeration = OPTIONAL
posTerminal.location Enumeration = OPTIONAL
posTerminal.name String = COMPULSORY
responseControls = OPTIONAL
responseControls.sensitiveData String = OPTIONAL
risk = OPTIONAL
risk.bypassMerchantRiskRules Enumeration = OPTIONAL
risk.custom String = OPTIONAL
Field: risk.custom.headOfficeLocation
Value: London UK
session.id ASCII Text = OPTIONAL
session.version ASCII Text = OPTIONAL
To use optimistic locking, record session.version when you make your decisions, and then pass that value in session.version when you submit your request operation to the gateway.
If session.version provided by you does not match that stored against the session, the gateway will reject the operation with error.cause=INVALID_REQUEST.
See Making Business Decisions Based on Session Content.
shipping = OPTIONAL
shipping.address = OPTIONAL
shipping.address.city String = OPTIONAL
shipping.address.company String = OPTIONAL
shipping.address.country Upper case alphabetic text = OPTIONAL
shipping.address.postcodeZip Alphanumeric + additional characters = OPTIONAL
shipping.address.stateProvince String = OPTIONAL
shipping.address.street String = OPTIONAL
shipping.address.street2 String = OPTIONAL
shipping.contact = OPTIONAL
shipping.contact.email Email = OPTIONAL
shipping.contact.firstName String = OPTIONAL
shipping.contact.lastName String = OPTIONAL
shipping.contact.mobilePhone String = OPTIONAL
shipping.contact.phone String = OPTIONAL
shipping.method Enumeration = OPTIONAL
sourceOfFunds = COMPULSORY
For card payments the source of funds information may be represented by combining one or more of the following: explicitly provided card details, a session identifier which the gateway will use to look up the card details and/or a card token. Precedence rules will be applied in that explicitly provided card details will override session card details which will override card token details. Each of these may represent partial card details, however the combination must result in a full and complete set of card details. See Using Multiple Sources of Card Details for examples.
sourceOfFunds.provided = OPTIONAL
sourceOfFunds.provided.ach = OPTIONAL
sourceOfFunds.provided.ach.accountType Enumeration = OPTIONAL
- Consumer (checking or savings), or
- Business
For pre-arranged payments (sourceOfFunds.provided.ach.secCode=PPD) retrieve this information from the payer.
If payments were telephone-initiated (sourceOfFunds.provided.ach.secCode=TEL) or internet-initiated (sourceOfFunds.provided.ach.secCode=WEB) you may choose to limit the payer's options (e.g. only support consumer checking accounts), depending on your type of business (e.g. B2C online webshop).
sourceOfFunds.provided.ach.bankAccountHolder String = OPTIONAL
sourceOfFunds.provided.ach.bankAccountNumber Alphanumeric + additional characters = OPTIONAL
sourceOfFunds.provided.ach.routingNumber Digits = OPTIONAL
- Routing number,
- Transit number, or
- ABA number
Retrieve this information from the payer.
See also http://en.wikipedia.org/wiki/Routing_transit_number.
sourceOfFunds.provided.ach.secCode Enumeration = OPTIONAL
sourceOfFunds.provided.card = OPTIONAL
sourceOfFunds.provided.card.accountType Enumeration = OPTIONAL
sourceOfFunds.provided.card.expiry = OPTIONAL
sourceOfFunds.provided.card.expiry.month Digits = COMPULSORY
sourceOfFunds.provided.card.expiry.year Digits = COMPULSORY
sourceOfFunds.provided.card.nameOnCard String = OPTIONAL
sourceOfFunds.provided.card.number Digits = OPTIONAL
sourceOfFunds.provided.card.securityCode Digits = OPTIONAL
sourceOfFunds.provided.card.sequenceNumber Digits = OPTIONAL
sourceOfFunds.provided.card.track1 String = OPTIONAL
sourceOfFunds.provided.card.track2 String = OPTIONAL
sourceOfFunds.provided.giftCard = OPTIONAL
sourceOfFunds.provided.giftCard.expectedLocalBrand String = OPTIONAL
sourceOfFunds.provided.giftCard.number Digits = OPTIONAL
sourceOfFunds.provided.giftCard.pin Digits = OPTIONAL
sourceOfFunds.token Alphanumeric = OPTIONAL
sourceOfFunds.type Enumeration = OPTIONAL
transaction = OPTIONAL
transaction.acquirer = OPTIONAL
transaction.acquirer.customData String = OPTIONAL
transaction.cashAdvance Boolean = OPTIONAL
transaction.frequency Enumeration = OPTIONAL
transaction.merchantNote String = OPTIONAL
transaction.reference String = OPTIONAL
transaction.source Enumeration = OPTIONAL
userId String = OPTIONAL
{merchantId} Alphanumeric + additional characters COMPULSORY
{orderid} String COMPULSORY
{transactionid} String COMPULSORY
Response Parameters
browserPayment = CONDITIONAL
browserPayment.redirectUrl Url = CONDITIONAL
merchant Alphanumeric + additional characters = Always Provided
order = Always Provided
order.amount Decimal = Always Provided
order.creationTime DateTime = Always Provided
order.currency Upper case alphabetic text = Always Provided
order.id String = Always Provided
order.totalAuthorizedAmount Decimal = Always Provided
order.totalCapturedAmount Decimal = Always Provided
order.totalRefundedAmount Decimal = Always Provided
response = Always Provided
response.gatewayCode Enumeration = Always Provided
result Enumeration = Always Provided
transaction = Always Provided
transaction.acquirer = Always Provided
transaction.acquirer.id String = Always Provided
transaction.amount Decimal = Always Provided
transaction.currency Upper case alphabetic text = Always Provided
transaction.id String = Always Provided
transaction.type Enumeration = Always Provided
Response parameters are the same as Transaction: Retrieve Transaction