X-Payments:Charge again transaction request (Tokenization)

From X-Payments Help
Revision as of 17:41, 26 July 2016 by Dohtur (talk | contribs)
Jump to: navigation, search
X-Payments API
  1. API versions supported
  2. Samples
  3. API requests
  4. API Requests from the store to X-Payments
    1. Admin area/X-Payments configuration
    2. Payment creation (Regular payment and tokenization)
    3. Payment information
    4. Actions on payments (secondary actions)
  5. Callback requests (web-hooks) from X-Payments to the store
  6. Browser-related
  7. Appendix A. Status codes.
  8. See also

Request specification

Field Required Type Description
target Y string, 128 Must equal payment
action Y string, 128 Must equal recharge
txnId Y string, 32 Unique payment ID which references the token that will be used to identify the payment on the side of the payment gateway
amount Y currency The amount for which the "saved" card is to be charged using the token from the previous successful transaction
description Y string Description of the transaction
api_version Y string Must equal one of the following: 1.2, 1.3, 1.4, 1.5 etc.
refId (supported by API 1.4 and later) N string, 128 Order ID in the online store

Request example

<txnId>e7f398cee98ec062abac0d2c937da181</txnId>
<amount>50.00</amount>
<description>Recurring payment for the new issue of Playboy</description>
<target>payment</target>
<action>recharge</action>
<api_version>1.2</api_version>

Response specification

Field Type Description
status integer, 1 Operation status code
data array
data[status] integer Status of the new payment (See Payment status codes)
data[transaction_id] string ID of the created payment for further references (capture/void/refund etc)
data[error] string
data[error_message] string
data[is_error_message] string