On This Page 
    
                REST API
            
            
            
            
            
          
Establish a Payment Session with a Capture Context
    To establish a payment session, include the API fields you plan to use in that session
			in the body of the request. The system then returns a JSON Web Token (JWT) that includes
			the capture context.
To determine the fields to include in your capture context, determine the personal
			information that you wish to isolate from the payment session.
Capture Context Fields
			When making a session request, by default, any fields you request to be added to the
				capture context are required. However, you can choose to make a field optional by
				setting the 
required
 parameter to false
.For example in the following code snippet, both required and non-required fields are
				included:
"fields" : { "paymentInformation" : { "card" : { "number" : { }, "securityCode" : { "required" : true }, "expirationMonth" : { "number" : { "required" : false }, "expirationYear" : { "required" : false } } } } }
The 
paymentInformation.card.number
 and
					paymentInformation.card.securityCode
 fields are required. The
					paymentInformation.card.expirationMonth
 and
					paymentInformation.card.expirationYear
 fields are optional.
				Note that in this example, the paymentInformation.card.number
				field is not explicitly set required. By default, included fields are required.Endpoint
			Production:
				GET 
https://api.cybersource.com
/flex/v2/sessionsTest:
				GET 
https://apitest.cybersource.com
/flex/v2/sessions