Apple Pay

RSS for tag

Provide a fast, easy, and secure way for users to buy goods and services in your app or on your website using Apple Pay.

Apple Pay Documentation

Posts under Apple Pay tag

290 results found
Sort by:
Post not yet marked as solved
88 Views

Unable to retrieve secure element pass after adding to Apple Wallet?

I am adding In-App provisioning to my app. I am able to access the Apple Pay Sandbox and I have successfully tested adding a secure element/payment pass to Apple Wallet. However, once the pass has been added to the wallet, I can not access or retrieve the pass from my app. I have confirmed with the PNO that the PNO Pass Metadata Configuration in the testing environment include the correct metadata for "associatedApplicationIdentifiers" and "associatedStoreIdentifiers". Does anyone know why I am having this issue and how I can resolve it? Steps used to access pass in Apple Wallet I am unable to view the pass when I attempt to access it using the PKPassLibrary function as follows: let library = PKPassLibrary() if #available(iOS 13.4, *) { // This returns an empty array library.passes(of: .secureElement) } else { // This also returns an empty array library.passes(of: .payment) } // This returns an empty array too library.passes() Steps used to add pass to Apple Wallet These are the steps I follow to add the card: I create a PKAddPaymentPassRequestConfiguration I use this config to instantiate a PKAddPaymentPassViewController. I provide the nonce, nonceSignature, and certificates to my PNO along with the card data. I receive the activationData, encryptedPassData, and ephemeralPublicKey from my PNO and create a PKAddPaymentPassRequest using this data. I add the pass to Apple Wallet. In the addPaymentPassViewController callback, I am able to view the pass data from the .didFinishAdding pass: PKPaymentPass? variable. I am also able to see that the pass has been added from Apple Wallet app. I am not able to access the pass using PKPassLibrary().passes() at this point. I am not able to access the pass at any point after adding it either.
Asked
by gtaylor.
Last updated
.
Post not yet marked as solved
968 Views

Apple pay error "Unable to read data from the transport connection: An existing connection was forcibly closed by the remote host"

Hi, I have been trying to integrate Apple Pay in my MVC Web Application. But while generating the token by calling apple's API I am geeting an error "Unable to read data from the transport connection: An existing connection was forcibly closed by the remote host." Currently I am integrating it in Sandbox environment.The apple certificate generated for merchantID doesnot contain any keys in it. Is it causing the issue or there is some other cause? Kindly help. Thanks in advance.
Asked Last updated
.
Post marked as solved
42 Views

Cant turn off NFC (PKPassLibrary.RequestAutomaticPassPresentationSuppression)

I have an app where I want to scan an aztec-code into a reader (that also reads NFC) which will trigger apple pay. I need to supress apple pay to use my app. This is done by applying to apple and get an entitlement which i have applied to my profile. Now all I have to do is to add the following code: PKPassLibrary.RequestAutomaticPassPresentationSuppression((PKAutomaticPassPresentationSuppressionResult r) => { }); And add the entitlement to the Entitlement.plist. This works for a "clean" app with nothing in it, but do not work for my app. Any suggestions as to what can be the problem here?
Asked Last updated
.
Post not yet marked as solved
25 Views

Credit card purchases for services outside app

I have my IOS Application wherein parents are to book activities for children which are scheduled on zoom or other platforms later. These are scheduled with verified partners who take study sessions with corresponding kids who pay for this. We want to use Stripe as our payment partner and enable credit card payments. As per the guidelines I can view in Apple, I feel this is where we stand : "3.1.3(e) Goods and Services Outside of the App: If your app enables people to purchase physical goods or services that will be consumed outside of the app, you must use purchase methods other than in-app purchase to collect those payments, such as Apple Pay or traditional credit card entry." Can i get an opinion on whether credit card payment integration is allowed as per the scenario stated above ? Do we need to integrate Apple Pay necessarily for payments ? Thanks in advance
Asked Last updated
.
Post not yet marked as solved
1.6k Views

Merchant Identity Validation SSL/TLS Error

