SquareConnect\ApplePayApi

November 20, 2019 ยท View on GitHub

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

MethodHTTP requestDescription
registerDomainPOST /v2/apple-pay/domainsRegisterDomain

registerDomain

\SquareConnect\Model\RegisterDomainResponse registerDomain($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

<?php
require_once(__DIR__ . '/vendor/autoload.php');

// Configure OAuth2 access token for authorization: oauth2
SquareConnect\Configuration::getDefaultConfiguration()->setAccessToken('YOUR_ACCESS_TOKEN');

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

try {
    $result = $apiInstance->registerDomain($body);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling ApplePayApi->registerDomain: ', $e->getMessage(), PHP_EOL;
}
?>

Parameters

NameTypeDescriptionNotes
body\SquareConnect\Model\RegisterDomainRequestAn object containing the fields to POST for the request. See the corresponding object definition for field details.

Return type

\SquareConnect\Model\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]