ToditoCash - Withdrawal (via Astropay)

Provider directa24 (Astropay) offers bank transfer withdrawal for various countries in Latin America.
This page provides a description for the Mexicanpayment method ToditoCash withdrawal.

See also: Astropay BankTransfer Withdrawal

The following method IDs are covered in this section:

IDNameCredit/Debit State
265AstropayBankTransferWithdrawalWithdrawnByProvider

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

Payments are submitted to directa24 (Astropay) - when being submitted successfully, the state is updated to InitiatedByProvider, else to WithdrawErrorReportedByProvider for an error or to RefusedByProvider for a rejected payment. In the later case, the values ProviderErrorMessage and ProviderErrorCode are logged.

Submitted payments are sent by directa24 to the bank. Once they are confirmed by the bank, directa24 sends a notification to PXP Financial. PXP Financial queries the directa24 system for the status of the payment and update the payment state on PXP Financial side.

Redirect Integration

Currently not supported.

Backend2BackendIntegration

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

key (value type, account type, required)value
CurrencyCode
(string, required)
currency code MXN
BankCountryCode2 (string, required)country code, e.g. MX
AccountNumber (string, required)Bank account number for ToditoCash, 10 digits long, eg. "2682883311"
BankSortCode (string, required)Bank code
10000 for ToditoCash Withdrawal
AccountOwnerAddress (string, optional)Address of bank account owner (optional)
AccountOwner (string, mandatory)Account owner name (mandatory)

The following parameters can be provided in initiatePaymentRequest.specificPaymentData:

key (value type, account type, required)value
PaymentProviderID
(Int)
Provider ID - default value 152
UserFirstName (string)Beneficiary´s first name (optional, if not provided will be taken from user.details)
UserLastName (string)Beneficiary´s last name (optional, if not provided will be taken from user.details)

The following parameters have to passed in initiatePaymentRequest.UserData:

key (value type, account type, required)value
identificationNumber (string, required)Identification number

Data Validation

identificationNumberCURP / RFC / IFE / PASS / Residencia
Length between 8 and 18 inclusive

Requests/Responses

Example initiatePaymentRequest (for ToditoCash Withdrawal)

<initiatePaymentRequest xmlns="http://www.cqrpayments.com/PaymentProcessing"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:xsd="http://www.w3.org/2001/XMLSchema">
	<merchantID>DemoMerchant</merchantID>
	<shopID>DemoShop</shopID>
	<merchantTransactionID>59715590-12-18-116</merchantTransactionID>
	<paymentMethodID>265</paymentMethodID>
	<amount currencyCode="MXN">1200.00</amount>
	<userID>demouser</userID>
	<userData>
		<username>demouser</username>
		<firstname>Firstname</firstname>
		<lastname>Lastname</lastname>
		<email>[email protected]</email>
		<address>
			<countryCode2>MX</countryCode2>
		</address>
		<dateOfBirth>1955-02-15T00:00:00</dateOfBirth>
		<identificationNumber>MUMM730415HDFSSX02</identificationNumber>
	</userData>
	<userIP>179.108.166.2</userIP>
	<userSessionID>59715590</userSessionID>
	<creationTypeID>1</creationTypeID>
	<specificPaymentData>
		<data xsi:type="keyIntValuePair">
			<key>PaymentProviderID</key>
			<value>152</value>
		</data>
		<data xsi:type="keyStringValuePair">
			<key>UserFirstname</key>
			<value>John</value>
		</data>
		<data xsi:type="keyStringValuePair">
			<key>UserLastname</key>
			<value>Doe</value>
		</data>
	</specificPaymentData>
	<paymentAccount>
		<specificPaymentAccountData>
			<data xsi:type="keyStringValuePair">
				<key>CurrencyCode</key>
				<value>MXN</value>
			</data>
			<data xsi:type="keyStringValuePair">
				<key>BankCountryCode2</key>
				<value>MX</value>
			</data>
			<data xsi:type="keyStringValuePair">
				<key>AccountNumber</key>
				<value>2682883311</value>
			</data>
			<data xsi:type="keyStringValuePair">
				<key>BankSortCode</key>
				<value>10000</value>
			</data>
		</specificPaymentAccountData>
	</paymentAccount>
</initiatePaymentRequest>

Example initiatePaymentResponse (for ToditoCash Withdrawal):

