<?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 Merchant initiated transactions fail using stored payment method in cybersource in cybersource APIs</title>
    <link>https://community.developer.cybersource.com/t5/cybersource-APIs/Merchant-initiated-transactions-fail-using-stored-payment-method/m-p/87417#M1151</link>
    <description>&lt;P&gt;I am using CyberSource and here is what I am trying to do:&lt;/P&gt;&lt;P&gt;make payment with PAN (customer initialed transaction)&lt;BR /&gt;store payment for future use&lt;BR /&gt;use stored payment method for merchant initiated transactions&lt;BR /&gt;Documentation I used: &lt;A href="https://developer.cybersource.com/docs/cybs/en-us/payments/developer/ctv/rest/payments/credentials-processsing-intro/credentials-mit-recur-intro.html" target="_blank"&gt;https://developer.cybersource.com/docs/cybs/en-us/payments/developer/ctv/rest/payments/credentials-processsing-intro/credentials-mit-recur-intro.html&lt;/A&gt;. Particularly looking at following sections of the documentation:&lt;/P&gt;&lt;P&gt;Initial CIT Recurring Payment with a PAN&lt;BR /&gt;Subsequent MIT Recurring Payments&lt;BR /&gt;I believe, I follow documentation closely, however, the result that I get is not ideal. First transaction is successful, and it looks like payment method is stored on file. However, following merchant initiated transactions fail with following error: The credit card number is either missing or invalid&lt;/P&gt;&lt;P&gt;Below is my implementation, I am using C# and CyberSource's SDK. I would appreciate any help, thanks you in advance!&lt;/P&gt;&lt;P&gt;CIT (first transaction)&lt;/P&gt;&lt;P&gt;string clientReferenceInformationCode = Guid.NewGuid().ToString();&lt;BR /&gt;Ptsv2paymentsClientReferenceInformation clientReferenceInformation = new Ptsv2paymentsClientReferenceInformation(&lt;BR /&gt;Code: clientReferenceInformationCode&lt;BR /&gt;);&lt;BR /&gt;bool processingInformationCapture = true;&lt;BR /&gt;string processingInformationPaymentSolution = "012";&lt;/P&gt;&lt;P&gt;Ptsv2paymentsProcessingInformation processingInformation = new Ptsv2paymentsProcessingInformation(&lt;BR /&gt;Capture: processingInformationCapture,&lt;BR /&gt;PaymentSolution: processingInformationPaymentSolution,&lt;BR /&gt;AuthorizationOptions: new Ptsv2paymentsProcessingInformationAuthorizationOptions&lt;BR /&gt;{&lt;BR /&gt;Initiator = new Ptsv2paymentsProcessingInformationAuthorizationOptionsInitiator&lt;BR /&gt;{&lt;BR /&gt;CredentialStoredOnFile = true,&lt;BR /&gt;Type = "customer"&lt;BR /&gt;},&lt;/P&gt;&lt;P&gt;},&lt;BR /&gt;CommerceIndicator: "internet"&lt;BR /&gt;, RecurringOptions: new Ptsv2paymentsProcessingInformationRecurringOptions&lt;BR /&gt;{&lt;BR /&gt;FirstRecurringPayment = true&lt;BR /&gt;}&lt;BR /&gt;) ;&lt;/P&gt;&lt;P&gt;Ptsv2paymentsPaymentInformation paymentInformation = new Ptsv2paymentsPaymentInformation(&lt;BR /&gt;FluidData: new Ptsv2paymentsPaymentInformationFluidData&lt;BR /&gt;{&lt;BR /&gt;Value = googlePayToken,&lt;BR /&gt;}&lt;BR /&gt;);&lt;/P&gt;&lt;P&gt;string orderInformationAmountDetailsTotalAmount = "1";&lt;BR /&gt;string orderInformationAmountDetailsCurrency = "USD";&lt;BR /&gt;Ptsv2paymentsOrderInformationAmountDetails orderInformationAmountDetails = new Ptsv2paymentsOrderInformationAmountDetails(&lt;BR /&gt;TotalAmount: orderInformationAmountDetailsTotalAmount,&lt;BR /&gt;Currency: orderInformationAmountDetailsCurrency&lt;BR /&gt;);&lt;/P&gt;&lt;P&gt;string orderInformationBillToFirstName = "John";&lt;BR /&gt;string orderInformationBillToLastName = "Deo";&lt;BR /&gt;string orderInformationBillToAddress1 = "901 Metro Center Blvd";&lt;BR /&gt;string orderInformationBillToLocality = "Foster City";&lt;BR /&gt;string orderInformationBillToAdministrativeArea = "CA";&lt;BR /&gt;string orderInformationBillToPostalCode = "94404";&lt;BR /&gt;string orderInformationBillToCountry = "US";&lt;BR /&gt;string orderInformationBillToEmail = "test@googlepay.com";&lt;BR /&gt;string orderInformationBillToPhoneNumber = "6504327113";&lt;/P&gt;&lt;P&gt;Ptsv2paymentsOrderInformationBillTo orderInformationBillTo = new Ptsv2paymentsOrderInformationBillTo(&lt;BR /&gt;FirstName: orderInformationBillToFirstName,&lt;BR /&gt;LastName: orderInformationBillToLastName,&lt;BR /&gt;Address1: orderInformationBillToAddress1,&lt;BR /&gt;Locality: orderInformationBillToLocality,&lt;BR /&gt;AdministrativeArea: orderInformationBillToAdministrativeArea,&lt;BR /&gt;PostalCode: orderInformationBillToPostalCode,&lt;BR /&gt;Country: orderInformationBillToCountry,&lt;BR /&gt;Email: orderInformationBillToEmail,&lt;BR /&gt;PhoneNumber: orderInformationBillToPhoneNumber&lt;BR /&gt;);&lt;/P&gt;&lt;P&gt;Ptsv2paymentsOrderInformation orderInformation = new Ptsv2paymentsOrderInformation(&lt;BR /&gt;AmountDetails: orderInformationAmountDetails,&lt;BR /&gt;BillTo: orderInformationBillTo&lt;BR /&gt;);&lt;/P&gt;&lt;P&gt;var requestObj = new CreatePaymentRequest(&lt;BR /&gt;ClientReferenceInformation: clientReferenceInformation,&lt;BR /&gt;ProcessingInformation: processingInformation,&lt;BR /&gt;PaymentInformation: paymentInformation,&lt;BR /&gt;OrderInformation: orderInformation&lt;BR /&gt;);&lt;/P&gt;&lt;P&gt;try&lt;BR /&gt;{&lt;BR /&gt;var configDictionary = new Configuration().GetConfiguration();&lt;BR /&gt;var clientConfig = new CyberSource.Client.Configuration(merchConfigDictObj: configDictionary);&lt;/P&gt;&lt;P&gt;var apiInstance = new PaymentsApi(clientConfig);&lt;BR /&gt;PtsV2PaymentsPost201Response result = apiInstance.CreatePayment(requestObj);&lt;/P&gt;&lt;P&gt;Console.WriteLine(result);&lt;BR /&gt;return result;&lt;BR /&gt;}&lt;BR /&gt;catch (Exception e)&lt;BR /&gt;{&lt;BR /&gt;Console.WriteLine("Exception on calling the API : " + e.Message);&lt;BR /&gt;return null;&lt;BR /&gt;}&lt;BR /&gt;Following MITs:&lt;/P&gt;&lt;P&gt;Ptsv2paymentsProcessingInformation processingInformation = new Ptsv2paymentsProcessingInformation(&lt;BR /&gt;AuthorizationOptions: new Ptsv2paymentsProcessingInformationAuthorizationOptions&lt;BR /&gt;{&lt;BR /&gt;Initiator = new Ptsv2paymentsProcessingInformationAuthorizationOptionsInitiator&lt;BR /&gt;{&lt;BR /&gt;StoredCredentialUsed = true,&lt;BR /&gt;Type = "merchant",&lt;BR /&gt;MerchantInitiatedTransaction = new Ptsv2paymentsProcessingInformationAuthorizationOptionsInitiatorMerchantInitiatedTransaction&lt;BR /&gt;{&lt;BR /&gt;Reason = "7",&lt;BR /&gt;PreviousTransactionId = transactionId,&lt;BR /&gt;}&lt;BR /&gt;},&lt;BR /&gt;},&lt;BR /&gt;CommerceIndicator: "recurring",&lt;BR /&gt;Capture: true&lt;BR /&gt;);&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Ptsv2paymentsPaymentInformation paymentInformation = new Ptsv2paymentsPaymentInformation(&lt;BR /&gt;Card: new Ptsv2paymentsPaymentInformationCard&lt;BR /&gt;{&lt;BR /&gt;ExpirationYear = card.ExpirationYear,&lt;BR /&gt;ExpirationMonth = card.ExpirationMonth,&lt;BR /&gt;Number = card.Prefix + "xxxxxxxxxxxx"&lt;BR /&gt;}&lt;/P&gt;&lt;P&gt;);&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;string clientReferenceInformationCode = Guid.NewGuid().ToString();&lt;BR /&gt;Ptsv2paymentsClientReferenceInformation clientReferenceInformation = new Ptsv2paymentsClientReferenceInformation(&lt;BR /&gt;Code: clientReferenceInformationCode&lt;BR /&gt;);&lt;/P&gt;&lt;P&gt;var requestObj = new CreatePaymentRequest(&lt;BR /&gt;ClientReferenceInformation: clientReferenceInformation,&lt;BR /&gt;ProcessingInformation: processingInformation,&lt;BR /&gt;OrderInformation: orderInformation,&lt;BR /&gt;PaymentInformation: paymentInformation&lt;BR /&gt;);&lt;/P&gt;&lt;P&gt;PtsV2PaymentsPost201Response result = apiInstance.CreatePayment(requestObj);&lt;/P&gt;</description>
    <pubDate>Tue, 29 Aug 2023 08:05:25 GMT</pubDate>
    <dc:creator>inazikh</dc:creator>
    <dc:date>2023-08-29T08:05:25Z</dc:date>
    <item>
      <title>Merchant initiated transactions fail using stored payment method in cybersource</title>
      <link>https://community.developer.cybersource.com/t5/cybersource-APIs/Merchant-initiated-transactions-fail-using-stored-payment-method/m-p/87417#M1151</link>
      <description>&lt;P&gt;I am using CyberSource and here is what I am trying to do:&lt;/P&gt;&lt;P&gt;make payment with PAN (customer initialed transaction)&lt;BR /&gt;store payment for future use&lt;BR /&gt;use stored payment method for merchant initiated transactions&lt;BR /&gt;Documentation I used: &lt;A href="https://developer.cybersource.com/docs/cybs/en-us/payments/developer/ctv/rest/payments/credentials-processsing-intro/credentials-mit-recur-intro.html" target="_blank"&gt;https://developer.cybersource.com/docs/cybs/en-us/payments/developer/ctv/rest/payments/credentials-processsing-intro/credentials-mit-recur-intro.html&lt;/A&gt;. Particularly looking at following sections of the documentation:&lt;/P&gt;&lt;P&gt;Initial CIT Recurring Payment with a PAN&lt;BR /&gt;Subsequent MIT Recurring Payments&lt;BR /&gt;I believe, I follow documentation closely, however, the result that I get is not ideal. First transaction is successful, and it looks like payment method is stored on file. However, following merchant initiated transactions fail with following error: The credit card number is either missing or invalid&lt;/P&gt;&lt;P&gt;Below is my implementation, I am using C# and CyberSource's SDK. I would appreciate any help, thanks you in advance!&lt;/P&gt;&lt;P&gt;CIT (first transaction)&lt;/P&gt;&lt;P&gt;string clientReferenceInformationCode = Guid.NewGuid().ToString();&lt;BR /&gt;Ptsv2paymentsClientReferenceInformation clientReferenceInformation = new Ptsv2paymentsClientReferenceInformation(&lt;BR /&gt;Code: clientReferenceInformationCode&lt;BR /&gt;);&lt;BR /&gt;bool processingInformationCapture = true;&lt;BR /&gt;string processingInformationPaymentSolution = "012";&lt;/P&gt;&lt;P&gt;Ptsv2paymentsProcessingInformation processingInformation = new Ptsv2paymentsProcessingInformation(&lt;BR /&gt;Capture: processingInformationCapture,&lt;BR /&gt;PaymentSolution: processingInformationPaymentSolution,&lt;BR /&gt;AuthorizationOptions: new Ptsv2paymentsProcessingInformationAuthorizationOptions&lt;BR /&gt;{&lt;BR /&gt;Initiator = new Ptsv2paymentsProcessingInformationAuthorizationOptionsInitiator&lt;BR /&gt;{&lt;BR /&gt;CredentialStoredOnFile = true,&lt;BR /&gt;Type = "customer"&lt;BR /&gt;},&lt;/P&gt;&lt;P&gt;},&lt;BR /&gt;CommerceIndicator: "internet"&lt;BR /&gt;, RecurringOptions: new Ptsv2paymentsProcessingInformationRecurringOptions&lt;BR /&gt;{&lt;BR /&gt;FirstRecurringPayment = true&lt;BR /&gt;}&lt;BR /&gt;) ;&lt;/P&gt;&lt;P&gt;Ptsv2paymentsPaymentInformation paymentInformation = new Ptsv2paymentsPaymentInformation(&lt;BR /&gt;FluidData: new Ptsv2paymentsPaymentInformationFluidData&lt;BR /&gt;{&lt;BR /&gt;Value = googlePayToken,&lt;BR /&gt;}&lt;BR /&gt;);&lt;/P&gt;&lt;P&gt;string orderInformationAmountDetailsTotalAmount = "1";&lt;BR /&gt;string orderInformationAmountDetailsCurrency = "USD";&lt;BR /&gt;Ptsv2paymentsOrderInformationAmountDetails orderInformationAmountDetails = new Ptsv2paymentsOrderInformationAmountDetails(&lt;BR /&gt;TotalAmount: orderInformationAmountDetailsTotalAmount,&lt;BR /&gt;Currency: orderInformationAmountDetailsCurrency&lt;BR /&gt;);&lt;/P&gt;&lt;P&gt;string orderInformationBillToFirstName = "John";&lt;BR /&gt;string orderInformationBillToLastName = "Deo";&lt;BR /&gt;string orderInformationBillToAddress1 = "901 Metro Center Blvd";&lt;BR /&gt;string orderInformationBillToLocality = "Foster City";&lt;BR /&gt;string orderInformationBillToAdministrativeArea = "CA";&lt;BR /&gt;string orderInformationBillToPostalCode = "94404";&lt;BR /&gt;string orderInformationBillToCountry = "US";&lt;BR /&gt;string orderInformationBillToEmail = "test@googlepay.com";&lt;BR /&gt;string orderInformationBillToPhoneNumber = "6504327113";&lt;/P&gt;&lt;P&gt;Ptsv2paymentsOrderInformationBillTo orderInformationBillTo = new Ptsv2paymentsOrderInformationBillTo(&lt;BR /&gt;FirstName: orderInformationBillToFirstName,&lt;BR /&gt;LastName: orderInformationBillToLastName,&lt;BR /&gt;Address1: orderInformationBillToAddress1,&lt;BR /&gt;Locality: orderInformationBillToLocality,&lt;BR /&gt;AdministrativeArea: orderInformationBillToAdministrativeArea,&lt;BR /&gt;PostalCode: orderInformationBillToPostalCode,&lt;BR /&gt;Country: orderInformationBillToCountry,&lt;BR /&gt;Email: orderInformationBillToEmail,&lt;BR /&gt;PhoneNumber: orderInformationBillToPhoneNumber&lt;BR /&gt;);&lt;/P&gt;&lt;P&gt;Ptsv2paymentsOrderInformation orderInformation = new Ptsv2paymentsOrderInformation(&lt;BR /&gt;AmountDetails: orderInformationAmountDetails,&lt;BR /&gt;BillTo: orderInformationBillTo&lt;BR /&gt;);&lt;/P&gt;&lt;P&gt;var requestObj = new CreatePaymentRequest(&lt;BR /&gt;ClientReferenceInformation: clientReferenceInformation,&lt;BR /&gt;ProcessingInformation: processingInformation,&lt;BR /&gt;PaymentInformation: paymentInformation,&lt;BR /&gt;OrderInformation: orderInformation&lt;BR /&gt;);&lt;/P&gt;&lt;P&gt;try&lt;BR /&gt;{&lt;BR /&gt;var configDictionary = new Configuration().GetConfiguration();&lt;BR /&gt;var clientConfig = new CyberSource.Client.Configuration(merchConfigDictObj: configDictionary);&lt;/P&gt;&lt;P&gt;var apiInstance = new PaymentsApi(clientConfig);&lt;BR /&gt;PtsV2PaymentsPost201Response result = apiInstance.CreatePayment(requestObj);&lt;/P&gt;&lt;P&gt;Console.WriteLine(result);&lt;BR /&gt;return result;&lt;BR /&gt;}&lt;BR /&gt;catch (Exception e)&lt;BR /&gt;{&lt;BR /&gt;Console.WriteLine("Exception on calling the API : " + e.Message);&lt;BR /&gt;return null;&lt;BR /&gt;}&lt;BR /&gt;Following MITs:&lt;/P&gt;&lt;P&gt;Ptsv2paymentsProcessingInformation processingInformation = new Ptsv2paymentsProcessingInformation(&lt;BR /&gt;AuthorizationOptions: new Ptsv2paymentsProcessingInformationAuthorizationOptions&lt;BR /&gt;{&lt;BR /&gt;Initiator = new Ptsv2paymentsProcessingInformationAuthorizationOptionsInitiator&lt;BR /&gt;{&lt;BR /&gt;StoredCredentialUsed = true,&lt;BR /&gt;Type = "merchant",&lt;BR /&gt;MerchantInitiatedTransaction = new Ptsv2paymentsProcessingInformationAuthorizationOptionsInitiatorMerchantInitiatedTransaction&lt;BR /&gt;{&lt;BR /&gt;Reason = "7",&lt;BR /&gt;PreviousTransactionId = transactionId,&lt;BR /&gt;}&lt;BR /&gt;},&lt;BR /&gt;},&lt;BR /&gt;CommerceIndicator: "recurring",&lt;BR /&gt;Capture: true&lt;BR /&gt;);&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Ptsv2paymentsPaymentInformation paymentInformation = new Ptsv2paymentsPaymentInformation(&lt;BR /&gt;Card: new Ptsv2paymentsPaymentInformationCard&lt;BR /&gt;{&lt;BR /&gt;ExpirationYear = card.ExpirationYear,&lt;BR /&gt;ExpirationMonth = card.ExpirationMonth,&lt;BR /&gt;Number = card.Prefix + "xxxxxxxxxxxx"&lt;BR /&gt;}&lt;/P&gt;&lt;P&gt;);&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;string clientReferenceInformationCode = Guid.NewGuid().ToString();&lt;BR /&gt;Ptsv2paymentsClientReferenceInformation clientReferenceInformation = new Ptsv2paymentsClientReferenceInformation(&lt;BR /&gt;Code: clientReferenceInformationCode&lt;BR /&gt;);&lt;/P&gt;&lt;P&gt;var requestObj = new CreatePaymentRequest(&lt;BR /&gt;ClientReferenceInformation: clientReferenceInformation,&lt;BR /&gt;ProcessingInformation: processingInformation,&lt;BR /&gt;OrderInformation: orderInformation,&lt;BR /&gt;PaymentInformation: paymentInformation&lt;BR /&gt;);&lt;/P&gt;&lt;P&gt;PtsV2PaymentsPost201Response result = apiInstance.CreatePayment(requestObj);&lt;/P&gt;</description>
      <pubDate>Tue, 29 Aug 2023 08:05:25 GMT</pubDate>
      <guid>https://community.developer.cybersource.com/t5/cybersource-APIs/Merchant-initiated-transactions-fail-using-stored-payment-method/m-p/87417#M1151</guid>
      <dc:creator>inazikh</dc:creator>
      <dc:date>2023-08-29T08:05:25Z</dc:date>
    </item>
  </channel>
</rss>

