<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: The payments API uses credit card flexible tokens, how do you use them? in cybersource APIs</title>
    <link>https://community.developer.cybersource.com/t5/cybersource-APIs/The-payments-API-uses-credit-card-flexible-tokens-how-do-you-use/m-p/85707#M778</link>
    <description>&lt;P&gt;&lt;SPAN&gt;A credit card flexible token is a secure representation of a customer's credit card information that can be used to process transactions without exposing the actual credit card information. When you use a payments API that supports flexible tokens, you can request a token for a customer's credit card information and then use that token in subsequent transactions&lt;A href="https://thesublimationink.com/best-sublimation-ink/" target="_self"&gt;,&lt;/A&gt; rather than passing the actual credit card information with each transaction.&lt;/SPAN&gt;&lt;/P&gt;</description>
    <pubDate>Tue, 14 Feb 2023 02:21:46 GMT</pubDate>
    <dc:creator>ertgdergtr</dc:creator>
    <dc:date>2023-02-14T02:21:46Z</dc:date>
    <item>
      <title>The payments API uses credit card flexible tokens, how do you use them?</title>
      <link>https://community.developer.cybersource.com/t5/cybersource-APIs/The-payments-API-uses-credit-card-flexible-tokens-how-do-you-use/m-p/85151#M666</link>
      <description>&lt;P&gt;Hello,&lt;/P&gt;&lt;P&gt;I am trying to get my head around how CyberSource works.&lt;/P&gt;&lt;P&gt;A credit card can be tokenized on the client-side in CyberSource using the Secure Acceptance Flexible Token API.&lt;/P&gt;&lt;P&gt;It's easy to do that part. There's plenty of documentation and a few packages that do it.&lt;/P&gt;&lt;P&gt;With the CyberSource Payments API, how do I use that token to create a charge?&lt;/P&gt;&lt;P&gt;My research shows how to tokenize the card on client, and charge an untokenized card (card data is sent to server), but I haven't found any examples of how to use the Flexible token to create a charge (or pre-authorization).&lt;/P&gt;&lt;P&gt;CyberSource doesn't seem to provide that information in its documentation&lt;A href="https://www.printersjet.com/" target="_self"&gt;,&lt;/A&gt; unlike most other gateways like Stripe.&lt;/P&gt;&lt;P&gt;Is there something I'm missing?&lt;/P&gt;&lt;P&gt;Node is my preferred language, but I am happy with solutions in other languages as well.&lt;/P&gt;</description>
      <pubDate>Sun, 04 Dec 2022 12:49:40 GMT</pubDate>
      <guid>https://community.developer.cybersource.com/t5/cybersource-APIs/The-payments-API-uses-credit-card-flexible-tokens-how-do-you-use/m-p/85151#M666</guid>
      <dc:creator>villerblendy</dc:creator>
      <dc:date>2022-12-04T12:49:40Z</dc:date>
    </item>
    <item>
      <title>Re: The payments API uses credit card flexible tokens, how do you use them?</title>
      <link>https://community.developer.cybersource.com/t5/cybersource-APIs/The-payments-API-uses-credit-card-flexible-tokens-how-do-you-use/m-p/85165#M672</link>
      <description>&lt;P&gt;The answer is in this page&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;A href="https://developer.cybersource.com/api/developer-guides/dita-flex/SAFlexibleToken/FlexMicroform/GetStarted.html" target="_blank" rel="nofollow noopener noreferrer"&gt;https://developer.cybersource.com/api/developer-guides/dita-flex/SAFlexibleToken/FlexMicroform/GetStarted.html&lt;/A&gt;&lt;SPAN&gt;&amp;nbsp;&lt;A href="https://omegle.ws" target="_blank" rel="noopener"&gt;/ome&lt;/A&gt;&lt;A href="https://omegle.club" target="_blank" rel="noopener"&gt;gle&lt;/A&gt;&amp;nbsp;&lt;/SPAN&gt;under "Using the Token".&lt;/P&gt;&lt;P&gt;Note: Some of the other documentations (not sure why they have some many variations of the docs), like&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;A href="http://apps.cybersource.com/library/documentation/dev_guides/hosted_flex/0_1_0/html/getting-started/#using-the-token" target="_blank" rel="nofollow noopener noreferrer"&gt;this one&lt;/A&gt;&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;don't mention this at all.&lt;/P&gt;&lt;P&gt;See the RESTPaymentAPI section. It needs to be provided as a customerId field.&lt;/P&gt;&lt;PRE&gt;"paymentInformation": {
    "customer": {
        "customerId": "7500BB199B4270EFE05340588D0AFCAD"
    }
}&lt;/PRE&gt;&lt;P&gt;Here's a minimal example of how it can be implemented on the API side&lt;/P&gt;&lt;PRE&gt;var cybersourceRestApi = require('cybersource-rest-client');
var configuration = require('./cybersource/config.js');