<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>DemoMerchant</merchantID>
		<shopID>DemoShop</shopID>
		<paymentMethod>
			<key>265</key>
			<value>AstropayBankTransferWithdrawal</value>
		</paymentMethod>
		<merchantTransactionID>59715590-12-18-116</merchantTransactionID>
		<paymentID>2238e38b-53bd-482d-ba7e-8102cdfb6fa7</paymentID>
		<userID>demouser</userID>
		<paymentProvider>
			<key>152</key>
			<value>Astropay</value>
		</paymentProvider>
		<amount currencyCode="MXN">1200.00</amount>
		<creationType>
			<key>1</key>
			<value>User</value>
		</creationType>
		<userIP>179.108.166.2</userIP>
		<state>
			<id>77a36add-7f9d-4cfd-9c02-575396afe8f3</id>
			<definition>
				<key>3</key>
				<value>InitiatedByProvider</value>
			</definition>
			<createdOn>2022-08-08T14:51:59.8507996Z</createdOn>
			<paymentStateDetails>
				<detail xsi:type="keyStringValuePair">
					<key>ProviderResponseMessage</key>
					<value>OK</value>
				</detail>
				<detail xsi:type="keyStringValuePair">
					<key>PaymentStateReasonID</key>
					<value>1</value>
				</detail>
			</paymentStateDetails>
		</state>
		<isExecuted>false</isExecuted>
		<baseAmount currencyCode="EUR">55.49</baseAmount>
		<paymentDetails>
			<detail xsi:type="keyStringValuePair">
				<key>UserFirstname</key>
				<value>John</value>
			</detail>
			<detail xsi:type="keyStringValuePair">
				<key>UserLastname</key>
				<value>Doe</value>
			</detail>
			<detail xsi:type="keyStringValuePair">
				<key>ProviderTransactionID</key>
				<value>98496</value>
			</detail>
			<detail xsi:type="keyStringValuePair">
				<key>ProviderExternalID</key>
				<value>12808</value>
			</detail>
		</paymentDetails>
		<paymentAccount>
			<paymentAccountID>a190b19f-716a-4983-9d37-010345489a60</paymentAccountID>
		</paymentAccount>
	</payment>
</initiatePaymentResponse>

The payment can reach one of the following states in the initiatePaymentResponse:

Payment StatesDescription
InitiatedByProviderIntermediate state denoting a successful payment submission at provider
WithdrawalErrorReportedByProviderError state due to failed payment submission at provider; errors are logged in the PaymentStateAdditionalDetails fields ProviderErrorCode and ProviderErrorMessage
RefusedByProviderError state for a rejected payment; errors are logged in the PaymentStateAdditionalDetails field ProviderReturnCode

InitiatePaymentRequest and -response leading to WithdrawalErrorReportedByProvider:

<initiatePaymentRequest xmlns="http://www.cqrpayments.com/PaymentProcessing"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:xsd="http://www.w3.org/2001/XMLSchema">
	<merchantID>DemoMerchant</merchantID>
	<shopID>DemoShop</shopID>
	<merchantTransactionID>59715590-12-18-122</merchantTransactionID>
	<paymentMethodID>265</paymentMethodID>
	<amount currencyCode="MXN">2200.00</amount>
	<userID>demouser_MXN22</userID>
	<userData>
		<username>demouser_MXN22</username>
		<firstname>Demo</firstname>
		<lastname>User</lastname>
		<email>[email protected]</email>
		<address>
			<countryCode2>MX</countryCode2>
		</address>
		<dateOfBirth>1955-02-15T00:00:00</dateOfBirth>
		<identificationNumber>3</identificationNumber>
	</userData>
	<userIP>179.108.166.2</userIP>
	<userSessionID>59715590</userSessionID>
	<creationTypeID>1</creationTypeID>
	<specificPaymentData>
		<data xsi:type="keyIntValuePair">
			<key>PaymentProviderID</key>
			<value>152</value>
		</data>
		<data xsi:type="keyStringValuePair">
			<key>UserFirstname</key>
			<value>John</value>
		</data>
		<data xsi:type="keyStringValuePair">
			<key>UserLastname</key>
			<value>Doe</value>
		</data>
	</specificPaymentData>
	<paymentAccount>
		<specificPaymentAccountData>
			<data xsi:type="keyStringValuePair">
				<key>CurrencyCode</key>
				<value>MXN</value>
			</data>
			<data xsi:type="keyStringValuePair">
				<key>BankCountryCode2</key>
				<value>MX</value>
			</data>
			<data xsi:type="keyStringValuePair">
				<key>AccountNumber</key>
				<value>2682883311</value>
			</data>
			<data xsi:type="keyStringValuePair">
				<key>BankSortCode</key>
				<value>10000</value>
			</data>
		</specificPaymentAccountData>
	</paymentAccount>
