Card Redirect Deposits (via Astropay)

Credit card redirect payment methods apply when a user is redirected to an external provider to enter credit card details there.

This set of payment methods is only available for provider Astropay.

Credit card payments through Astropay are 3D Secure payment.

The following method IDs are covered in this section:

IDNameCredit/Debit StateReversal State
256VisaRedirectDepositDepositedByProvider (29)
257ECMCRedirectDepositDepositedByProvider (29)
258AMEXRedirectDepositDepositedByProvider (29)
259JCBRedirectDepositDepositedByProvider (29)
260ELORedirectDepositDepositedByProvider (29)
261DinersRedirectDepositDepositedByProvider (29)
262AuraRedirectDepositDepositedByProvider (29)
263DiscoverRedirectDepositDepositedByProvider (29)

Payment method interaction type: Redirection to External Payment Provider (see Interaction Types).

Redirect Integration

Currently not supported.

Backend2BackendIntegration

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

key (value type, account type, required)value
PaymentDescription
(string)
Description of the payment
SuccessPageUrl
(string, required)
URL, to which the client will be transferred in case that he confirms the payment

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
Firstname
(string, required)
The user’s first name
Lastname
(string, required)
The user’s last name
Email
(string, required)
The user’s email address
IdentificationNumber
(string, required)
The user’s identification number, CPF or CNPJ in Brasil. CC for Columbia.
telephoneNumber (string, required only for Columbia)For Columbia, the mobile phone number needs to be provided here. Optional for all other countries and can thus be omitted.

Example initiatePaymentRequest:

<?xml version="1.0" encoding="utf-8"?>
<initiatePaymentRequest xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://www.cqrpayments.com/PaymentProcessing">
       <merchantID>B2BTestMerchant</merchantID>
       <shopID>AstropayCardDepositShop</shopID>
       <merchantTransactionID>6d09744e-0e7d-4621-b2a2-4f494389b4fc</merchantTransactionID>
       <paymentMethodID>256</paymentMethodID>
       <amount currencyCode="BRL">10.01</amount>
       <userID>dd25d984-aa20-49ab-b473-3ea32b</userID>
       <userData>
             <username>dd25d984-aa20-49ab-b473-3ea32b</username>
             <firstname>John</firstname>
             <lastname>Doe</lastname>
             <email>[email protected]</email>
             <address>
                    <street>1225 Bonavita St.</street>
                    <postalCode>11300</postalCode>
                    <city>Sao Paulo</city>
                    <state>MO</state>
                    <countryCode2>BR</countryCode2>
               <telephoneNumber>0123456789</telephoneNumber>
             </address>
             <dateOfBirth>1955-02-15T00:00:00</dateOfBirth>
             <identificationNumber>7b436f6c-a792-46f4-bb77-28cbdb5a3fcb</identificationNumber>
       </userData>
       <userIP>127.0.0.1</userIP>
       <userSessionID>c877bd01-362b-4405-8007-d28a4d874487</userSessionID>
       <creationTypeID>1</creationTypeID>
       <specificPaymentData>
             <data xsi:type="keyStringValuePair">
                    <key>SuccessPageUrl</key>
                    <value>http://success/?a=b&amp;c=d</value>
             </data>
             <data xsi:type="keyStringValuePair">
                    <key>PaymentDescription</key>
                    <value>Description text, maximum 200 characters.</value>
             </data>
       </specificPaymentData>
</initiatePaymentRequest>

Example intiatePaymentResponse:

