Card Event

Event structure and samples for Cards.


Note: Version 2 Webhooks can contain more that one event per webhook. Please see “V2 Webhook Structure” for more details.


Event Fields

Property Format Description
allow_repeat_payments boolean If repeat payments can be made from the card
card_expiry_date date (YYYY-MM-DD) or null The expiry date of the card
card_holder_address_city string or null Card holder city
card_holder_address_country_code string (ISO 3166-1 alpha-2) Card holder country code
card_holder_address_line1 string or null Card holder address line 1
card_holder_address_line2 string or null Card holder address line 2
card_holder_address_postal_code string or null Card holder postcode
card_holder_address_state_code string or null Card holder state code
card_number_ending string or null Typically the last four digits of the long card number
card_type string or null The card association for the card. Visa, Amex, etc
client object Object containing the client information, see below
created_at datetime (ISO8601) Date and time the record was created
created_by object or null Object containing the created_by information, if set, see below
currency_code string ISO 4217 representation of the currency used for the card payment
custom_reference string or null The Custom reference
customer_account object or null Object containing Customer Account information, if set, see below
edited_at datetime (ISO8601) Date and time the record was edited
edited_by object or null Object containing the edited_by information, if set, see below
event_id string The ID of the Event
event_source string The Source that triggered the event
event_type string This will be “card_payment.create” or “card_payment.update”
gateway_card_id string or null Unique identifier of the card passed to SmarterPay from the gateway
gateway_payee_id string or null Unique identifier of the payee passed to SmarterPay from the gateway
gateway_payment_description string or null A description of payment that is passed onto the gateway and may be shared with the customer
gateway_status string or null The status of the card passed by the gateway to SmarterPay
gateway_status_code string or null A code that the gateway may pass to SmarterPay to further describe the status
gateway_status_details string or null Additional information, based on the status, passed by the gateway to SmarterPay
id string The ID of the Record
initial_amount interger The amount initially charged to the card.
internal_payment_description string or null A description of payment that is only for 'office use' and not shared with a customer
legacy_id string or null Legacy ID of the record, if set
metadata string or null Additional client JSON initially passed in the card registration request that is sent with every webhook
name_on_card string The name of the person who owns the card
payment_gateway string The name of the payment gateway used to register the card
payment_gateway_profile object Object containing the payment gateway profile information, see below
status string SmarterPay's normalised status of the card
status_code string or null Card payments status code
status_details string or null SmarterPay's additional information based on the status
transaction_type string What type of transaction took place. For example: Ecommerce or MOTO

client Object Fields

Property Format Description
id string ID of the record

created_by Object Fields

Property Format Description
id string ID of the record

customer_account Object Fields

Property Format Description
id string ID of the record
legacy_id string or null Legacy ID of the record, if set

edited_by Object Fields

Property Format Description
id string ID of the record

payment_gateway_profile Object Fields

Property Format Description
id string ID of the record
legacy_id string or null Legacy ID of the record, if set
{
   "id":{VALUE},
   "idempotency_key":{VALUE},
   "sent_at":{VALUE},
   "client":
	{ 
	  "id":{VALUE} 
	},
   "events":[
      {
         "id":{VALUE},
         "legacy_id":{VALUE},
         "event_id":{VALUE},
         "created_at":{VALUE},
         "edited_at":{VALUE},
         "custom_reference":{VALUE},
         "event_type":{VALUE},
         "event_source":{VALUE},
         "payment_gateway":{VALUE},
         "card_type":{VALUE},
         "card_number_ending":{VALUE},
         "card_expiry_date":{VALUE},
         "name_on_card":{VALUE},
         "internal_payment_description":{VALUE},
         "gateway_payment_description":{VALUE},
         "gateway_payee_id":{VALUE},
         "gateway_card_id":{VALUE},
         "transaction_type":{VALUE},
         "status":{VALUE},
         "status_details":{VALUE},
         "status_code":{VALUE},
         "currency_code":{VALUE},
         "initial_amount":{VALUE},
         "metadata":{VALUE},
         "gateway_status":{VALUE},
         "gateway_status_code":{VALUE},
         "gateway_status_details":{VALUE},
         "card_holder_address_line1":{VALUE},
         "card_holder_address_line2":{VALUE},
         "card_holder_address_city":{VALUE},
         "card_holder_address_postal_code":{VALUE},
         "card_holder_address_country_code":{VALUE},
         "card_holder_address_state_code":{VALUE},
         "allow_repeat_payments":{VALUE},
         "client":{
             "id":{VALUE}
         },
         "created_by":{
             "id":{VALUE}
         },
         "edited_by":{
             "id":{VALUE}
         },  
         "payment_gateway_profile":{
             "id":{VALUE},
             "description":{VALUE}
         },
         "customer_account":{
            "id":{VALUE},
            "legacy_id":{VALUE}
         }
      }
   ]
}