Hello All,I was hoping someone here might be able to help with an issue I am having trying to validate the merchants identity for apple pay on the web.Currently when I try to call the validation url that comes from the session.onvalidatemerchant event I get an error message saying "The request was aborted: Could not create SSL/TLS secure channel"I call the validation url by passing to a C# .Net Framework 4.7.1 Web API. The API setups an HttpClient with the Merchant Identity Validation Certificate found in my apple account and calls the validation url passing in the required Json Validation Object. When I call PostAsync() I get an exception with the above error message (Please see code below for a clearer view of what I am doing).I have done several searches all of which tell me to setup the ServerCertificateValidationCallback to always return or to setup the SecurityProtocol to be TLS12, both of which do not work for me. I am able to test this locally on my computer and from our development server, both of which have the Merchant Identity Validation Certificate installed and are setup to support SSL/TLSDoes anyone have any other idea what could be causing this error.Thank you,JoshPlease note that sending of the data to and from the Web api works fine I am able to get valid reponse and send requests to our API our issue is more in the API I am just showing JS code to help clearify where the data is coming from.JS Code:applePayRequest = { countryCode: 'US', currencyCode: 'USD', supportedNetworks: ['visa', 'masterCard', 'amex', 'discover'], merchantCapabilities: ['supports3DS'], total: { label: merchantInfo.MerchantName, amount: parseFloat(total).toFixed(2).toString() }, lineItems: [{ label: "TestOrder", type: "final", amount: parseFloat(total).toFixed(2).toString() }], supportedCountries: ['US'], requiredBillingContactFields: [], requiredShippingContactFields: [], shippingType: "shipping", shippingMethods: [], } var session = new ApplePaySession(3, applePayRequest); session.onvalidatemerchant = function (event) { var applePayValidationRequest = { 'display_name': displayname, 'domain_name': domain, 'validation_url': event.validationURL, }; $.ajax({ type: 'POST', url: "", data: JSON.stringify(applePayValidationRequest), contentType: 'application/json', dataType: 'json', success: function(response) { console.log(JSON.stringify(response)); session.completeMerchantValidation(response); }, error: function(status) { console.log(JSON.stringify(status)); session.abort(); } }); };C# Web API Code:protected ValidationResponse ValidateApplePay(ApplePayValidationRequestrequest) { ServicePointManager.ServerCertificateValidationCallback = delegate (object s, X509Certificate certificate, X509Chain chain, SslPolicyErrors sslPolicyErrors) { return true; }; try { X509Certificate2 identifierCert = null; X509Store store = new X509Store(StoreName.My, StoreLocation.LocalMachine); store.Open(OpenFlags.ReadOnly); try { identifierCert = store.Certificates.Find(X509FindType.FindBySerialNumber, ApplePayCertificateSerialNumber, false)?.OfType().FirstOrDefault(); } catch (Exception ex) { return null;//Actually returns error infomration } finally { store.Close(); } if (identifierCert == null) { return null; //Actually returns error message } HttpClientHandler requestHandler = new HttpClientHandler(); requestHandler.ClientCertificates.Add(identifierCert); var handler = new WebRequestHandler(); handler.ClientCertificates.Add(identifierCert); //Set security protocol to TLS 1.2 only (REQUIRED by Apple Pay) ServicePointManager.Expect100Continue = true; ServicePointManager.SecurityProtocol = SecurityProtocolType.Tls12; using (var client = new HttpClient(requestHandler, true)) { if (!Uri.TryCreate(appleRequest.ValidationURL, UriKind.Absolute, out Uri requestUri)) { return null;//Returns error information } client.BaseAddress = requestUri; client.DefaultRequestHeaders.Add("Connection", "Keep-Alive"); client.DefaultRequestHeaders.Add("Keep-Alive", "36000"); string identifier = string.Empty; try { // This OID returns the ASN.1 encoded merchant identifier X509Extension extension = identifierCert.Extensions[ApplePayCertificateExtensionIdentifier]; if (extension == null) { return null;//Returns error information } // Convert the raw ASN.1 data to a string containing the ID identifier = Encoding.ASCII.GetString(extension.RawData).Substring(2); } catch(Exception ex) { return null;//Returns error information } var jsonData = JsonConvert.SerializeObject(new { merchantIdentifier = identifier, domainName = appleRequest.DomainName, displayName = appleRequest.DisplayName, }); using (var content = new StringContent(jsonData, Encoding.UTF8, "application/json")) { using (var response = client.PostAsync("paymentSession", content).Result)//Gives Could not create SSL/TLS secure channel { var merchantSessionJson = response.Content.ReadAsStringAsync().Result; var merchantSession = JObject.Parse(merchantSessionJson); return new ApplePayValidationResponse() { Success = response.IsSuccessStatusCode, ErrorCode = 0, MerchantSession = merchantSession.ToString(Formatting.None), }; } } } } catch (Exception e) { return null;//Return error information } }
Asked
by ASC.Josh.
Last updated
.
Post not yet marked as solved
17 Views

Paying in PSP payment page, to Merchant

