Payment Resource

Payment Resource

Payment resources are read-only by default. Please contact us if you need write permissions.


Payment Categories


Payment category
English
German
cod
Cash on delivery
Bezahlung bei Lieferung
custom
Custom
Eigene Zahlart
bank_deposit
Bank deposit
Vorkasse
invoice
Invoice
Rechnung
money_order
Money order
Lastschrift
cc
Credit card
Kreditkarte
paypal
PayPal
PayPal
sofortueberweisung
sofortüberweisung.de
Sofortüberweisung.de
directebanking
sofortüberweisung.de
Sofortüberweisung.de
qpay
Q-Pay
Q-Pay
data_trans
DataTrans
DataTrans
vc_paymill_bridge
PAYMILL Bridge (payment form)
PAYMILL Bridge (Zahlungsformular)
bit_pay
Bitpay
Bitpay



Get Payments

GET /api/payments.json

  • GET /api/payments.json will return the first 150 (default limit) payments. You can increase the limit to a maximum of 250 payments.
  • GET /api/orders/:order_id/payments.json is also possible.

Example:

$ curl -s \
-H 'Accept: application/json' \
-H 'Content-Type: application/json' \
-u APP_API_KEY:APP_API_PASSWORD \
-X GET \
http://shop_subdomain.versacommerce.de/api/payments.json

Status: 200 OK

[
  {
    "payment": {
      "amount": "8152.3",
      "captured_at": null,
      "category": "cod",
      "comment": "",
      "created_at": "2013-09-15T08:21:01+02:00",
      "currency": null,
      "id": 100,
      "is_captured": false,
      "order_code": "213-884-358",
      "order_id": 1000,
      "trans_id": null,
      "captureable": false
    }
  },
  {
    "payment": {
      "amount": "10.0",
      "captured_at": null,
      "category": "money_transfer",
      "comment": "A comment ...",
      "created_at": "2013-10-15T11:22:02+02:00",
      "currency": null,
      "id": 101,
      "is_captured": false,
      "order_code": "214-148-020",
      "order_id": 1001,
      "trans_id": null,
      "captureable": false
    }
  },
  {
    "payment": {
      "amount": "17.4",
      "captured_at": null,
      "category": "direct_debit",
      "comment": "",
      "created_at": "2013-10-15T11:22:23+02:00",
      "currency": null,
      "id": 102,
      "is_captured": false,
      "order_code": "214-148-020",
      "order_id": 1001,
      "trans_id": null,
      "captureable": false
    }
  }
]


Get Payments Count

GET /api/payments/:payment_id.json

  • GET /api/payments/:payment_id.json will return the specified payment.
  • GET /api/orders/:order_id/payments/:payment_id.json is also possible.
Example:
$ curl -s \
-H 'Accept: application/json' \
-H 'Content-Type: application/json' \
-u APP_API_KEY:APP_API_PASSWORD \
-X GET \
http://shop_subdomain.versacommerce.de/api/payments/:payment_id.json

Status: 200 OK

{
  "payment": {
    "amount": "8152.3",
    "captured_at": null,
    "category": "cod",
    "comment": "",
    "created_at": "2013-09-15T08:21:01+02:00",
    "currency": null,
    "id": 100,
    "is_captured": false,
    "order_code": "213-884-358",
    "order_id": 1000,
    "trans_id": null,
    "captureable": false
  }
}

    • Related Articles

    • Payment Method Resource

      Attention PaymentMethod resources are read-only by default. Please contact us if you need write permissions. Get Payment Methods GET /api/payment_methods.json GET /api/payment_methods.json will return the first 150 (default limit) payment methods. ...
    • Order Resource

      Attention Order resources are read-only by default. Please contact us for access. ​ Order Statuses Order Status English German open new order Neue Bestellung in_progress in progress, started processing Bearbeitung begonnen cancelled order was ...
    • Shop Resource

      Current Shop Informations GET /api/shop.json GET /api/shop.json​ will return informations about the current shop. Example: $ curl -s \ -H 'Accept: application/json' \ -H 'Content-Type: application/json' \ -u APP_API_KEY:APP_API_PASSWORD \ -X GET \ ...
    • Metafield Resource

      Metafield Resource Get Metafields Get Metafield Create Metafield Update Metafield Delete Metafield Get Metafield Count Filter Metafields Get Metfields GET /api/metafields.json GET /api/metafields.json will return all Metafields. See the Filter ...
    • Draft Order Resource

      Create DraftOrder POST /api/draft_orders.json POST /api/draft_orders.json will create a new Draft Order from the parameters passed. Example: Create DraftOrder with existing product $ curl -s \ -H 'Accept: application/json' \ -H 'Content-Type: ...