Skip to content

Latest commit

 

History

History
56 lines (37 loc) · 1.81 KB

apple-pay.md

File metadata and controls

56 lines (37 loc) · 1.81 KB

Apple Pay

apple_pay_api = client.apple_pay

Class Name

ApplePayApi

Register Domain

Activates a domain for use with Apple Pay on the Web and Square. A validation is performed on this domain by Apple to ensure that it is properly set up as an Apple Pay enabled domain.

This endpoint provides an easy way for platform developers to bulk activate Apple Pay on the Web with Square for merchants using their platform.

Note: The SqPaymentForm library is deprecated as of May 13, 2021, and will only receive critical security updates until it is retired on October 31, 2022. You must migrate your payment form code to the Web Payments SDK to continue using your domain for Apple Pay. For more information on migrating to the Web Payments SDK, see Migrate to the Web Payments SDK.

To learn more about the Web Payments SDK and how to add Apple Pay, see Take an Apple Pay Payment.

def register_domain(self,
                   body)

Parameters

Parameter Type Tags Description
body Register Domain Request Body, Required An object containing the fields to POST for the request.

See the corresponding object definition for field details.

Response Type

This method returns a ApiResponse instance. The body property of this instance returns the response data which is of type Register Domain Response.

Example Usage

body = {
    'domain_name': 'example.com'
}

result = apple_pay_api.register_domain(body)
print(result)

if result.is_success():
    print(result.body)
elif result.is_error():
    print(result.errors)