Difference between revisions of "MOR API payments get"

From Kolmisoft Wiki
Jump to navigationJump to search
 
(17 intermediate revisions by 5 users not shown)
Line 1: Line 1:
''This functionality is available from [[MOR 11 documentation | MOR 11]]''
=Description=
<!---This functionality is available from MOR 11--->
[[MOR API]] Payments list
<br><br>
=Usage=
 
* From '''MOR X4''' call: '''/api/payments_get'''
* For Backwards-compatibility old name 'payments_list' is also usable. Call: '''/api/payments_list'''
* Methods: POST, GET(if allowed, not recomended)
<br><br>
===Parameters===
 
* u - username for authentication. '''Required'''.
* [[MOR API hash construction | hash]] - SHA1 hash constructed using '''params''' and '''API_Secret_Key''' ([[MOR API hash construction | More described in Constructing hash]]). '''Required'''.
*s_user_id - payments user id.
*s_from - Unix timestamp of calls period starting date. (Default: Today at 00:00). '''Note:''' only works when ''s_till'' is provided.
*s_till - Unix timestamp of calls period end date. (Default: Today at 23:59). '''Note:''' only works when ''s_from'' is provided.
* s_transaction - transaction id.
*s_completed - payment status. Possible values[ 1 - completed, 0 - not completed, if not sent - default: All]
*s_username -  users username.
*s_first_name - users first name.
*s_last_name - users last name
*s_paymenttype - payment type. Possible values['Card', 'paypal','webmoney','ouroboros','manual','gateways_paypal','gateways_authorize_net','integrations_moneybooker','integrations_two_checkout', if not sent - default: All]
*s_amount_min - amount starting from.
*s_amount_max - amount ending with.
*s_currency - payment currency. Example: USD
*s_number - card number.
*s_pin - card pin.
<br><br>
 
===Request===
 
We have s_user_id = 123, API Secret Key = 456789


We send:


[[MOR API]]
HTML POST: http://<SERVER_IP>/billing/api/payments_get?u=username&s_user_id=123&hash=f7c3bc1d808e04732adf679965ccc34ca7ae3441
Payments list


'''NOTE that username are not included in hash'''
<br><br>
===Returns===
'''Success'''
<?xml version="1.0" encoding="UTF-8"?>
<page>
  <pagename> Payments_list </pagename>
  <payments>
  <payment>
    <user>  ''payment user''  </user>
    <payer> ''email or payer ''</payer>
    <transaction_id> ''transaction id'' </transaction_id>
    <date> ''date added'' </date>
    <confirm_date> ''confirm date'' </confirm_date>
    <type>  ''payment type''  </type>
    <amount> ''payment amount'' </amount>
    <fee> ''payment fee'' </fee>
    <amount_with_tax> ''payment amount with tax'' </amount_with_tax>
    <currency>  ''payment currency'' </currency>
    <completed> ''payment status''  </completed>
    <confirmed_by_admin> ''confirmed by admin?'' </confirmed_by_admin>
    <comments_for_user> ''commented by admin'' </comments_for_user>
    <user_balance_before_payment> ''user's balance before payment'' </user_balance_before_payment> 
    <user_balance_after_payment> ''user's balance after payment'' </user_balance_after_payment>
  </payment>
  </payments>
</page>
<br><br>
<br><br>
----
----
'''Errors'''
* <error>Bad login</error> - User was not found by username. Use correct username. Make sure that username (u) are specified.
* <error>Incorrect hash</error> - Hash was not correct. Check API_Secret_Key and order or params while concatenating hash_string.
<br><br>
<br><br>


* Call: /api/payments_list
=See also=
* Params:
 
** u - username to login. '''Required'''.
* [[MOR API]]
** p - password to login. '''Required'''.
** [[MOR API hash construction | hash]] - SHA1 hash constructed using params and API_Secret_Key ([[MOR API hash construction | More described in Constructing hash]]). '''Required'''.
**s_user_id - payments user id.
**s_from - Unix timestamp of calls period starting date. (Default: Today at 00:00).
**s_till - Unix timestamp of calls period end date. (Default: Today at 23:59).
** s_transaction - transaction id.
**s_completed - payment status. Possible values[ 1 - completed, 0 - not completed, if not sent - default: All]
**s_username -  users username.
**s_first_name - users first name.
**s_last_name - users last name
**s_paymenttype - payment type. Possible values['Card', 'paypal','webmoney','ouroboros','manual','gateways_paypal','gateways_authorize_net','integrations_moneybooker','integrations_two_checkout', if not sent - default: All]
**s_amount_min - amount starting from.
**s_amount_max - amount ending with.
**s_currency - payment currency. Example: USD
**s_number - card number.
**s_pin - card pin.

Latest revision as of 15:22, 8 September 2020

Description

MOR API Payments list

Usage

  • From MOR X4 call: /api/payments_get
  • For Backwards-compatibility old name 'payments_list' is also usable. Call: /api/payments_list
  • Methods: POST, GET(if allowed, not recomended)



Parameters

  • u - username for authentication. Required.
  • hash - SHA1 hash constructed using params and API_Secret_Key ( More described in Constructing hash). Required.
  • s_user_id - payments user id.
  • s_from - Unix timestamp of calls period starting date. (Default: Today at 00:00). Note: only works when s_till is provided.
  • s_till - Unix timestamp of calls period end date. (Default: Today at 23:59). Note: only works when s_from is provided.
  • s_transaction - transaction id.
  • s_completed - payment status. Possible values[ 1 - completed, 0 - not completed, if not sent - default: All]
  • s_username - users username.
  • s_first_name - users first name.
  • s_last_name - users last name
  • s_paymenttype - payment type. Possible values['Card', 'paypal','webmoney','ouroboros','manual','gateways_paypal','gateways_authorize_net','integrations_moneybooker','integrations_two_checkout', if not sent - default: All]
  • s_amount_min - amount starting from.
  • s_amount_max - amount ending with.
  • s_currency - payment currency. Example: USD
  • s_number - card number.
  • s_pin - card pin.



Request

We have s_user_id = 123, API Secret Key = 456789

We send:

HTML POST: http://<SERVER_IP>/billing/api/payments_get?u=username&s_user_id=123&hash=f7c3bc1d808e04732adf679965ccc34ca7ae3441

NOTE that username are not included in hash

Returns

Success

<?xml version="1.0" encoding="UTF-8"?>
<page>
 <pagename> Payments_list </pagename>
 <payments>
  <payment>
   <user>  payment user   </user>
   <payer> email or payer </payer> 
   <transaction_id> transaction id </transaction_id>
   <date> date added </date>
   <confirm_date> confirm date </confirm_date>
   <type>   payment type   </type>
   <amount> payment amount </amount>
   <fee> payment fee </fee>
   <amount_with_tax> payment amount with tax </amount_with_tax>
   <currency>  payment currency </currency>
   <completed> payment status   </completed>
   <confirmed_by_admin> confirmed by admin? </confirmed_by_admin>
   <comments_for_user> commented by admin </comments_for_user>
   <user_balance_before_payment> user's balance before payment </user_balance_before_payment>  
   <user_balance_after_payment> user's balance after payment </user_balance_after_payment>
  </payment>
 </payments>
</page>




Errors

  • <error>Bad login</error> - User was not found by username. Use correct username. Make sure that username (u) are specified.
  • <error>Incorrect hash</error> - Hash was not correct. Check API_Secret_Key and order or params while concatenating hash_string.



See also