Card Redirect Refunds (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.
The following method IDs are covered in this section:
ID | Name | Credit/Debit State |
---|---|---|
267 | VisaRedirectRefund | Refunded (125) |
268 | ECMCRedirectRefund | Refunded (125) |
269 | AmericanExpressRedirectRefund | Refunded (125) |
270 | JCBRedirectRefund | Refunded (125) |
271 | ELORedirectRefund | Refunded (125) |
272 | DinersRedirectRefund | Refunded (125) |
273 | AuraRedirectRefund | Refunded (125) |
274 | DiscoverRedirectRefund | Refunded (125) |
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 |
OriginalPaymentID (string, required) | PaymentID of the original payment |
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>fec8a599-9611-4a17-99d6-0a7ad728dca1</merchantTransactionID>
<paymentMethodID>267</paymentMethodID>
<amount currencyCode="BRL">10.00</amount>
<userID>593427c8-c0a1-4711-b954-afbb22</userID>
<userData>
<username>593427c8-c0a1-4711-b954-afbb22</username>
<firstname xsi:nil="true" />
<lastname xsi:nil="true" />
<currencyCode xsi:nil="true" />
<languageCode xsi:nil="true" />
<email xsi:nil="true" />
<address xsi:nil="true" />
<identificationNumberType xsi:nil="true" />
<drivingLicenseNumber xsi:nil="true" />
<drivingLicenseIssuingState xsi:nil="true" />
</userData>
<userIP>127.0.0.1</userIP>
<userSessionID>cd8f22d8-2497-48e3-92e6-3b870bc87627</userSessionID>
<creationTypeID>1</creationTypeID>
<specificPaymentData>
<data xsi:type="keyStringValuePair">
<key>PaymentDescription</key>
<value>Refund of payment 1234</value>
</data>
<data xsi:type="keyStringValuePair">
<key>OriginalPaymentID</key>
<value>fec8a599-9611-4a17-99d6-0a7ad728dca1</value>
</data>
</specificPaymentData>
<paymentAccount>
<specificPaymentAccountData>
<data xsi:type="keyStringValuePair">
<key>CurrencyCode</key>
<value>BRL</value>
</data>
<data xsi:type="keyStringValuePair">
<key>BranchCode</key>
<value />
</data>
</specificPaymentAccountData>
</paymentAccount>
</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>267</key>
<value>VISARedirectRefund</value>
</paymentMethod>
<merchantTransactionID>fec8a599-9611-4a17-99d6-0a7ad728dca1</merchantTransactionID>
<paymentID>cf2da8a2-adfd-4cea-9692-4ef02906e5f3</paymentID>
<userID>593427c8-c0a1-4711-b954-afbb22</userID>
<paymentProvider>
<key>152</key>
<value>Astropay</value>
</paymentProvider>
<amount currencyCode="BRL">10.00</amount>
<creationType>
<key>2</key>
<value>MerchantOperator</value>
</creationType>
<userIP>127.0.0.1</userIP>
<state>
<id>be5f37aa-2ab9-4a2d-8c1c-442f520e7eaf</id>
<definition>
<key>125</key>
<value>Refunded</value>
</definition>
<createdOn>2017-09-20T10:32:44.5803418Z</createdOn>
<description>Amount refunded (final status)</description>
<paymentStateDetails xsi:nil="true" />
</state>
<isExecuted>true</isExecuted>
<baseAmount currencyCode="EUR">2.65</baseAmount>
<paymentDetails>
<detail xsi:type="keyIntValuePair">
<key>OriginalPaymentID</key>
<value>21098052</value>
</detail>
<detail xsi:type="keyStringValuePair">
<key>ProviderExternalID</key>
<value>cf2da8a2-adfd-4cea-9692-4ef02906e5f3</value>
</detail>
<detail xsi:type="keyStringValuePair">
<key>ProviderTransactionID</key>
<value>8569e4cf-9946-4172-b9bf-bd01d785d3e0</value>
</detail>
</paymentDetails>
<paymentAccount>
<paymentAccountID>0</paymentAccountID>
</paymentAccount>
</payment>
</initiatePaymentResponse>
Notifications
handlePaymentStateChangedNotificationRequest
The provider notifies PXP Financial on payments that are either Successful (state Refunded), Declined (state RefundRefusedByProvider).
Payment States | Description |
---|---|
Refunded | Success state. |
RefundRefusedByProvider | Payment has been rejected by the provider. |
Notification similar to the notification for AstropaycardRedirectRefund.
Astropay error codes
ProviderResponseCode | ProviderResponseMessage and Action |
---|---|
300 | Invalid params + [param name] - Ask the user to re-enter the information related to that parameter. |
301 | Empty 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. |
302 | Invalid control string - Integration problem. Control string instructions. |
401 | Invalid credentials - Integration problem. Check in the merchant's panel which are the correct credentials. Remember Sandbox and Production credentials are different. |
402 | Unregistered IP address - Whitelist the IP in the merchant's panel in the section Credentials & Settings. If there are no more fields, please contact us. |
515 | Invalid amount - Ask the user to re-enter the amount. |
516 | Invalid 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. |
517 | Invalid document number - Ask the user to re-enter his document. |
520 | Insufficient funds - The refund could not be processed due to insufficient funds. Contact us to increase the balance. |
Updated about 6 years ago