Square.Connect.Api.ApplePayApi

November 20, 2019 ยท View on GitHub

All URIs are relative to https://connect.squareup.com

MethodHTTP requestDescription
RegisterDomainPOST /v2/apple-pay/domainsRegisterDomain

RegisterDomain

RegisterDomainResponse RegisterDomain (RegisterDomainRequest body)

RegisterDomain

Activates a domain for use with Web Apple Pay and Square. A validation will be performed on this domain by Apple to ensure is it properly set up as an Apple Pay enabled domain. This endpoint provides an easy way for platform developers to bulk activate Web Apple Pay with Square for merchants using their platform. To learn more about Apple Pay on Web see the Apple Pay section in the Square Payment Form Walkthrough.

Example

using System;
using System.Diagnostics;
using Square.Connect.Api;
using Square.Connect.Client;
using Square.Connect.Model;

namespace Example
{
    public class RegisterDomainExample
    {
        public void main()
        {
            
            // Configure OAuth2 access token for authorization: oauth2
            Configuration.Default.AccessToken = "YOUR_ACCESS_TOKEN";

            var apiInstance = new ApplePayApi();
            var body = new RegisterDomainRequest(); // RegisterDomainRequest | An object containing the fields to POST for the request.  See the corresponding object definition for field details.

            try
            {
                // RegisterDomain
                RegisterDomainResponse result = apiInstance.RegisterDomain(body);
                Debug.WriteLine(result);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling ApplePayApi.RegisterDomain: " + e.Message );
            }
        }
    }
}

Parameters

NameTypeDescriptionNotes
bodyRegisterDomainRequestAn object containing the fields to POST for the request. See the corresponding object definition for field details.

Return type

RegisterDomainResponse

Authorization

oauth2

HTTP request headers

  • Content-Type: application/json
  • Accept: application/json

[Back to top] [Back to API list] [Back to Model list] [Back to README]