Payments Resource
From Wiki.zanox.com
The payments RESTFul API resource enables the retrieval of the payment history of a publisher account.
Contents |
[edit] Example 1: Retrieving all payment items
[edit] Example Request
GET /payments HTTP/1.1 Host: api.zanox.com Date: Mon, 09 Sep 2008 08:17:35 GMT Authorization: ZXWS CE665464E0186EA44282
[edit] Appendix: Filter options for the /payments resource
| items | number of items in the result set [1..n] (default = 10; maximum = 50) |
| page | page position [0..n] (default: 0) |
[edit] Example Response
<?xml version="1.0" encoding="UTF-8" standalone="yes"?> <response xmlns="http://api.zanox.com/namespace/2008-05-21/"> <page>0</page> <items>10</items> <total>2376</total> <paymentsResult> <paymentItem id="07C0075C7650CF68"> <createdate>2008-01-01T00:00:00</createdate> //transdata <modifydate>2008-01-01T00:00:00</modifydate> //updatedate <payoutdate>2008-01-11T00:00:00</payoutdate> //payout <status>instructed or received or rejected or authorised or made</status> <amount>100.00</amount> <currency>EUR</currency> <account id="6F1D536C59643034">Bank of Trust</account> </paymentItem> <paymentItem id="http://api.zanox.com/xml/2008-05-21/payments/payment/{id}">...</paymentItem> ... </paymentsResult> </response>
[edit] Explanation of Response Items
See: Explanation of Response Items for Retrieving all payment items
[edit] Example 2: Retrieving a single payment item
[edit] Example Request
GET /payments/payment/{paymentId} HTTP/1.1
Host: api.zanox.com
Date: Mon, 09 Sep 2008 08:17:35 GMT
Authorization: ZXWS CE665464E0186EA44282
[edit] Example Response
<?xml version="1.0" encoding="UTF-8" standalone="yes"?> <response xmlns="http://api.zanox.com/namespace/2008-05-21/"> <paymentsResult> <paymentItem id="http://api.zanox.com/xml/2008-05-21/payments/payment/{id}"> <createdate>2008-01-01T00:00:00</createdate> //transdata <modifydate>2008-01-01T00:00:00</modifydate> //updatedate <payoutdate>2008-01-11T00:00:00</payoutdate> //payout <status>instructed or received or rejected or authorised or made</status> <amount>100.00</amount> <currency>EUR</currency> <account id="">my bank account</account> </paymentItem> <paymentItem id="http://api.zanox.com/xml/2008-05-21/payments/payment/{id}">...</paymentItem> </paymentsResult> </response>
[edit] Explanation of Response Items
See: Explanation of Response Items for Retrieving a single payment item
[edit] Example 3: Retrieving all balance items
[edit] Example Request
GET /payments/balances HTTP/1.1 Host: api.zanox.com Date: Mon, 09 Sep 2008 08:17:35 GMT Authorization: ZXWS CE665464E0186EA44282
[edit] Example Response
<?xml version="1.0" encoding="UTF-8" standalone="yes"?> <response xmlns="http://api.zanox.com/namespace/2008-05-21/"> <paymentsResult> <balanceItem id="EUR"> <open>150.00</open> <confirmed>50.00</confirmed> </balanceItem> <balanceItem id="USD"> <open>50.00</open> <confirmed>35.00</confirmed> </balanceItem> </paymentsResult> </response>
[edit] Explanation of Response Items
See: Explanation of Response Items for Retrieving all balance items
[edit] Example 4: Retrieving a single balance item
[edit] Example Request
GET /payments/balances/balance/{currency} HTTP/1.1
Host: api.zanox.com
Date: Mon, 09 Sep 2008 08:17:35 GMT
Authorization: ZXWS CE665464E0186EA44282
[edit] Example Response
<?xml version="1.0" encoding="UTF-8" standalone="yes"?> <response xmlns="http://api.zanox.com/namespace/2008-05-21/"> <paymentsResult> <balanceItem id="http://api.zanox.com/xml/2008-05-21/reports/balances/balance/eur"> <open>150.00</open> <confirmed>50.00</confirmed> </balanceItem> </paymentsResult> </response>
[edit] Explanation of Response Items
See: Explanation of Response Items for Retrieving a single balance item
[edit] Example 5: Retrieving all account items
[edit] Example Request
GET /payments/accounts HTTP/1.1 Host: api.zanox.com Date: Mon, 09 Sep 2008 08:17:35 GMT Authorization: ZXWS CE665464E0186EA44282
[edit] Example Response
<?xml version="1.0" encoding="UTF-8" standalone="yes"?> <response xmlns="http://api.zanox.com/namespace/2008-05-21/"> <paymentsResult> <accountItem id="12fv123bv"> <profile>Standard</profile> <iban>64003033</iban> <swift>64003033</swift> <bankcode>64003033</bankcode> <accountnumber>12345678</accountnumber> <accountholder>John Doe</accountholder> <name>Deutsche Bank</name> <address>Strasse Hausnummer, PLZ Stadt</address> <country>DE</country> <minpayout>25</minpayout> </accountItem> <accountItem id="yy34ya3as"> <profile>Deutsche Bank 2</profile> <iban>64333033</iban> <swift>64333033</swift> <bankcode>64333033</bankcode> <accountnumber>12335678</accountnumber> <accountholder>John Doe</accountholder> <name>Deutsche Bank</name> <address>Strasse Hausnummer, PLZ Stadt</address> <country>DE</country> <minpayout>25</minpayout> </accountItem> </paymentsResult> </response>
[edit] Explanation of Response Items
See: Explanation of Response Items for Retrieving all account items
[edit] Example 6: Retrieving a single account item
[edit] Example Request
GET /payments/accounts/account/{id} HTTP/1.1
Host: api.zanox.com
Date: Mon, 09 Sep 2008 08:17:35 GMT
Authorization: ZXWS CE665464E0186EA44282
[edit] Example Response
<?xml version="1.0" encoding="UTF-8" standalone="yes"?> <response xmlns="http://api.zanox.com/namespace/2008-05-21/"> <paymentsResult> <accountItem id=""> <profile>Standard</profile> <iban>64003033</iban> <swift>64003033</swift> <bankcode>64003033</bankcode> <accountnumber>12345678</accountnumber> <accountholder>John Doe</accountholder> <name>Deutsche Bank</name> <address>Strasse Hausnummer, PLZ Stadt</address> <country>DE</country> <minpayout>25</minpayout> </accountItem> </paymentsResult> </response>
[edit] Explanation of Response Items
See: Explanation of Response Items for Retrieving a single account item