Note: Property display order for documentation purposes, actual order may vary.

Notes:

  • Properties displayed in alphabetical order for documentation purposes, actual order will vary.

Card Event - Sample - Record Creation

Card Event - Structure

The fields that have been updated for this webhook are:

Field Sample Value
id “CD0175OW1YJVQK8X29LV”
legacy_id null
event_id “HI08EXYR6K8KEY84ZLQV”
created_at “2024-04-09T09:38:29Z”
edited_at “2024-04-09T09:38:29Z”
custom_reference null
event_type “card_payment.create”
event_source API
payment_gateway “OpayoPi”
card_type null
card_number_ending null
card_expiry_date null
name_on_card null
internal_payment_description null
gateway_payment_description null
gateway_payee_id null
gateway_card_id null
transaction_type “MOTO”
status “pending”
status_details null
status_code null
currency_code “GBP”
initial_amount 2750
metadata null
gateway_status null
gateway_status_code null
gateway_status_details null
card_holder_address_line1 null
card_holder_address_line2 null
card_holder_address_city null
card_holder_address_postal_code null
card_holder_address_country_code null
card_holder_address_state_code null
allow_repeat_payments true
client:id “CL01LG420EJ9DP1VQWR9”
created_by null
edited_by null
payment_gateway_profile:id “PG01RZO41Y8DOJ0GNLW7”
payment_gateway_profile:description “Opayo Payment Gateway”
customer_account:id “CA01ZO41Y8DZ19P0GNLW”
customer_account:legacy_id null
{
   "id":{VALUE},
   "idempotency_key":{VALUE},
   "sent_at":{VALUE},
   "client":
	{ 
	  "id":{VALUE} 
	},
   "events":[
      {
         "id":{VALUE},
         "legacy_id":{VALUE},
         "event_id":{VALUE},
         "created_at":{VALUE},
         "edited_at":{VALUE},
         "custom_reference":{VALUE},
         "event_type":{VALUE},
         "event_source":{VALUE},
         "payment_gateway":{VALUE},
         "card_type":{VALUE},
         "card_number_ending":{VALUE},
         "card_expiry_date":{VALUE},
         "name_on_card":{VALUE},
         "internal_payment_description":{VALUE},
         "gateway_payment_description":{VALUE},
         "gateway_payee_id":{VALUE},
         "gateway_card_id":{VALUE},
         "transaction_type":{VALUE},
         "status":{VALUE},
         "status_details":{VALUE},
         "status_code":{VALUE},
         "currency_code":{VALUE},
         "initial_amount":{VALUE},
         "metadata":{VALUE},
         "gateway_status":{VALUE},
         "gateway_status_code":{VALUE},
         "gateway_status_details":{VALUE},
         "card_holder_address_line1":{VALUE},
         "card_holder_address_line2":{VALUE},
         "card_holder_address_city":{VALUE},
         "card_holder_address_postal_code":{VALUE},
         "card_holder_address_country_code":{VALUE},
         "card_holder_address_state_code":{VALUE},
         "allow_repeat_payments":{VALUE},
         "client":{
             "id":{VALUE}
         },
         "created_by":{
             "id":{VALUE}
         },
         "edited_by":{
             "id":{VALUE}
         },  
         "payment_gateway_profile":{
             "id":{VALUE},
             "description":{VALUE}
         },
         "customer_account":{
            "id":{VALUE},
            "legacy_id":{VALUE}
         }
      }
   ]
}

Note: Property display order for documentation purposes, actual order may vary.

  • Last modified: 2024/04/12 16:49