<?xml version="1.0" encoding="utf-8"?>
<initiatePaymentResponse xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://www.cqrpayments.com/PaymentProcessing">
       <payment xsi:type="paymentWithPaymentAccount">
             <merchantID>B2BTestMerchant</merchantID>
             <shopID>AstropayCardDepositShop</shopID>
             <paymentMethod>
                    <key>256</key>
                    <value>VISA Redirect Deposit</value>
             </paymentMethod>
             <merchantTransactionID>6d09744e-0e7d-4621-b2a2-4f494389b4fc</merchantTransactionID>
             <paymentID>3ce78eab-a7ba-4dc9-8e43-ef856cde8370</paymentID>
             <userID>dd25d984-aa20-49ab-b473-3ea32b</userID>
             <paymentProvider>
                    <key>152</key>
                    <value>Astropay</value>
             </paymentProvider>
             <amount currencyCode="BRL">10.01</amount>
             <creationType>
                    <key>1</key>
                    <value>User</value>
             </creationType>
             <userIP>127.0.0.1</userIP>
             <state>
                    <id>e134e689-90c9-4d02-beef-580bc5400dc9</id>
                    <definition>
                           <key>30</key>
                           <value>RedirectURLCreated</value>
                    </definition>
                    <createdOn>2017-07-20T09:45:38.3467225Z</createdOn>
                    <description>http://example.com/WebMockProviders/AstropayFrontend/Index?x_invoice=3ce78eab-a7ba-4dc9-8e43-ef856cde8370</description>
                    <paymentStateDetails>
                           <detail xsi:type="keyStringValuePair">
                                  <key>RedirectionUrl</key>
                                  <value>http://example.com/WebMockProviders/AstropayFrontend/Index?x_invoice=3ce78eab-a7ba-4dc9-8e43-ef856cde8370</value>
                           </detail>
                           <detail xsi:type="keyStringValuePair">
                                  <key>PaymentStateReasonID</key>
                                  <value>1</value>
                           </detail>
                    </paymentStateDetails>
             </state>
             <isExecuted>false</isExecuted>
             <baseAmount currencyCode="EUR">9.1</baseAmount>
             <paymentDetails>
                    <detail xsi:type="keyStringValuePair">
                           <key>ProviderExternalID</key>
                           <value>3ce78eab-a7ba-4dc9-8e43-ef856cde8370</value>
                    </detail>
                    <detail xsi:type="keyStringValuePair">
                           <key>ProviderTransactionID</key>
                           <value>93081515</value>
                    </detail>
             </paymentDetails>
             <paymentAccount>
                    <paymentAccountID>0</paymentAccountID>
             </paymentAccount>
       </payment>
</initiatePaymentResponse>

Refund

For refunds of card redirect deposits, please refer to Card Redirect Refunds.

Notifications

handlePaymentStateChangedNotificationRequest

The provider notifies PXP Financial on payments that are either Successful (state DepositedByProvider), Declined (state RefusedByProvider).

Payment StatesDescription
DepositedByProvider Success state.
RefusedByProvider Payment has been rejected by the provider.

Example handlePaymentStateChangedNotificationRequest:

<?xml version="1.0" encoding="utf-8"?>
<handlePaymentStateChangedNotificationRequest xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://www.cqrpayments.com/PaymentProcessing">
	<payment xsi:type="paymentWithPaymentAccount">
		<merchantID>YourMerchant</merchantID>
		<shopID>YourShop</shopID>
		<paymentMethod>
			<key>256</key>
			<value>VisaRedirectDeposit</value>
		</paymentMethod>
		<merchantTransactionID>2b7ff9ea-ce3e-4bb7-9dae-198305ea90ea</merchantTransactionID>
		<paymentID>b1c56d25-8d58-4b0b-8670-18d7a045971d</paymentID>
		<userID>b258b5ea-4dcb-4b3d-b191-58f977</userID>
		<paymentProvider>
			<key>152</key>
			<value>Astropay</value>
		</paymentProvider>
		<amount currencyCode="EUR">15.0000</amount>
		<creationType>
			<key>1</key>
			<value>User</value>
		</creationType>
		<userIP>127.0.0.1</userIP>
		<state>
			<id>c74a70b0-304f-4a3b-9c9a-24be5b628c1b</id>
			<definition>
				<key>29</key>
				<value>DepositedByProvider</value>
			</definition>
			<createdOn>2017-07-11T16:07:27.743</createdOn>
			<description>9</description>
			<paymentStateDetails xsi:nil="true" />
		</state>
		<isExecuted>true</isExecuted>
		<baseAmount currencyCode="EUR">15.0000</baseAmount>
		<paymentDetails>
			<detail xsi:type="keyStringValuePair">
				<key>ProviderExternalID</key>
				<value>b1c56d25-8d58-4b0b-8670-18d7a045971d</value>
			</detail>
			<detail xsi:type="keyStringValuePair">
				<key>ProviderTransactionID</key>
				<value>93081515</value>
			</detail>
		</paymentDetails>
		<paymentAccount>
			<paymentAccountID>0</paymentAccountID>
		</paymentAccount>
	</payment>
</handlePaymentStateChangedNotificationRequest>