</initiatePaymentRequest>
<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>DemoMerchant</merchantID>
		<shopID>DemoShop</shopID>
		<paymentMethod>
			<key>265</key>
			<value>AstropayBankTransferWithdrawal</value>
		</paymentMethod>
		<merchantTransactionID>59715590-12-18-122</merchantTransactionID>
		<paymentID>aa0a15f1-a1b8-4681-a603-379fb5719d98</paymentID>
		<userID>demouser_MXN22</userID>
		<paymentProvider>
			<key>152</key>
			<value>Astropay</value>
		</paymentProvider>
		<amount currencyCode="MXN">2200.00</amount>
		<creationType>
			<key>1</key>
			<value>User</value>
		</creationType>
		<userIP>179.108.166.2</userIP>
		<state>
			<id>2ac05b35-988f-4b79-a983-eb5830d963a0</id>
			<definition>
				<key>21</key>
				<value>WithdrawErrorReportedByProvider</value>
			</definition>
			<createdOn>2022-08-08T15:04:18.0718971Z</createdOn>
			<description>Unexpected status '1' received from the provider. Expected results are 0 (Initiated), 3 (Refused).</description>
			<paymentStateDetails>
				<detail xsi:type="keyStringValuePair">
					<key>ProviderErrorMessage</key>
					<value>document_id: Invalid document</value>
				</detail>
				<detail xsi:type="keyStringValuePair">
					<key>ProviderErrorCode</key>
					<value>300</value>
				</detail>
				<detail xsi:type="keyStringValuePair">
					<key>PaymentStateReasonID</key>
					<value>1</value>
				</detail>
			</paymentStateDetails>
		</state>
		<isExecuted>false</isExecuted>
		<baseAmount currencyCode="EUR">101.73</baseAmount>
		<paymentDetails>
			<detail xsi:type="keyStringValuePair">
				<key>UserFirstname</key>
				<value>John</value>
			</detail>
			<detail xsi:type="keyStringValuePair">
				<key>UserLastname</key>
				<value>Doe</value>
			</detail>
			<detail xsi:type="keyStringValuePair">
				<key>ProviderExternalID</key>
				<value>12814</value>
			</detail>
		</paymentDetails>
		<paymentAccount>
			<paymentAccountID>5d26fabc-03b2-4478-9cb2-dbcf43c4cb0c</paymentAccountID>
		</paymentAccount>
	</payment>
</initiatePaymentResponse>

Submitted payments are sent by directa24 to ToditoCash. Once they are completed, directa24 sends a notification to PXP Financial. PXP Financial queries the provider system for the status of the payment and update the payment state on PXP Financial side.

An AstropayBankTransferWithdrawal payment of ToditoCash Withdrawal **will have the following flow (described in provider terms and PXP Financial payment service states):

PENDING (state InitiatedByProvider) => DELIVERED (state PendingOnProvider) => CONFIRMED (state WithdrawnByProvider) or REJECTED (state RefusedByProvider).

Payment StatesDescription
PendingOnProviderA withdrawal payment has been sent to provider ("Delivered"), but not yet processed and it still can be rejected
WithdrawnByProviderSuccess state
RefusedByProviderError state due to failed processing of payment; errors are logged in the PaymentStateAdditionalDetails fields ProviderErrorCode and ProviderErrorMessage
QueryPaymentStateErrorReportedByProviderWhen PXP Financial receives a state change notification from provider directa24, the state of the payment is being queried against provider. When an error occurs, errors are logged in the PaymentStateAdditionalDetails fields ProviderErrorCode and ProviderErrorMessage

Notifications

The standard notification mechanism is used for notifying the merchant in the background (asynchronously) about payment state changes. For more information see PaymentStateChangedNotification.

Example handlePaymentStateChangedNotificationRequest for WithdrawnByProvider:

