This is an old revision of the document!
Retrieve payment_details by id and return the details.
Update payment details by id.
$ curl -u user:pass -d "expiry=2025-06" \ > https://api.snapbill.com/v1/payment_details/143476/update.json <code> <source examples/payment_details.txt-1.json> ==== 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. <code php> $ 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
}
}
}
}
| 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. |