updateSession()
Sends a request to store the input from the hosted field into the session.
Usage Copied to clipboard
PaymentSession.updateSession(updateSessionCallback)
Example Copied to clipboard
PaymentSession.updateSession(function (updateSessionResponse) { // handle response });
JSON Example for Session Update Response Copied to clipboard
// status can be one of the following: ok, fields_in_error, system_error, request_timeout // An error response (fields_in_error) { "status": "fields_in_error", "session": { "id": "SESSION000218450948092491657986" }, "errors": { "cardNumber": "invalid", "securityCode": "invalid" }, version: "36" } // An error response (system_error) { "status": "system_error", "session": { "id": "SESSION000218450948092491657986" }, "errors": { "message": "System error message." }, "version": "36" } // An error response (request_timeout) { "status" : "request_timeout", "session": { "id": "SESSION000218450948092491657986" }, "errors": { "message": "Request timeout error message." }, "version": "36" } // An ok response { "status":"ok", "merchant": "TESTMERCHANT", "session": { "id": "SESSION000218450948092491657986" "updateStatus":"SUCCESS", "version":"e3f144ce02" }, "sourceOfFunds": { "provided": { "card": { "brand": "MASTERCARD", "expiry": { "month": "1", "year": "39" }, "fundingMethod": "DEBIT", "nameOnCard": "John Smith", "number": "512345xxxxxx8769", "scheme": "MASTERCARD" } }, "type": "CARD" }, "version": "36" }
Arguments Copied to clipboard
The function to handle the response from PaymentSession.updateSession( ) call. Defined as updateSessionCallback = function(updateSessionResponse).
The overall status of the PaymentSession.updateSession( ) request. Possible values are:
ok
fields_in_error
system_error
request_timeout
The version of the API used to retrieve the session details.
The errors object returned if the PaymentSession.updateSession( ) request failed to update the session successfully.
Indicates the name of the field that failed validation, returned only if the response status is fields_in_error.
Cause of the error. Possible values are:
missing
invalid
Example Copied to clipboard
// An error response (fields_in_error) "errors": { "cardNumber": "invalid", "securityCode": "invalid" },
The error message returned if the response status is system_error or request_timeout.
Example Copied to clipboard
// An error response (request_timeout) "errors": { "message": "Request timeout error message." }, // An error response (system_error) "errors": { "message": "System error message." },
Information on 3DSecure fields.
The Electronic Commerce Indicator returned by the card issuer in the authentication response message.
A collection of parameters required to build the HTML form that is redirected to the ACS.
1. Simple: submit the form generated by the gateway. In this case, only the htmlBodyContent parameter is required.
2. Customized: for those merchants who wish to customise the submission. In this case, the acsURL and paReq parameters will be required to formulate the submission.
Note: This field will only be returned in the event of a successful directory server lookup.
Indicates the option (Simple or Customized) used to generate the page that redirects the cardholder to the card Issuer's Access Control Server (ACS) for authentication.
CUSTOMIZED
A strategy to indicate that the user wishes to customize the responseSIMPLE
A simple interaction model where the response is complete and no user intervention is required.The URL to which you want to redirect the payer after completing the payer authentication process.
The details required by the system to generate the HTML page as specified in the Simple option.
The encoding required for the HTML returned in the response, through htmlBodyContent parameter.
ASCII
ISO_8859_1
Latin1UTF_8
Background color of the page, encoded in HEX, rendered in the cardholder's browser while the browser is waiting for the authentication to commence.
Text on the button that the cardholder can use to redirect the browser to the card Issuer's Access Control Server (ACS) if JavaScript is disabled for their browser.
Title of the page rendered in the cardholder's browser while the browser is waiting for the authentication to commence.
Indicates if the cardholder verification was successful.
The PARes message is the response received from the card Issuer's Access Control Server (ACS) after the cardholder has completed the authentication process.
AUTHENTICATION_ATTEMPTED
Authentication was attempted but the card issuer did not perform the authentication.AUTHENTICATION_NOT_AVAILABLE
An internal error occurred and Authentication is not currently available.AUTHENTICATION_SUCCESSFUL
The cardholder was successfully authenticated.The base64 encoded value generated by the card issuer.
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.
Indicates if the cardholder is enrolled for 3-D Secure authentication.
ENROLLED
The card is enrolled for 3DS authentication.ENROLLMENT_STATUS_UNDETERMINED
The Issuer's ACS was unable to process the request to check enrollment or the card is ineligible.NOT_ENROLLED
The card is not enrolled for 3DS authentication.An optional field that the merchant may supply in the Transaction Request as a description of the transaction.
A unique transaction identifier generated by the Payment Gateway on behalf of the merchant to identify the 3DS transaction.
A unique identifier supplied by the merchant for the authentication.
Airline industry specific data.
The record locator used to access a specific Passenger Name Record (PNR).
The type of charge associated with the transaction.
ADDITIONAL_COLLECTION
Additional CollectionAGENCY_EXCHANGE_ORDER
Agency Exchange OrderAGENCY_GROUP_TICKET
Agency Group TicketAGENCY_MISCELLANEOUS_CHARGE_ORDER
Agency Misc. Charge Order (MCO)AGENCY_PASSENGER_TICKET
Agency Passenger TicketAGENCY_TOUR_ORDER_OR_VOUCHER
Agency Tour Order/VoucherAIR_FREIGHT
SPD/Air FreightANIMAL_TRANSPORTATION_CHARGE
Animal Transportation ChargeCATALOGUE_MERCHANDISE_ORDERED
Catalogue Merchandise OrderedCLUB_MEMBERSHIP_FEE
Club Membership FeeCOUPON_BOOK
Coupon BookCREDIT_CLASS_SERVICE_ADJUSTMENT
Credit Class of Service AdjustmentCREDIT_DENIED_BOARDING
Credit Denied BoardingCREDIT_EXCHANGE_REFUND
Credit Exchange RefundCREDIT_LOST_TICKET_REFUND
Credit Lost Ticket RefundCREDIT_MISCELLANEOUS_REFUND
Credit Misc. RefundCREDIT_MULTIPLE_UNUSED_TICKETS
Credit Multiple Unused TicketsCREDIT_OVERCHARGE_ADJUSTMENT
Credit Overcharge AdjustmentCREDIT_UNUSED_TRANSPORTATION
Credit Unused TransportationDEBT_ADJUSTMENT_DUPLICATE_REFUND_OR_USE
Debt Adjustment Duplicate Refund/UseDUTY_FREE_SALE
Duty Free SaleEXCESS_BAGGAGE
Excess BaggageEXCHANGE_ADJUSTMENT
Exchange AdjustmentEXCHANGE_ORDER
Exchange OrderFIREARMS_CASE
Firearms CaseFREQUENT_FLYER_FEE_OR_PURCHASE
Frequent Flyer Fee/PurchaseFREQUENT_FLYER_FULFILLMENT
Frequent Flyer FulfillmentFREQUENT_FLYER_OVERNIGHT_DELIVERY_CHARGE
Frequent Flyer Overnight Delivery ChargeGROUP_TICKET
Group TicketIN_FLIGHT_ADJUSTMENT
In-flight AdjustmentIN_FLIGHT_CHARGES
In-flight ChargesIN_FLIGHT_DUTY_FREE_PURCHASE
In-flight Duty Free PurchaseIN_FLIGHT_MERCHANDISE_ORDERED
In-flight Merchandise OrderedIN_FLIGHT_PHONE_CHARGES
In-flight Phone ChargesKENNEL_CHARGE
Kennel ChargeLOST_TICKET_APPLICATION
Lost Ticket ApplicationMISCELLANEOUS_CHARGE_ORDER_OR_PREPAID_TICKET_ADVICE
Misc. Charge Order (MCO) / Prepaid Ticket Auth.MISCELLANEOUS_TAXES_FEES
Miscellaneous Tax(es) Fee(s)PASSENGER_TICKET
Passenger TicketSELF_SERVICE_TICKETS
Self-Service Ticket(s)SENIOR_CITIZEN_DISCOUNT_BOOKLETS
Senior Citizen Discount BookletsSMALL_PACKAGE_DELIVERY
Small Package DeliverySPECIAL_SERVICE_TICKET
Special Service TicketSUPPORTED_REFUND
Supported RefundTICKET_BY_MAIL
Ticket by MailTOUR_DEPOSIT
Tour DepositTOUR_ORDER_VOUCHER
Tour Order VoucherUNDERCHARGE_ADJUSTMENT
Undercharge AdjustmentUNSUPPORTED_REFUND
Unsupported RefundUPGRADE_CHARGE
Upgrade ChargeVENDOR_REFUND_CREDIT
Vendor Refund CreditVENDOR_SALE
Vendor SaleItinerary details
Travel leg details.
The 2-character IATA airline code or 3 digit accounting code or both of the airline carrier for the trip leg.
The ticket containing the coupon for this leg for an itinerary with more than four trip legs.
The coupon number on the ticket for the trip leg.
The 3 character IATA airport code of the departure airport for the trip leg.
Date of departure for the trip leg.
Tax payable on departure for the trip leg.
Departure time in local time for the departure airport for this trip leg.
The 3 character IATA airport code for the destination airport for the trip leg.
Arrival time in local time for the destination airport for this trip leg.
Restrictions (e.g. non-refundable) or endorsements applicable to the trip leg.
New ticket number issued when a ticket is exchanged for the trip leg.
Total fare payable for the trip leg.
Code defining the rules forming the basis of the fare (type of fare, class entitlement, etc.)
Total fees payable for the trip leg.
The flight number for the trip leg.
Indicates if a stopover is permitted for the trip leg.
Total taxes payable for the trip leg.
The industry code indicating the class of service (e.g. Business, Coach) for the leg.
Number of passengers associated with this booking.
The 3 character ISO 3166-1 alpha-3 country code of the country of origin for the itinerary.
Passenger details
First name of the passenger to whom the ticket is being issued.
Last name of the passenger to whom the ticket is being issued.
Middle name of the passenger to whom the ticket is being issued.
Passenger specific information recorded on the ticket.
Title of the passenger to whom the ticket is being issued.
Plan number supplied by the airline for this booking.
Ticket details
Indicates if a conjunction ticket with additional coupons was issued.
Information supplied by the customer.
Indicates if an electronic ticket was issued.
The original ticket number when this is a transaction for an exchanged ticket.
Ticket issue information.
The address where the ticket was issued.
The 2-character IATA airline code or 3 digit accounting code or both of the airline carrier issuing the ticket.
Name of airline carrier issuing the ticket.
The city/town where the ticket was issued.
The 3 character ISO 3166-1 alpha-3 country code of the country where the ticket was issued.
The date the ticket was issued.
Industry code of the travel agent issuing the ticket.
Name of the travel agent issuing the ticket.
Indicates if the issued ticket is refundable.
The airline ticket number associated with the transaction.
Total fare for all trip legs on the ticket.
Total fee for all trip legs on the ticket.
Total taxes for all trip legs on the ticket.
The type of transaction performed against this airline booking.
EXCHANGE_TICKET
Exchange TicketMISCELLANEOUS_CHARGE
Miscellaneous ChargeTICKET_PURCHASE
Ticket PurchaseTOUR_ORDER
Tour OrderDetails of the payer's billing address.
The payer's billing address.
The city portion of the address.
The name of the company associated with this address.
The 3 letter ISO standard alpha country code of the address.
The post code or zip code of the address.
The state or province of the address.
The first line of the address.
The second line of the address (if provided).
The strategy that should be used to verify the card details on the request.
ACQUIRER
Verifies that the card is valid by performing an Authorize transaction for an nominal amount (e.g.$1.00)BASIC
Verifies the card number is valid and that the card number falls within a valid BIN rangeNONE
No verification of the card details are performedInformation about any constraints that apply to this transaction.
Information about the payment plan constraints which apply for this transaction.
The allowable number of deferral months for the payment plan.
The allowable number of installments for the payment plan.
The identifiers for the payment plans supported for this transaction.
See Payment Plans for the supported payment plans and their identifiers.
A transient identifier for the request, that can be used to match the response to the request.
Information specific to the use of dynamic currency conversion (DCC).
A unique identifier for your DCC quote request.
Indicates how DCC applies to the order.
ACCEPTED
The payer accepted the DCC offer presented to him and will pay in his own currency. The conditions of the quote, as returned in the Retrieve Payment Options response, will be applied in the processing of this transaction.DECLINED
The payer declined the DCC offer presented to him and will pay in your transaction currency.NOT_AVAILABLE
A rate quote was requested but no DCC offer was provided (currencyConversion.gatewayCode value other than QUOTE_PROVIDED returned in the Retrieve Payment Options response).NOT_REQUIRED
DCC not required for this transaction.Information associated with the customer's source of transaction.
The email address of the customer.
The payer's first name.
The payer's last or surname.
The contact person's mobile phone or cell phone number.
The phone number of the person to whom the order is being billed.
Information associated with the device's source of transaction.
The telephone number captured by ANI (Automatic Number Identification) when the customer calls to place the order.
The 2 digit ANI information identifier provided by the telephone company to indicate the call type, for example, cellular (61-63), toll free (24,25), etc.
The User-Agent header of the browser the customer used to place the order.
Information collected about a remote computing device for the purpose of providing a unique identifier for the device.
The name of the server to which the customer is connected.
The IP address of the computer used by the customer, in nnn.nnn.nnn.nnn format.
The unique identifier issued to you by your payment provider.
Information about the order associated with this transaction.
Indicates whether you will accept a payment less than order.amount, e.g. when using a gift card.
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.
The total amount for the order.
The currency of the order expressed as an ISO 4217 alpha code, e.g. USD.
Information about this order that is of interest to you.
A note from the payer about this order.
The date the payer placed the order.
The payer's own reference for the order (for example, the purchase order number).
Short textual description of the contents of the order.
Information about a price reduction you have applied to the order.
The total amount of the discount you have applied to the order.
The code you use to identify the reason for the discount.
A description of your reason for the discount.
A unique identifier for this order to distinguish it from any other order you create.
The URL to which the gateway will send Webhook notifications when an order is created or updated.
Unique SKU (Stock Keeping Unit) for the single, most expensive product associated with this order.
Your reference to the contract or agreement you have with the payer to process recurring payments.
The identifier of the order.
The name of the person who requested the goods or services.
The total shipping and handling amount for the order.
The total tax amount for the order.
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.
Your tax registration identifier provided by the tax authority (for example, federal tax identification number, ABN).
The wallet indicator as returned by the wallet provider.
Select the wallet provider for this interaction.
MASTERPASS_ONLINE
MasterPass Online wallet provider.VISA_CHECKOUT
Visa Checkout wallet provider.If, when integrating with the gateway, you are using a solution (e.g. a shopping cart or e-commerce solution) provided, supported or certified by your payment service provider, enter the solution ID issued by your payment service provider here.
Information about the payment plan selected by the cardholder.
The number of months for which the payment is deferred.
The number of monthly payments payable by the cardholder.
The identifier for the payment plan.
The payment method the payer wishes to use to pay for this order.
ACH
BANCANET
CREDIT
GIROPAY
PAYPAL
SOFORT
Container for fields that control the response returned for the request.
Indicates how sensitive data is returned in the response.
Information relevant to risk assessment.
The risk rules you wish to bypass when performing risk assessment for an order.
ALL
Additional data passed to third-party risk assessment providers.
Field: risk.custom.headOfficeLocation
Value: London UK
Session Information
The identifier of the session
A summary of the outcome of the last attempt to modify the session.
FAILURE
The last attempt to place data into the session was unsuccessful. The session may contain invalid data. A request operation using this session will be rejected by the payment gateway.NO_UPDATE
No attempt has been made to place data into the session. A request operation using this session will be rejected by the payment gateway.SUCCESS
The last attempt to update the session was successful. You may submit a request operation using this session.Use this field to implement optimistic locking of the session content.
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.
See Making Business Decisions Based on Session Content.
Information on the shipping address including the contact details of the addressee.
The address to which the goods contained in this order are being shipped.
The city portion of the address.
The name of the company associated with this address.
The 3 letter ISO standard alpha country code of the address.
The post code or zip code of the address.
The state or province of the address.
The first line of the address.
The second line of the address (if provided).
Details of the contact person at the address the goods will be shipped to.
The contact person's email address.
The first name of the person to whom the order is being shipped.
The last name or surname of the person to whom the order is being shipped.
The contact person's mobile phone or cell phone number.
The phone number of the person to whom the order is being shipped.
The shipping method code to indicate the time frame and the priority of the order.
ELECTRONIC
Electronic delivery.GROUND
Ground (4 or more days).OVERNIGHT
Overnight (next day).PRIORITY
Priority (2-3 days).SAME_DAY
Same day.The details describing the source of the funds to be used.
Information about the source of funds when it is directly provided (as opposed to via a token or session).
For ACH payments (sourceOfFunds.type=ACH) you must provide values for all fields within this parameter group, including details about the payers bank account as well as the type of ACH payment.
An indicator identifying the type of bank account.
- 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).
CONSUMER_CHECKING
Consumer Checking AccountCONSUMER_SAVINGS
Consumer Savings AccountCORPORATE_CHECKING
Business Checking AccountThe name of the bank account holder, as it appears on the account at the receiving financial institution.
The identifier of the bank account at the receiving financial institution.
The identifier of the receiving financial institution.
- Routing number,
- Transit number, or
- ABA number
Retrieve this information from the payer.
See also http://en.wikipedia.org/wiki/Routing_transit_number.
Identifies the Standard Entry Class (SEC) code to be sent to the issuer.
PPD
An ACH debit or credit payment (B2C) that has been authorized by an authenticated customer in written form (signed or similarly authenticated). PPD is used for pre-arranged payments (e.g. employee payroll, mortgage payments, expense reimbursement).TEL
An ACH debit payment (B2C) that has been authorized by an authenticated customer via phone.
TEL may only be used if a relationship already exists between you and the consumer, or, the consumer initiates the contact with you.
WEB
An ACH debit payment (B2C) that has been authorized by an authenticated customer via the internet or a wireless network.Details as shown on the card.
Expiry date, as shown on the card.
Month, as shown on the card.
Year, as shown on the card.
The cardholder's name as printed on the card.
Credit card number as printed on the card.
The first 6 digits of the card number up to a maximum of 9 digits, as printed on the card.
Card verification code, as printed on the back or front of the card.
The card sequence number for transactions where the data is read through a chip on the EMV card.
If the payer chose to pay using a gift card, you must submit sourceOfFunds.type=GIFT_CARD and provide the payer's gift card details in this parameter group.
Do not provide this field in your request unless instructed to do so by your payment service provider.
Card number as printed or embossed on the gift card.
PIN number for the gift card.
Uniquely identifies a card and associated details.
The payment method your payer has chosen for this payment.
ACH
The payer chose to pay using an electronic fund transfer, to be processed via the Automated Clearing House (ACH) Network. You must provide the payer's bank account details and information about the type of ACH payment under the sourceOfFunds.provided.ach parameter group.CARD
The payer selected to pay using a credit or debit card. The payer's card details must be provided.GIFT_CARD
The payer chose to pay using gift card. The payer's gift card details must be provided under the sourceOfFunds.provided.giftCard parameter group.Uniquely identifies a card and associated details.
Information about this transaction.
Additional information to be passed to acquirer.
Additional information requested by the acquirer which cannot be passed using other available data fields.
Transaction Amount.
Value generated by the issuing bank in response to a proposal to transfer funds.
Set this flag if the transaction is a manual cash disbursement transaction, i.e. cash is disbursed upon the acceptance of a card by a financial institution teller.
The currency which should be used for acquirer card verification.
Indicates the frequency of the transaction offered to the payer.
INSTALLMENT
Indicates an installment transaction where the payer authorizes you to deduct multiple payments over an agreed period of time for a single purchase.RECURRING
Indicates a recurring transaction where the payer authorizes you to automatically debit their accounts for bill or invoice payments.SINGLE
Indicates a single transaction where a single payment is used to complete the order.Unique identifier for this transaction to distinguish it from any other transactions on the order.
Information about the items the payer purchases with the order.
The brand of the item.
The category of the item.
Description for the item with information such as size, color, etc.
A short name describing the item.
The quantity of the item.
The SKU (Stock Keeping Unit) or the item identifier for this item.
The cost price for the item.
The tax amount for the item.
Your note about this transaction.
Indicates that a transaction requires approval to proceed with the order.
REQUESTED
RequestedAn optional identifier for this transaction.
Indicates the source through which you received the transaction.
CALL_CENTRE
Transaction conducted via a call centre.CARD_PRESENT
Transaction where the card is presented to the merchant.INTERNET
Transaction conducted over the Internet.MAIL_ORDER
Transaction received by mail.MOTO
Transaction received by mail or telephone.TELEPHONE_ORDER
Transaction received by telephone.VOICE_RESPONSE
Transaction conducted by a voice/DTMF recognition system.The identifier for the transaction you wish to refund.
If you do not provide a target transaction ID the gateway will try to identify a transaction. If no transaction can be found or more than one transaction is identified, the request is rejected.
The amount of tax included in this transaction, if different to the default value.
The source through which the order has been received.
CALL_CENTRE
Transaction conducted via a call centre.CARD_PRESENT
Transaction where the card is presented to the merchant.INTERNET
Transaction conducted over the Internet.MAIL_ORDER
Transaction received by mail.MOTO
Transaction received by mail or telephone.TELEPHONE_ORDER
Transaction received by telephone.VOICE_RESPONSE
Transaction conducted by a voice/DTMF recognition system.The person who initiated this transaction.
The URL to which you want the payer's browser to be redirected if the payer cancels the interaction on the wallet provider's website.
The URL to which you want the payer's browser to be redirected after completing the interaction on the wallet provider's website.
Provide the value of the field callId as returned by the Visa Checkout lightbox.
Return Value Copied to clipboard
None