Ran across an issue, where i (a PSP) was trying to make a test payment via a payment page our merchants display to their customers. The deal get's approved, but the name of the merchant in the wallet (iOS app) is "my" merchant name, and the domain is the one related to this merchantID. My question is --- can i use an on-boarded Merchant's certificate (that i registered with the relevant API), to start an ApplePaySession in a safari browser, when the MerchantID/domain is theirs, but the client is in my (PSP) page? Meaning - I'm a PSP serving the buyer a unique payment page (i.e "https://psp.com/paymentPage?unique=123456"), and this page is for payment to my Merchant, that i registered in my developer acc. with certificate and domain (i.e "https://myMerchant.com"). Will this cause issues when i try to start in safari an ApplePaySession, with that MerchantID, but in my PSP domain? And if this is a problem - how do i (as a PSP) ensure the deal is shown as related to the actual Merchant in the buyer's transaction record in their Apple wallet app ?...
Asked
by eyalcomp.
Last updated
.
Post not yet marked as solved
43 Views

Unable to re-verify Merchant Domain

We have had Apple Pay enabled on a domain, and been able to re-verify by downloading and uploading apple-developer-merchantid-domain-association.txt files on our staging and production environments without issue for about a year. During the most recent attempt to re-verify the domains, we are receiving: Domain verification failed. Review your TLS Certificate configuration to confirm that the certificate is accessible and a supported TLS Cipher Suite is used. I've asserted that: Our SSL certificate has TLS 1.2 supported That our cipher suite (ECDHE-RSA-AES128-GCM-SHA256) is supported That the file at {DOMAIN}/.well-known/apple-developer-merchantid-domain-association.txt is reachable, and does not hit cache, or redirect That the above file is accessible via browser from a variety of IPs That while requests from a browser to the file are being logged, when I attempt to verify, I do not see requests from the Apple IPs (found here) getting to the server Is there anyway to get more information regarding why the domain verification tool is failing to verify? I've tried reaching out to Apple Pay support, but have been redirected several times.
Asked Last updated
.
Post not yet marked as solved
28 Views

How to bind apple_Id and transaction_id in apple store connect api to track refunds?

Good day, There is a need to track returns in the application in order to write off the intra-system balance With verifyReceipt - https://developer.apple.com/documentation/appstorereceipts/verifyreceipt I can get a list of transaction_id for a specific purchase token. With salesReports - https://developer.apple.com/documentation/appstoreconnectapi/download_sales_and_trends_reports I can get a list of all operations with appleId, but without transaction_id. What are the ways to associate appleId data of users and purchases via API? Are there any ways to visualize purchase statistics https://appstoreconnect.apple.com/trends/sales output transaction_id besides appleId?
Asked Last updated
.
Post not yet marked as solved
571 Views

Sending developer payload in IAP

We are using server-to-server purchase notifications for App Store mobile apps. User can pay for subscriptions. We configured server-server notifications.Our Implementation: Since there is no way for us to pass our user_id during IAP, receipt data and server notification have no field for mapping it to our users, we are doing the following things to work around this :After IAP payment is processed. We send the receipt to our server from App.We store receipt for the respective user.The receipt contains transaction_id and this transaction_id can be used to verify notification we receive from Apple server e.g Initial buy etc..I have the following questions:if Apple sends our Server notification before our app makes an API call to our server to store the receipt. In that case server callback will do nothing, because it will not able to find user account without transaction_id. How should I avoid that?Is there a field in which we can pass data_payload(e.g user_id, email-id)? So that case 1 can be avoided.Is there any API we could call to get user information related to a transaction?if there is an API to fetch all transactions between dates?
Asked
by Avi.0191.
Last updated
.
Post not yet marked as solved
1.8k Views

Domain verification failed

Dearswhen I try to verify a domain its show this error" Domain verification failed. Review your TLS Certificate configuration to confirm that the certificate is accessible and a supported TLS Cipher Suite is used. "I'm using Cloudflare SSL certification
Asked
by talal2020.
Last updated
.
Post not yet marked as solved
902 Views

Merchant ID max number

Hello there,Is there any limit with the number of merchant ID you can create from one Apple Developer Account?Thank you very much in advance.
Asked
by yohang.
Last updated
.
Post not yet marked as solved
205 Views

Apple Pay Merchant Id limit

Hi, anyone aware of the limit of merchant ids per ADA . I am getting this error now . It says"Unable to add Merchant ID because Merchant ID limit 100 has been exceeded" I am using my organisation's ADA. Want to know if this an app store bug or we need to pay more or this is a limitation, or we would need more accounts to overcome this limitation Any inputs would be highly appreciated
Asked Last updated
.
Post not yet marked as solved
100 Views

Documentation for Home Keys?

Hi, Home Keys is mentioned in passing in the session with no other information and i cannot find any documentation on the subject.
Asked
by nokey4.
Last updated
.
Post not yet marked as solved
48 Views

Renew membership in china, pay by which credit cards?

I am from China. I want to renew membership with Zhaoshang Bank credit card. The card supports mastercard, but only afford US dollars, while Apple payment need Chinese RMB. So, my question is: which credit card has succeed in paying in China? Thanks for your information.
Asked
by goggle.
Last updated
.