<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>DemoMerchant</merchantID>
    <shopID>DemoShop</shopID>
    <paymentMethod>
      <key>265</key>
      <value>AstropayBankTransferWithdrawal</value>
    </paymentMethod>
    <merchantTransactionID>17593196-f44f-4b1e-92e8-474d8e88710d</merchantTransactionID>
    <paymentID>c2c83321-1466-4af7-bde3-d84418f9b991</paymentID>
    <userID>12b140b5-35ee-4a83-9f87-9d4405</userID>
    <paymentProvider>
      <key>152</key>
      <value>Astropay</value>
    </paymentProvider>
    <amount currencyCode="MXN">1000.0000</amount>
    <creationType>
      <key>1</key>
      <value>User</value>
    </creationType>
    <userIP>127.0.0.1</userIP>
    <state>
      <id>6ca51370-bac8-42da-8121-1627a34289cd</id>
      <definition>
        <key>20</key>
        <value>WithdrawnByProvider</value>
      </definition>
      <createdOn>2017-09-08T09:58:29.783</createdOn>
      <paymentStateDetails>
        <detail xsi:type="keyStringValuePair">
          <key>ProviderResponseMessage</key>
          <value>Completed</value>
        </detail>
      </paymentStateDetails>
    </state>
    <isExecuted>true</isExecuted>
    <baseAmount currencyCode="EUR">2.6500</baseAmount>
    <paymentDetails>
      <detail xsi:type="keyStringValuePair">
        <key>ProviderExternalID</key>
        <value>c2c83321-1466-4af7-bde3-d84418f9b991</value>
      </detail>
      <detail xsi:type="keyStringValuePair">
        <key>BankReferenceID</key>
        <value>513512.04198.5</value>
      </detail>
      <detail xsi:type="keyStringValuePair">
        <key>ProviderTransactionID</key>
        <value>8ef0c159-966e-43e1-a0ba-62661d72fc47</value>
      </detail>
    </paymentDetails>
    <paymentAccount>
      <paymentAccountID>d52b9f0e-55b3-4011-a5e7-3935c6388958</paymentAccountID>
    </paymentAccount>
  </payment>
</handlePaymentStateChangedNotificationRequest>

Example handlePaymentStateChangedRequest for QueryPaymentStateErrorReportedByProvider:

<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>B2BTestMerchant</merchantID>
    <shopID>AstropayCardBankTransferWithdrawalShop</shopID>
    <paymentMethod>
      <key>265</key>
      <value>AstropayBankTransferWithdrawal</value>
    </paymentMethod>
    <merchantTransactionID>17593196-f44f-4b1e-92e8-474d8e88710d</merchantTransactionID>
    <paymentID>c2c83321-1466-4af7-bde3-d84418f9b991</paymentID>
    <userID>12b140b5-35ee-4a83-9f87-9d4405</userID>
    <paymentProvider>
      <key>152</key>
      <value>Astropay</value>
    </paymentProvider>
    <amount currencyCode="BRL">10.0000</amount>
    <creationType>
      <key>1</key>
      <value>User</value>
    </creationType>
    <userIP>127.0.0.1</userIP>
    <state>
      <id>6ca51370-bac8-42da-8121-1627a34289cd</id>
      <definition>
        <key>507</key>
        <value>QueryPaymentStateErrorReportedByProvider</value>
      </definition>
      <createdOn>2017-09-08T09:58:29.783</createdOn>
    </state>
    <isExecuted>true</isExecuted>
    <baseAmount currencyCode="EUR">2.6500</baseAmount>
    <paymentDetails>
      <detail xsi:type="keyStringValuePair">
        <key>ProviderExternalID</key>
        <value>32177540</value>
      </detail>
      <detail xsi:type="keyStringValuePair">
        <key>ProviderTransactionID</key>
        <value>11614940</value>
      </detail>
    </paymentDetails>
    <paymentAccount>
      <paymentAccountID>d52b9f0e-55b3-4011-a5e7-3935c6388958</paymentAccountID>
    </paymentAccount>
  </payment>
</handlePaymentStateChangedNotificationRequest>

**Example handlePaymentStateChangedRequest for RefusedByProvider:

