Initialize-Payment | Curation with Apple Pay Option

How to Initialize an Apple Pay Payment

Initialize Request

<?xml version="1.0" encoding="UTF-8"?>
<root>
   <initialize-payment account="[integer]" client-id="[integer]">
     <transaction order-no="CPM1601976034055" type-id="[integer]" >
        <amount currency-id="[integer]" country-id="[integer]">100</amount>
     </transaction>
     <client-info language="en" app-version="1.43" sdk-version="1.43" version="1.43" platform="HTML5">
       <mobile operator-id="[integer]" country-id="200">[mobile number]</mobile>
       <email>[email]</email>
       <customer-ref>[customer-ref]</customer-ref>
     </client-info>
   </initialize-payment>
</root>

Initialize Response

The initialize payment response can be divided into the following:

  • Merchant configuration
  • Transaction information
  • Card information

These fields from the initialize payment response are required to call /mpoint/pay and /mpoint/authorize:

FieldTypeDescription
transaction/@idxs:positiveIntegerA unique transaction ID generated for the initialize payment request. This identifies a transaction within CellPoint Digital systems.
cards/card/@type-idxs:positiveIntegerA unique ID that identifies the payment methods configured.

type-id = 41 indicates the internal id defined for Apple Pay payment method.

Initialize Response for Apple Pay Response for a Web Channel

<?xml version="1.0" encoding="UTF-8"?>
<root>
	<client-config account="[integer]" auto-capture="false" id="[integer]" mode="[integer]" store-card="[integer]">
		<name>Test</name>
		<callback-url>[merchant URL for callback]</callback-url>
		<accept-url/>
	</client-config>
	<transaction auto-capture="true" eua-id="[integer]" id="[integer]" language="en" mode="1" order-no="" type-id="[integer]">
		<amount country-id="[integer]" currency="DKK" format="{PRICE} {CURRENCY}" symbol="">10025</amount>
		<mobile country-id="[integer]" operator-id="[integer]">30206172</mobile>
		<callback-url>[CALLBACK URL]</callback-url>
		<accept-url/>
	</transaction>
	<session id="6143" total-amount="1" type="1">
		<amount alpha2code="US" alpha3code="USA" code="840" country-id="200" currency="" currency-id="0" format="{CURRENCY}{PRICE}" symbol="$">10025</amount>
	</session>
	<wallets>
		<card cvc-length="-1" cvcmandatory="false" dcc="false" enabled="true" id="15" installment="0" max-length="-1" min-length="-1" payment-type="3" preferred="false" presentment-currency="false" processor-type="3" psp-id="-1" state-id="1" type-id="15">
			<name>Apple Pay</name>
			<prefixes>
				<prefix id="164">
					<min>-1</min>
					<max>-1</max>
				</prefix>
			</prefixes>
			<url method="overlay"/>
			<head>&lt;script type='text/javascript'&gt; var debug = false; var countryCode = "GB"; var currencyCode = "GBP"; var merchantIdentifier = 'merchant.mytest.applepay.sandbox'; var displayName ="Holidays"; var totalAmount = "152"; var supportedNetword = ['VISA','DISCOVER','MASTERCARD','AMEX']; var supportedNetwork = ['VISA','DISCOVER','MASTERCARD','AMEX']; &lt;/script&gt; &lt;script type="text/javascript" src="https://myurl/js/applepay.js"&gt;&lt;/script&gt; &lt;style&gt; #applePay{width:150px;height:50px;display:none;border-radius:5px;background-image:-webkit-named-image(apple-pay-logo-white);background-position:50% 50%;background-color:#000;background-size:60%;background-repeat:no-repeat} &lt;/style&gt;</head>
			<body>&lt;button type="button" id="applePay"&gt;&lt;/button&gt;</body>
			<auth-token>Auth-Token</auth-token>Apple Pay
</card>
	</wallets>
</root>

Initialize Response for Apple Pay Response for the Native APP Channel

<?xml version="1.0" encoding="UTF-8"?>
<root>
	<client-config account="[integer]" auto-capture="false" id="[integer]" mode="[integer]" store-card="[integer]">
		<name>Test</name>
		<callback-url>[merchant URL for callback]</callback-url>
		<accept-url/>
	</client-config>
	<transaction auto-capture="true" eua-id="[integer]" id="[integer]" language="en" mode="1" order-no="" type-id="[integer]">
		<amount country-id="[integer]" currency="DKK" format="{PRICE} {CURRENCY}" symbol="">10025</amount>
		<mobile country-id="[integer]" operator-id="[integer]">30206172</mobile>
		<callback-url>[CALLBACK URL]</callback-url>
		<accept-url/>
	</transaction>
	<session id="6143" total-amount="1" type="1">
		<amount alpha2code="US" alpha3code="USA" code="840" country-id="200" currency="" currency-id="0" format="{CURRENCY}{PRICE}" symbol="$">10025</amount>
	</session>
	<wallets>
		<card id="15" type-id="15" psp-id="52" min-length="-1" max-length="-1" cvc- length="-1" state-id="1" payment-type="3" preferred="false" enabled="true" processor-type="3" installment="0" cvcmandatory="false" dcc="false" presentment-currency="false">
			<name>Apple Pay</name>
			<prefixes>
				<prefix>
					<min>0</min>
					<max>0</max>
				</prefix>
			</prefixes>
			<url method="overlay"/>
			<hidden-fields>
				<card-brands>'MASTERCARD','VISA','DISCOVER','AMEX'</card-brands>
			</hidden-fields>
			<auth-token>Auth-Token</auth-token>Apple Pay
         </card>
	</wallets>
</root>