AstropayCard Withdrawal

The following method IDs are covered in this section:

IDNameCredit/Debit State
365AstropayWithdrawalWithdrawnByProvider

Payment method interaction type: Synchronous execution (see Interaction Types).

❗️

Naming

Please note that the commercial name is Astropaycard withdrawal, but the payment method in the PXP payment service is AstropayWithdrawal (without "card"). This is to avoid confusion with card methods as the payment is related only to a wallet with a mobile phone number.

Redirect Integration

Currently not supported.

Check if app is installed?

The merchant can check if the user has installed the Astropaycard app on his mobile phone by sending a validatePaymentAccountRequest.

Sample validatePaymentAccountRequest:

<?xml version="1.0" encoding="utf-16"?>
<validatePaymentAccountRequest xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema">
  <merchantID>B2BTestMerchant</merchantID>
  <paymentAccountTypeID>18</paymentAccountTypeID>
  <paymentMethodID>365</paymentMethodID>
  <paymentProviderID>152</paymentProviderID>
  <specificPaymentAccountData>
    <data xmlns="http://www.cqrpayments.com/PaymentProcessing" xsi:type="keyStringValuePair">
      <key>AccountNumber</key>
      <value>59899473334</value>
    </data>
  </specificPaymentAccountData>
</validatePaymentAccountRequest>

Sample validatePaymentAccountResponse (App is installed):

<?xml version="1.0" encoding="utf-16"?>
<validatePaymentAccountResponse xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema">
	<statusCode>0</statusCode>
	<validationResults>
		<result xmlns="http://www.cqrpayments.com/PaymentProcessing" xsi:type="keyStringValuePair">
			<key>Code</key>
			<value>200</value>
		</result>
		<result xmlns:q2="http://www.cqrpayments.com/PaymentProcessing" xsi:type="keyStringValuePair">
			<key>Message</key>
			<value>SUCCESS</value>
		</result>
	</validationResults>
</validatePaymentAccountResponse>

Sample validatePaymentAccountResponse (User not found):

<?xml version="1.0" encoding="utf-16"?>
<validatePaymentAccountResponse xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema">
	<statusCode>1</statusCode>
	<validationResults>
		<result xmlns="http://www.cqrpayments.com/PaymentProcessing" xsi:type="keyStringValuePair">
			<key>Code</key>
			<value>201</value>
		</result>
		<result xmlns="http://www.cqrpayments.com/PaymentProcessing" xsi:type="keyStringValuePair">
			<key>Message</key>
			<value>User not found</value>
		</result>
	</validationResults>
</validatePaymentAccountResponse>

Sample validatePaymentAccountResponse (Error):

<?xml version="1.0" encoding="utf-16"?>
<validatePaymentAccountResponse xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema">
	<statusCode>2</statusCode>
	<validationResults>
		<result xmlns="http://www.cqrpayments.com/PaymentProcessing" xsi:type="keyStringValuePair">
			<key>Code</key>
			<value>300</value>
		</result>
		<result xmlns="http://www.cqrpayments.com/PaymentProcessing" xsi:type="keyStringValuePair">
			<key>Message</key>
			<value>Invalid merchant credentials</value>
		</result>
	</validationResults>
</validatePaymentAccountResponse>

Backend2BackendIntegration

The following table contains the fields to be sent in initiatePaymentRequest.specificPaymentAcountDataxml section:

key (value type, account type, required)value
AccountNumber
(string)
User mobile phone number. Include the calling code of the country and do not include "+" at the beginning

The following table contains the fields to be sent in initiatePaymentRequest.specificPaymentDataxml section:

key (value type, account type, required)value
FirstName (string)User´s FirstName.
LastName (string)User´s Lastname.
CountryCode2 (string)User´s country code.

Please note that sending data of the user is essential for this Payment Method as the data is sent to provider. The following parameters must be provided in initiatePaymentRequest.userData xml section:

key (value type, account type, required)value
IdentificationNumber
(string, required)
User document number.

Example initiatePaymentRequest:

<?xml version="1.0" encoding="utf-8"?> 
<initiatePaymentRequest xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns="http://www.cqrpayments.com/PaymentProcessing"> 
  <merchantID>Example</merchantID>
  <shopID>Example</merchantID>
	 <merchantTransactionID>fb367c9df-1-1</merchantTransactionID>
	<paymentMethodID>365</paymentMethodID> 
	<amount currencyCode="EUR">12.00</amount> 
	<userID>4806572e-11af-45d3-928b-acf9e2</userID> 
	<userData> 
		<username>cb931917-0b3c-4717-9df5-670416eae9f5</username> 
		<firstname>Patrick</firstname> 
		<lastname>Fitzgerald</lastname> 
		<address> 
			<street>Street</street> 
			<houseNumber>1</houseNumber> 
			<postalCode>12345</postalCode> 
			<city>Barcelona</city> 
			<countryCode2>SE</countryCode2> 
		</address> 
		<dateOfBirth>1990-01-20T00:00:00</dateOfBirth> 
		<identificationNumber>12345678909</identificationNumber> 
	</userData> 
	<userIP>127.0.0.1</userIP> 
	<userSessionID>7b53a946-9c9d-4a11-aebc-d0ab7e81d691</userSessionID> 
	<creationTypeID>1</creationTypeID> 
	<specificPaymentData> 
		<data xsi:type="keyStringValuePair"> 
			<key>FirstName</key> 
			<value>Patric</value> 
		</data> 
		<data xsi:type="keyStringValuePair"> 
			<key>LastName</key> 
			<value>Fitz</value> 
		</data> 
		<data xsi:type="keyStringValuePair"> 
			<key>CountryCode2</key> 
			<value>AT</value> 
		</data> 
	</specificPaymentData> 
	<paymentAccount> 
		<specificPaymentAccountData> 
			<data xsi:type="keyStringValuePair"> 
				<key>AccountNumber</key> 
				<value>59899473334</value> 
			</data> 
		</specificPaymentAccountData> 
	</paymentAccount> 
</initiatePaymentRequest>

Example intiatePaymentResponse:

<initiatePaymentResponse xmlns="http://www.cqrpayments.com/PaymentProcessing" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"> 
	<payment xsi:type="paymentWithPaymentAccount"> 
		<merchantID>Example</merchantID> 
		<shopID>Example</shopID> 
		<paymentMethod> 
			<key>365</key> 
			<value>AstropayWithdrawal</value> 
		</paymentMethod> 
		<merchantTransactionID>ProviderTesting_00015</merchantTransactionID> 
		<paymentID>7d09fcc8-05cc-4c0e-819d-516731c7ea85</paymentID> 
		<userID>4806572e-11af-45d3-928b-acf9e2</userID> 
		<paymentProvider> 
			<key>152</key> 
			<value>Astropay</value> 
		</paymentProvider> 
		<amount currencyCode="EUR">12.00</amount> 
		<creationType> 
			<key>1</key> 
			<value>User</value> 
		</creationType> 
		<userIP>127.0.0.1</userIP> 
		<state> 
			<id>ceae0c1a-a67f-427e-878e-48cb22737b03</id> 
			<definition> 
				<key>120</key> 
				<value>PendingOnProvider</value> 
			</definition> 
			<createdOn>2020-04-17T20:57:18.9006246Z</createdOn> 
			<paymentStateDetails> 
				<detail xsi:type="keyStringValuePair"> 
					<key>ProviderResponseCode</key> 
					<value>200</value> 
				</detail> 
				<detail xsi:type="keyStringValuePair"> 
					<key>ProviderResponseMessage</key> 
					<value>SUCCESS</value> 
				</detail> 
				<detail xsi:type="keyStringValuePair"> 
					<key>PaymentStateReasonID</key> 
					<value>1</value> 
				</detail> 
			</paymentStateDetails> 
		</state> 
		<isExecuted>false</isExecuted> 
		<baseAmount currencyCode="EUR">12</baseAmount> 
		<paymentDetails> 
			<detail xsi:type="keyStringValuePair"> 
				<key>ProviderTransactionID</key> 
				<value>26512</value> 
			</detail> 
			<detail xsi:type="keyStringValuePair"> 
				<key>ProviderExternalID</key> 
				<value>7d09fcc8-05cc-4c0e-819d-516731c7ea85</value> 
			</detail> 
		</paymentDetails> 
		<paymentAccount> 
			<paymentAccountID>2d202a01-7ee7-4808-88d4-fa33eaf0b965</paymentAccountID> 
		</paymentAccount> 
	</payment> 
