Card records hold basic details of a customer credit/debit card.
Method | Purpose |
---|---|
GET (List) | Retrieve Card details in a list |
Action: Retrieve Card details in a list.
Method: GET
URL: https://api.smarterpaycloud.com/service.svc/cards
Optional Parameters and filters are available, please see below.
Response Parameters
Property | Description |
---|---|
ID | Unique identifier of the record. |
card_number_ending | Typically the last four digits of the long card number. |
card_type | The card association for the card. Visa, Amex, etc. |
created_at | Datetime formatted as ISO8601. |
custom_referance | Custom reference set on the record. |
customer_id | ID of the parent customer record. |
expiry_date | Expiry date of the card - 10 digit date in the format of “YYYY-MM-DD” (last day of month). |
gateway_payment_description | A description of payment that is passed onto the gateway and may be shared with the customer. |
internal_payment_description | A description of payment that is only for 'office use' and not shared with a customer. |
metadata | Returns optional, custom, metadata, if set |
name_on_card | The name of the person who owns the card. |
payment_gateway | The name of the payment gateway used to register the card. |
status | Status of the Record. |
transaction_type | What type of transaction took place. For example: Ecommerce or MOTO. |
Response Sample
{ "cards": [ { "ID": "20477d89-9fe4-4b25-ae57-c24f461bb391", "card_number_ending": "0014", "card_type": "Visa", "created_at": "2022-05-16T16:54:13Z", "custom_referance": "", "customer_id": "FTBCUST00035740", "expiry_date": "2022-02-28", "gateway_payment_description": "", "internal_payment_description": "", "name_on_card": "", "payment_gateway": "OpayoPi", "status": "successful", "transaction_type": "MOTO", "metadata":"" }, { "ID": "bdc9ca6c-c01c-4d43-b8af-fa3fa990e417", "card_number_ending": "5559", "card_type": "Visa", "created_at": "2022-05-17T11:48:20Z", "custom_referance": "", "customer_id": "FTBCUST00035740", "expiry_date": "2012-01-31", "gateway_payment_description": "", "internal_payment_description": "", "name_on_card": "", "payment_gateway": "OpayoPi", "status": "successful", "transaction_type": "MOTO", "metadata":"" } ] }
Optional Parameters and filters
Optional parameters can be added to the GET URL by using a “?” in front of the first parameter and “&” in front of subsequent parameters, for example https://api.smarterpaycloud.com/Service.svc/BankAccounts?limit=2&page_no=1
Parameter | Description |
---|---|
limit | Limits the number of records returned by the request. Default=40 when not specified. Minimum=1. Maximum=500. |
page_no | Specifies which page of records are returned by the request. Default=1 when not specified. |
sort_field | specifies which field to sort on. Options are: “custom_reference”,“id”,“status”,“customer_id”,“created_at” (Default when not specified). |
sort_order | Specifies which order to sort on. Options are asc (ascending. Default when not specified) or desc (descending). |
Filter | Description |
---|---|
created_from | Filter the list with records created after the datetime supplied. Format is YYYY-MM-DD HH:MM:SS (2022-05-13 10:15:00). |
created_to | Filter the list with records created before the datetime supplied. Format is YYYY-MM-DD HH:MM:SS (2022-05-13 10:15:00). |
customer_id | Filter the list using the customer_id. Matches will exactly match the provided value. |
custom_reference | Filter the list using the custom_reference. Matches will contain the provided value. |
id | Filter the list using the id. Matches will exactly match the provided value. |
status | Filter the list using the status of the record. Can be a comma seperated list of required values. Options are “cancelled”, “failed”, “pending”, “successful”. |