Initialize-Payment | Curation with Google Pay Option

Sample Request

The following is an example of the initialize payment 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>

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 CPD systems.
cards/card/@type-idxs:positiveIntegerA unique ID that identifies the payment methods configured. type-id = 41 indicates the internal ID defined for Google Pay payment method.

Sample Responses

Google 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="41" 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="41">
			<name>Google Pay</name>
			<prefixes>
				<prefix id="200">
					<min>-1</min>
					<max>-1</max>
				</prefix>
				<prefix id="202">
					<min>-1</min>
					<max>-1</max>
				</prefix>
			</prefixes>
			<url method="overlay"/>
			<head>&lt;script&gt;var baseRequest={apiVersion: 2, apiVersionMinor: 0 };var allowedCardAuthMethods=['PAN_ONLY','CRYPTOGRAM_3DS'];var allowedCardNetworks=['MASTERCARD','DISCOVER','VISA','AMEX'];var assuranceDetailsRequired=true;var tokenizationSpecification={type:'PAYMENT_GATEWAY',parameters:{'gateway':'cellpointmobile','gatewayMerchantId':'10106'}};var baseCardPaymentMethod={type:'CARD',parameters:{allowedAuthMethods:allowedCardAuthMethods,allowedCardNetworks:allowedCardNetworks,assuranceDetailsRequired:assuranceDetailsRequired}};var cardPaymentMethod=Object.assign({},baseCardPaymentMethod,{tokenizationSpecification:tokenizationSpecification});let paymentsClient=null;function getGoogleIsReadyToPayRequest(){return Object.assign({},baseRequest,{allowedPaymentMethods:[baseCardPaymentMethod]})} function getGooglePaymentDataRequest(){var paymentDataRequest=Object.assign({},baseRequest);paymentDataRequest.allowedPaymentMethods=[cardPaymentMethod];paymentDataRequest.transactionInfo=getGoogleTransactionInfo();paymentDataRequest.merchantInfo={ merchantName:'Virgin Holidays'};return paymentDataRequest} function getGooglePaymentsClient(){if(paymentsClient===null){return(new google.payments.api.PaymentsClient({environment:'TEST'}));}} function getGoogleTransactionInfo(){return{countryCode:'GB',currencyCode:'GBP',totalPriceStatus:'FINAL',totalPrice:'152.00'}}</head>
			<body>&lt;script async="true" src="https://myurl/js/googlepay.js"&gt;&lt;/script&gt; &lt;script async="true" src="https://pay.google.com/gp/p/js/pay.js"&gt;&lt;/script&gt;</body>
			<auth-token>Auth-Token</auth-token>
		</card>
	</wallets>
</root>

Google 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 cvc-length="-1" cvcmandatory="true" dcc="false" enabled="true" id="[Google Pay wallet type Id]" installment="0" max-length="-1" min-length="-1" payment-type="3" preferred="false" processor-type="3" psp-id="[ACQ ID]" state-id="1" type-id="[Google Pay wallet type Id]">
			<name>Google Pay</name>
			<prefixes>
				<prefix>
					<min>-1</min>
					<max>-1</max>
				</prefix>
				<prefix>
					<min>-1</min>
					<max>-1</max>
				</prefix>
			</prefixes>
			<url method="overlay"/>
			<hidden-fields>
				<card-brands>'VISA','MASTERCARD'</card-brands>
				<merchant-request-id>[transaction-id]</merchant-request-id>
				<gatewayMerchantId>[merchant-id]</gatewayMerchantId>
				<gateway>cellpointmobile</gateway>
				<tokenizationType>PAYMENT_GATEWAY</tokenizationType>
				<currency-code>PHP</currency-code>
				<amount>11232.00</amount>
				<environment>TEST</environment>
				<mode>1</mode>
				<payment-methods>'PAN_ONLY'</payment-methods>
				<countryCode>PH</countryCode>
				<merchantName>[Merchant Name]</merchantName>
			</hidden-fields>
			<return-url>[return url]</return-url>
        </card>
	</wallets>
</root>