</initiatePaymentResponse>

The provider notifies PXP Financial on payments that are either Successful (state WithdrawnByProvider) or Aborted (state AbortedOnProvider).

Payment StatesDescription
PendingOnProviderIntermediate state. Withdrawal request has been accepted by the provider.
WithdrawnByProviderSuccess state.
WithdrawErrorReportedByProviderPayment has been rejected by the provider. A provider response code is being logged.
AbortedOnProviderThe user did not install the Astropaycard app on his mobile phone. This state is reached if the user did not download & install the app within 24 hours.

Notifications

Example handlePaymentStateChangedNotificationRequest:

<?xml version="1.0" encoding="utf-8"?> 
<handlePaymentStateChangedNotificationRequest xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns="http://www.cqrpayments.com/PaymentProcessing"> 
	<payment xsi:type="paymentWithPaymentAccount"> 
		<merchantID/> 
		<shopID/> 
		<paymentMethod> 
			<key>365</key> 
			<value>AstropayWithdrawal</value> 
		</paymentMethod> 
		<merchantTransactionID>ProviderTesting_00015</merchantTransactionID> 
		<paymentID>b033f227-ae7a-452f-af03-d3722364c6f0</paymentID> 
		<userID>669801cb-0ad9-413b-818d-cf5707</userID> 
		<paymentProvider> 
			<key>152</key> 
			<value>Astropay</value> 
		</paymentProvider> 
		<amount currencyCode="USD">16.2300</amount> 
		<creationType> 
			<key>1</key> 
			<value>User</value> 
		</creationType> 
		<userIP>127.0.0.1</userIP> 
		<state> 
			<id>1b379b59-68fd-4124-a774-8067d4a5eacb</id> 
			<definition> 
				<key>397</key> 
				<value>AbortedOnProvider</value> 
			</definition> 
			<createdOn>2020-04-21T12:06:07.883</createdOn> 
			<paymentStateDetails> 
				<detail xsi:type="keyStringValuePair"> 
					<key>ProviderResponseCode</key> 
					<value>CANCELED</value> 
				</detail> 
				<detail xsi:type="keyIntValuePair"> 
					<key>PaymentStateReasonID</key> 
					<value>1</value> 
				</detail> 
			</paymentStateDetails> 
		</state> 
		<isExecuted>false</isExecuted> 
		<baseAmount currencyCode="EUR">12.1900</baseAmount> 
		<paymentDetails> 
			<detail xsi:type="keyStringValuePair"> 
				<key>ProviderExternalID</key> 
				<value>b033f227-ae7a-452f-af03-d3722364c6f0</value> 
			</detail> 
			<detail xsi:type="keyStringValuePair"> 
				<key>ProviderTransactionID</key> 
				<value>230484</value> 
			</detail> 
		</paymentDetails> 
		<paymentAccount> 
			<paymentAccountID>a0a5f0db-2d32-457e-948f-f8690cfbe1ba</paymentAccountID> 
		</paymentAccount> 
	</payment> 
</handlePaymentStateChangedNotificationRequest>