var configObject = new configuration();
var instance = new cybersourceRestApi.PaymentsApi(configObject);

var clientReferenceInformation = new cybersourceRestApi.Ptsv2paymentsClientReferenceInformation();
clientReferenceInformation.code = 'test_payment';

var processingInformation = new cybersourceRestApi.Ptsv2paymentsProcessingInformation();
processingInformation.commerceIndicator = 'internet';

var amountDetails = new cybersourceRestApi.Ptsv2paymentsOrderInformationAmountDetails();
amountDetails.totalAmount = "100.00";
amountDetails.currency = 'USD';

var orderInformation = new cybersourceRestApi.Ptsv2paymentsOrderInformation();
orderInformation.amountDetails = amountDetails;


var paymentInformation = new cybersourceRestApi.Ptsv2paymentsPaymentInformation();

// THIS IS THE IMPORTANT BIT
var customer = new cybersourceRestApi.Ptsv2paymentsPaymentInformationCustomer()
customer.customerId = token
paymentInformation.customer = customer

var request = new cybersourceRestApi.CreatePaymentRequest();
request.clientReferenceInformation = clientReferenceInformation;
request.processingInformation = processingInformation;
request.orderInformation = orderInformation;
request.paymentInformation = paymentInformation;

if (!authoriseOnly) {
    request.processingInformation.capture = true;
}&lt;/PRE&gt;&lt;P&gt;Code based on the CyberSource nodejs REST samples:&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;A href="https://github.com/CyberSource/cybersource-rest-samples-node" target="_blank" rel="nofollow noopener noreferrer"&gt;https://github.com/CyberSource/cybersource-rest-samples-node&amp;nbsp;&lt;/A&gt;&lt;A href="https://voojio.com/chatroom/omegle" target="_blank" rel="noopener"&gt;/voojio&lt;/A&gt;&lt;/P&gt;&lt;P&gt;More info. Once you know where to look, it's actually explained in a few places.&lt;/P&gt;&lt;P&gt;Example, go to&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;A href="https://developer.cybersource.com/cybs-dev-api-ref/index.html#payments-process-a-payment" target="_blank" rel="nofollow noopener noreferrer"&gt;https://developer.cybersource.com/cybs-dev-api-ref/index.html#payments-process-a-payment&lt;/A&gt;&amp;nbsp;&lt;A href="https://shagle.download" target="_blank" rel="noopener"&gt;/shagle&lt;/A&gt;, expand the "REQUEST FIELD DESCRIPTION" underneath and go to&lt;/P&gt;&lt;PRE&gt;customer         
    .. customerId    &lt;/PRE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 06 Dec 2022 10:04:10 GMT</pubDate>
      <guid>https://community.developer.cybersource.com/t5/cybersource-APIs/The-payments-API-uses-credit-card-flexible-tokens-how-do-you-use/m-p/85165#M672</guid>
      <dc:creator>DeepMohinman</dc:creator>
      <dc:date>2022-12-06T10:04:10Z</dc:date>
    </item>
    <item>
      <title>Re: The payments API uses credit card flexible tokens, how do you use them?</title>
      <link>https://community.developer.cybersource.com/t5/cybersource-APIs/The-payments-API-uses-credit-card-flexible-tokens-how-do-you-use/m-p/85707#M778</link>
      <description>&lt;P&gt;&lt;SPAN&gt;A credit card flexible token is a secure representation of a customer's credit card information that can be used to process transactions without exposing the actual credit card information. When you use a payments API that supports flexible tokens, you can request a token for a customer's credit card information and then use that token in subsequent transactions&lt;A href="https://thesublimationink.com/best-sublimation-ink/" target="_self"&gt;,&lt;/A&gt; rather than passing the actual credit card information with each transaction.&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Tue, 14 Feb 2023 02:21:46 GMT</pubDate>
      <guid>https://community.developer.cybersource.com/t5/cybersource-APIs/The-payments-API-uses-credit-card-flexible-tokens-how-do-you-use/m-p/85707#M778</guid>
      <dc:creator>ertgdergtr</dc:creator>
      <dc:date>2023-02-14T02:21:46Z</dc:date>
    </item>
  </channel>
</rss>