Note: a handlePaymentStateChangedNotificationRequest for unsuccessful (RefusedByProvider) payments will be added.

Chargebacks

If chargebacks occur, the following notification will be send to the merchant:

<?xml version="1.0" encoding="utf-16"?>
<handlePaymentStateChangedNotificationRequest xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
  <payment xmlns="http://www.cqrpayments.com/PaymentProcessing" xsi:type="paymentWithPaymentAccount">
    <merchantID>YourMerchantID</merchantID>
    <shopID>YourShopID</shopID>
    <paymentMethod>
      <key>257</key>
      <value>ECMC Redirect Deposit</value>
    </paymentMethod>
    <merchantTransactionID>4232f0d7-fc44-4a62-b959-31e773c18f9f</merchantTransactionID>
    <paymentID>aa5204a9-3d7d-4671-b510-37db457c96fd</paymentID>
    <userID>966fb701-9634-41a5-a63e-c26b9d</userID>
    <paymentProvider>
      <key>152</key>
      <value>Astropay</value>
    </paymentProvider>
    <amount currencyCode="TRY">2899.9900</amount>
    <creationType>
      <key>6</key>
      <value>Provider</value>
    </creationType>
    <state>
      <id>4d5de45f-a81a-4ad4-a59f-65f8019118ea</id>
      <definition>
        <key>118</key>
        <value>ChargedBackByProvider</value>
      </definition>
      <createdOn>2018-05-18T14:10:19.127</createdOn>
      <paymentStateDetails xsi:nil="true" />
    </state>
    <isExecuted>true</isExecuted>
    <baseAmount currencyCode="EUR">1129.2400</baseAmount>
    <paymentDetails>
      <detail xsi:type="keyStringValuePair">
        <key>ProviderExternalID</key>
        <value>aa5204a9-3d7d-4671-b510-37db457c96fd</value>
      </detail>
      <detail xsi:type="keyIntValuePair">
        <key>SettlementCurrencyCode</key>
        <value>840</value>
      </detail>
      <detail xsi:type="keyIntValuePair">
        <key>MerchantSettlementCurrencyID</key>
        <value>2</value>
      </detail>
      <detail xsi:type="keyDecimalValuePair">
        <key>SettlementAmount</key>
        <value>812.000000000</value>
      </detail>
      <detail xsi:type="keyStringValuePair">
        <key>OriginalPaymentID</key>
        <value>aa5204a9-3d7d-4671-b510-37db457c96fd</value>
      </detail>
      <detail xsi:type="keyStringValuePair">
        <key>OriginalPaymentMerchantTransactionID</key>
        <value>4232f0d7-fc44-4a62-b959-31e773c18f9f</value>
      </detail>
      <detail xsi:type="keyStringValuePair">
        <key>OriginalPaymentMethodID</key>
        <value>257</value>
      </detail>
      <detail xsi:type="keyStringValuePair">
        <key>OriginalPaymentMethodName</key>
        <value>ECMC Redirect Deposit</value>
      </detail>
    </paymentDetails>
    <paymentAccount>
      <paymentAccountID>0</paymentAccountID>
    </paymentAccount>
  </payment>
</handlePaymentStateChangedNotificationRequest>

Astropay error codes

ProviderResponseCodeProviderResponseMessage and Action
300Invalid params + [param name] - Ask the user to re-enter the information related to that parameter.
301Empty params + [param name] - The parameter must be included in the request and must not be empty. If the parameter contains information filled by the user, ask the user to fill the information. If the parameter is filled automatically on the merchant's side (x_login, x_trans_key, x_invoice, x_iduser or control), there is an integration error. Please include this parameter in the request.
302Invalid control string - Integration problem. Control string instructions.
401Invalid credentials - Integration problem. Check in the merchant's panel which are the correct credentials. Remember Sandbox and Production credentials are different.
402Unregistered IP address - Whitelist the IP in the merchant's panel in the section Credentials & Settings. If there are no more fields, please contact us.
515Invalid amount - Ask the user to re-enter the amount.
516Invalid invoice - For functions: newInvoice and refund, it means the invoice already exists. For functions: payment status and refund status, it means the invoice was not found.
517Invalid document number - Ask the user to re-enter his document.
520Insufficient funds - The refund could not be processed due to insufficient funds. Contact us to increase the balance.