User Tools

Site Tools


developers:api:payment_details

Payment Details

/v1/payment_details/id/get

Retrieve payment_details by id and return the details.

/v1/payment_details/id/update

Update payment details by id.

    $ curl -u user:pass -d "expiry=2025-06" \
    >      https://api.snapbill.com/v1/payment_details/143476/update.json

File: examples/payment_details.txt-1.json -

    {
      "code": 200,
      "type": "list",
      "page": 1,
      "numpages": 5,
      "class": "payment_details",
      "list": [
        {
          "id": 143475,
          "xid": "Clw:jBz",
          "type": "bank_account",
          "bank": "ABSA BANK",
          "number": "************7015",
          "last4": "7015",
          "expiry": null,
          "created": "2014-08-21 16:23:40",
          "tokens": [],
          "client": {
            "depth": 1,
            "id": 158958,
            "xid": "Clw:mzu",
            "state": "active",
            "number": "001",
            "name": "test4128",
            "account": {
              "depth": 1,
              "id": 10608,
              "xid": "Clw:Clw",
              "username": "demo"
            },
            "cell": "",
            "company": "",
            "country": {
              "code": "ZA",
              "iso2": "ZA",
              "iso3": "ZAF",
              "name": "South Africa"
            },
            "credit": "0.00",
            "credit_cents": 0,
            "currency": {
              "code": "ZAR",
              "format": "R%.2f",
              "enabled": true
            },
            "discount": "0.00",
            "email": "",
            "firstname": "test4128",
            "payment": "netcash",
            "payment_method": {
              "depth": 2,
              "code": "netcash",
              "name": "Netcash Collect",
              "enabled": true
            },
            "surname": "",
            "totals": {
              "unpaid_invoices": "555.58",
              "unpaid_invoices_cents": 55558,
              "paid_payments": "0.00",
              "paid_payments_cents": 0
            },
            "urls": {
              "statement": "https://demo.snapbill.com/statement/Clw:mzu/=NTYxY2UyN2E5",
              "payment": "https://demo.snapbill.com/payment/client/Clw:mzu/=YjE5YTM0YWNm"
            },
            "data": {
              "public_city": null,
              "public_country": null,
              "public_fax": null,
              "public_phone": null,
              "public_postal": null,
              "public_postcode": null,
              "public_province": null,
              "public_street": null,
              "vat_number": null
            }
          }
        },
        {
          "id": 143476,
          "xid": "Clw:jB0",
          "type": "credit_card",
          "bank": "mastercard",
          "number": "****-****-****-1064",
          "last4": "1064",
          "expiry": "2015-04",
          "created": "2014-08-21 16:23:42",
          "tokens": [],
          "client": {
            "depth": 1,
            "id": 158959,
            "xid": "Clw:mzv",
            "state": "active",
            "number": "002",
            "name": "test8587",
            "account": {
              "depth": 1,
              "id": 10608,
              "xid": "Clw:Clw",
              "username": "demo"
            },
            "cell": "",
            "company": "",
            "country": {
              "code": "ZA",
              "iso2": "ZA",
              "iso3": "ZAF",
              "name": "South Africa"
            },
            "credit": "0.00",
            "credit_cents": 0,
            "currency": {
              "code": "ZAR",
              "format": "R%.2f",
              "enabled": true
            },
            "discount": "0.00",
            "email": "",
            "firstname": "test8587",
            "payment": "netcash",
            "payment_method": {
              "depth": 2,
              "code": "netcash",
              "name": "Netcash Collect",
              "enabled": true
            },
            "surname": "",
            "totals": {
              "unpaid_invoices": "0.00",
              "unpaid_invoices_cents": 0,
              "paid_payments": "0.00",
              "paid_payments_cents": 0
            },
            "urls": {
              "statement": "https://demo.snapbill.com/statement/Clw:mzv/=NTk0M2I0MjI4",
              "payment": "https://demo.snapbill.com/payment/client/Clw:mzv/=NTA5MmY3MzU3"
            },
            "data": {
              "public_city": null,
              "public_country": null,
              "public_fax": null,
              "public_phone": null,
              "public_postal": null,
              "public_postcode": null,
              "public_province": null,
              "public_street": null,
              "vat_number": null
            }
          }
        }
      ]
    }

Parameter listing

Name Availability Description
depth get The depth parameter signals the amount of data for the payment details provided. depth=0 is the highest level that provides full detail.
id get The id of the payment details in the system. This is guaranteed to be unique only over a single account.
xid get The xid of the payment details in the system. This is guaranteed to be unique over all accounts.
client get The client the payment was for.
type get The type of payment details (usually bank_account or credit_card).
bank get The bank the payment details are with. Will also list visa/mastercard/etc in the case of credit cards.
number get The credit card or bank account number. Hidden digits are replaced with *'s.
expiry get update The expiry date for credit cards (null on bank accounts)
last4 get The last four unencrypted digits of the bank account number or credit card.
state get The current state of the payment details (active, disabled, expired or dead).

/v1/payment_details/list

List all payment_details of all clients on the account.

Results can optionally be filtered by the filters listed below.

    $ curl -u user:pass -d "perpage=2" \
    >      https://api.snapbill.com/v1/payment_details/list.json

File: examples/payment_details.txt-2.json -

    {
      "code": 200,
      "type": "item",
      "class": "payment_details",
      "payment_details": {
        "id": 143476,
        "xid": "Clw:jB0",
        "type": "credit_card",
        "bank": "mastercard",
        "number": "****-****-****-1064",
        "last4": "1064",
        "expiry": "2025-06",
        "created": "2014-08-21 16:23:42",
        "tokens": [],
        "client": {
          "depth": 1,
          "id": 158959,
          "xid": "Clw:mzv",
          "state": "active",
          "number": "002",
          "name": "test8587",
          "account": {
            "depth": 1,
            "id": 10608,
            "xid": "Clw:Clw",
            "username": "demo"
          },
          "cell": "",
          "company": "",
          "country": {
            "code": "ZA",
            "iso2": "ZA",
            "iso3": "ZAF",
            "name": "South Africa"
          },
          "credit": "0.00",
          "credit_cents": 0,
          "currency": {
            "code": "ZAR",
            "format": "R%.2f",
            "enabled": true
          },
          "discount": "0.00",
          "email": "",
          "firstname": "test8587",
          "payment": "netcash",
          "payment_method": {
            "depth": 2,
            "code": "netcash",
            "name": "Netcash Collect",
            "enabled": true
          },
          "surname": "",
          "totals": {
            "unpaid_invoices": "0.00",
            "unpaid_invoices_cents": 0,
            "paid_payments": "0.00",
            "paid_payments_cents": 0
          },
          "urls": {
            "statement": "https://demo.snapbill.com/statement/Clw:mzv/=NTk0M2I0MjI4",
            "payment": "https://demo.snapbill.com/payment/client/Clw:mzv/=NTA5MmY3MzU3"
          },
          "data": {
            "public_city": null,
            "public_country": null,
            "public_fax": null,
            "public_phone": null,
            "public_postal": null,
            "public_postcode": null,
            "public_province": null,
            "public_street": null,
            "vat_number": null
          }
        }
      }
    }

List Payment Details Filters

Name Availability Description
client_id get The client associated with the payment details.
page get The page of results to return.
perpage get The number of results per page to return.
developers/api/payment_details.txt · Last modified: 2014/10/18 08:00 by Jaco van Wyk

Page Tools