<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>B2BTestMerchant</merchantID>
    <shopID>AstropayCardBankTransferWithdrawalShop</shopID>
    <paymentMethod>
      <key>265</key>
      <value>AstropayBankTransferWithdrawal</value>
    </paymentMethod>
    <merchantTransactionID>17593196-f44f-4b1e-92e8-474d8e88710d</merchantTransactionID>
    <paymentID>c2c83321-1466-4af7-bde3-d84418f9b991</paymentID>
    <userID>12b140b5-35ee-4a83-9f87-9d4405</userID>
    <paymentProvider>
      <key>152</key>
      <value>Astropay</value>
    </paymentProvider>
    <amount currencyCode="MXN">1000.0000</amount>
    <creationType>
      <key>1</key>
      <value>User</value>
    </creationType>
    <userIP>127.0.0.1</userIP>
    <state>
      <id>6ca51310-bac8-42da-8121-1627a34289cd</id>
      <definition>
        <key>20</key>
        <value>RefusedByProvider</value>
      </definition>
      <createdOn>2017-09-08T09:58:29.783</createdOn>
	  <paymentStateDetails>
                <detail xsi:type="keyStringValuePair">
                    <key>ProviderResponseMessage</key>
                    <value>Rejected</value>
                </detail>
                <detail xsi:type="keyStringValuePair">
                    <key>ProviderStatusMessage</key>
                    <value>0</value>
                </detail>
            </paymentStateDetails>
    </state>
    <isExecuted>true</isExecuted>
    <baseAmount currencyCode="EUR">2.6500</baseAmount>
    <paymentDetails>
      <detail xsi:type="keyStringValuePair">
        <key>ProviderExternalID</key>
        <value>32177540</value>
      </detail>
      <detail xsi:type="keyStringValuePair">
        <key>ProviderTransactionID</key>
        <value>11614940</value>
      </detail>
    </paymentDetails>
    <paymentAccount>
      <paymentAccountID>d52b9f0e-55b3-4011-a5e7-3935c6388958</paymentAccountID>
    </paymentAccount>
  </payment>
</handlePaymentStateChangedNotificationRequest>

Testing instructions

Identification Numbers

CountryIdentificationNumber (sample values for testing)Notes
MXNFor CURP eg. MUMM730415HDFSSX02Please search online for "CURP generator"

Returns

A new payment of type BankTransferWithdrawalReturn is created and merchant is notified.

The notification can be sent for payment method BankTransferWithdrawal with state ReturnedByProvider or for payment method BankTransferWithdrawalReturn with state ReturnedByProvider.

Sample notification with payment method BankTransferWithdrawal:

<?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>DemoMerchant</merchantID>
        <shopID>DemoShop</shopID>
        <paymentMethod>
            <key>265</key>
            <value>AstropayBankTransferWithdrawal</value>
        </paymentMethod>
        <merchantTransactionID>e2934084-ce2d-4d57-bd0f-81a0983fbf49</merchantTransactionID>
        <paymentID>de6524a5-44c8-440e-8fb9-bda0ccf59301</paymentID>
        <userID>f782088e-0d3e-402b-9143-359be4</userID>
        <paymentProvider>
            <key>152</key>
            <value>Astropay</value>
        </paymentProvider>
        <amount currencyCode="MXN">1000.0000</amount>
        <creationType>
            <key>1</key>
            <value>User</value>
        </creationType>
        <state>
            <id>434bae34-630a-4b6f-9c00-faa0c5c5adf2</id>
            <definition>
                <key>279</key>
                <value>ReturnedByProvider</value>
            </definition>
            <createdOn>2021-04-07T15:40:31.79</createdOn>
            <paymentStateDetails>
                <detail xsi:type="keyStringValuePair">
                    <key>ProviderResponseMessage</key>
                    <value>Rejected</value>
                </detail>
            </paymentStateDetails>
        </state>
        <isExecuted>true</isExecuted>
        <baseAmount currencyCode="EUR">20.6600</baseAmount>
        <paymentDetails>
            <detail xsi:type="keyStringValuePair">
                <key>ProviderExternalID</key>
                <value>de6524a5-44c8-440e-8fb9-bda0ccf59301</value>
            </detail>
            <detail xsi:type="keyIntValuePair">
                <key>MerchantSettlementCurrencyID</key>
                <value>2</value>
            </detail>
            <detail xsi:type="keyStringValuePair">
                <key>OriginalPaymentID</key>
                <value>de6524a5-44c8-440e-8fb9-bda0ccf59301</value>
            </detail>
            <detail xsi:type="keyStringValuePair">
                <key>OriginalPaymentMerchantTransactionID</key>
                <value>e2934084-ce2d-4d57-bd0f-81a0983fbf49</value>
            </detail>
            <detail xsi:type="keyStringValuePair">
                <key>OriginalPaymentMethodID</key>
                <value>265</value>
            </detail>
            <detail xsi:type="keyStringValuePair">
                <key>OriginalPaymentMethodName</key>
                <value>AstropayBankTransferWithdrawal</value>
            </detail>
        </paymentDetails>
        <paymentAccount>
            <paymentAccountID>1d9ca158-38ce-4270-8d53-cbab137254df</paymentAccountID>
        </paymentAccount>
    </payment>
</handlePaymentStateChangedNotificationRequest>