Skip to main content
Version: Lab (preview)

Recalling Payment Method

This guide will walk you through calling back payment method tokens for a specific payor using our API.

Understanding the payment method token object​

Payment Method Tokens are meant to store info that represents a tokenized Bank Account, Credit Card, or Debit Card.

This is what the token object looks like

javascript
{
payment_method_id: String
merchant_uid: String
payor: Payor
payment_type: PaymentType
last_four: String
exp_date: String
full_name: String
}

Keytypedescription
payment_method_idstringThe unique payment method id.
merchant_uidstringThe Pay Theory unique identifier assigned to the merchant that the payment_method_token belongs to.
payorPayorObjectThe payor object. Refer to the Payor docs for more info.
payment_typePaymentTypeThe type of payment method.
  • CARD
  • ACH
  • CASH
last_fourstringThe last four digits of the card or bank account number.
exp_datestringThe expiration date of the card. Null if the payment_type is not a card. Format: MMYY
full_namestringThe name on the card or bank account.

How to query payment method tokens for a payor​

Tokens are used to reference a payment method and enable transactions rather than managing credit card numbers and bank account information directly.

Additional Query information

If you are unfamiliar with query writing, you can learn about fundamental query structure from the information provided below.

View Query Details
GraphQL
const GET_PAYMENT_METHOD_TOKENS = gql`
query paymentMethodTokens(direction: FORWARD, limit: 10, query:{
query_list:[{
key: "exp_date",
value: "05%",
operator : LIKE
conjunctive_operator: OR_NEXT
},
{
key: "card_brand",
value: "DISCOVER",
operator: EQUAL
}]
})
{
items {
payment_method_id
merchant_uid
payor(query_list: [QueryPair]) {
payor_id
...
}
payment_type
last_four
exp_date
card_brand
full_name
}
total_row_count
}

The output response will come back in JSON format as an array of payment method token objects under the items key.


Next Steps​

You can also refer to how to make one time payment Transaction