Skip to main content
Version: Lab (preview)

Payment Links

Payment links are a used to create a checkout page without having to write any code. You can create a payment link and send it to your customers to pay for your products or services.


{
accepted_payment_methods: AcceptedPaymentMethodsEnum
account_code: String
amount: Int
amount_is_variable: Boolean
call_to_action: CallToActionType
created_date: AWSDateTime
currency: String
custom_success_message: String
fee_mode: FeeMode
is_active: Boolean
link_id: String
link_name: String
link_url: String
max_amount: Int
merchant_uid: String
min_amount: Int
payment_name: String
payment_description: String
redirect_url: String
require_phone: Boolean
}
Keytypedescription
accepted_payment_methodsAcceptedPaymentMethodsEnumThe payment methods that will be available to a payor when making a payment.
account_codeStringAccount Code that will be passed in to every transaction made with this payment link.
amountIntThe amount of the payment that the payor will be asked to pay or if amount_is_variable is set to the amount that will be the default amount.
amount_is_variableBooleanIf set to true the payor will be able to enter the amount they want to pay.
call_to_actionCallToActionTypeThe call to action that will be displayed on the button at the time of checkout.
created_dateAWSDateTimeThe date and time the payment link was created.
currencyStringThe type of currency for the payment.
custom_success_messageStringThe message that will be displayed to the payor after a successful payment.
fee_modeFeeModeThe fee mode of the payments that will be made with the payment link.
is_activeBooleanIf set to true the payment link will be active and available to payors. If set to false the payment link will not be available to payors.
link_idStringThe unique id of the payment link.
link_nameStringThe name you give to the payment link for internal tracking purposes.
link_urlStringThe url of the payment link.
max_amountIntThe maximum amount the payor can pay if amount_is_variable is set to true.
merchant_uidStringThe Pay Theory unique identifier assigned to the merchant that the transaction belongs to.
min_amountIntThe minimum amount the payor can pay if amount_is_variable is set to true.
payment_nameStringThe name of the payment that will be displayed to the customer. This will be passed in as the reference at the time of the transaction.
payment_descriptionStringThe description of the payment that will be displayed to the customer.
redirect_urlStringThe url that the payor will be redirected to after a successful payment.
require_phoneBooleanIf set to true the payor will be required to enter their phone number before making the payment.

AcceptedPaymentMethodsEnum​

The payment methods that will be available to a payor when making a payment.

  • ALL
  • NOT_CASH
  • NOT_CARD
  • NOT_ACH
  • ONLY_CASH
  • ONLY_CARD
  • ONLY_ACH

CallToActionType​

The call to action that will be displayed on the button at the time of checkout.

  • PAY
  • DONATE
  • BOOK

{
paymentLinks(direction: FORWARD, limit: 10, offset: "", offset_id: "", query: SqlQuery) {
total_row_count
items {
merchant_uid
link_id
link_url
link_name
payment_name
payment_description
amount
currency
fee_mode
amount_is_variable
min_amount
max_amount
require_phone
call_to_action
accepted_payment_methods
account_code
custom_success_message
redirect_url
is_active
created_date
}
}
}

Parameters

Keytypedescription
limitIntThe number of payment links to return.
directionMoveDirectionThe direction of the pagination. Makes sure the results are returned in the correct order.
offsetStringThe value of the offset item for which the list is being sorted.
offset_idStringThe link_id of the offset item.
querySqlQueryThe query to filter the payment links with based on Pay Theory defined data. Detailed information about the query object can be found here

Returns

{
"data": {
"paymentLinks": {
"items": [
{
"link_id": "pt_link_XXXXX",
...
},
{
"link_id": "pt_link_XXXXX",
...
},
...
],
"total_row_count": 256
}
}
}
Keytypedescription
items[PaymentLink]The list of payment links that are returned from the query.
total_row_countIntThe total number of payment links that match the query. Used to help with pagination.

mutation {
createPaymentLink(input: {
accepted_payment_methods: AcceptedPaymentMethodsEnum,
account_code: String,
amount: Int,
amount_is_variable: Boolean,
call_to_action: CallToActionType,
currency: String,
custom_success_message: String,
fee_mode: FeeMode,
link_name: String,
max_amount: Int,
merchant_uid: String,
min_amount: Int,
payment_description: String,
payment_name: String,
redirect_url: String,
require_phone: Boolean
}) {
accepted_payment_methods
account_code
amount
amount_is_variable
call_to_action
created_date
currency
custom_success_message
fee_mode
link_id
is_active
link_name
link_url
max_amount
merchant_uid
min_amount
payment_description
payment_name
redirect_url
require_phone
}
}

Parameters

Keytypedescription
inputPaymentLinkInputThis object contains all the details needed to create a payment link.

PaymentLinkInput

Keytypedescription
accepted_payment_methodsAcceptedPaymentMethodsEnumThe payment methods that will be available to a payor when making a payment.
account_codeStringAccount Code that will be passed in to every transaction made with this payment link.
amountInt!The amount of the payment that the payor will be asked to pay or if amount_is_variable is set to the amount that will be the default amount.
amount_is_variableBooleanIf set to true the payor will be able to enter the amount they want to pay.
call_to_actionCallToActionTypeThe call to action that will be displayed on the button at the time of checkout.
currencyStringThe currency of the payment.
custom_success_messageStringThe message that will be displayed to the payor after they have successfully paid.
fee_modeFeeModeThe fee mode of the payments that will be made with the payment link.
link_nameString!The name you give to the payment link for internal tracking purposes.
max_amountIntThe maximum amount the payor can pay if amount_is_variable is set to true.
merchant_uidString!The merchant uid of the merchant that will be creating the payment link.
min_amountIntThe minimum amount the payor can pay if amount_is_variable is set to true.
payment_descriptionStringThe description of the payment that will be displayed to the customer.
payment_nameString!The name of the payment that will be displayed to the customer. This will be passed in as the reference at the time of the transaction.
redirect_urlStringThe url that the payor will be redirected to after they have successfully paid.
require_phoneBooleanIf set to true the payor will be required to enter their phone number before making the payment.

Returns

{
"data": {
"createPaymentLink": {
... // Payment Link Object
}
}
}

mutation {
updatePaymentLink(input: {
accepted_payment_methods: AcceptedPaymentMethodsEnum,
account_code: String,
amount: Int,
amount_is_variable: Boolean,
call_to_action: CallToActionType,
currency: String,
custom_success_message: String,
fee_mode: FeeMode,
link_id: String,
link_name: String,
max_amount: Int,
merchant_uid: String,
min_amount: Int,
payment_description: String,
payment_name: String,
redirect_url: String,
require_phone: Boolean
}) {
accepted_payment_methods
account_code
amount
amount_is_variable
call_to_action
created_date
currency
custom_success_message
fee_mode
link_id
is_active
link_name
link_url
max_amount
merchant_uid
min_amount
payment_description
payment_name
redirect_url
require_phone
}
}

Parameters

Keytypedescription
inputUpdatePaymentLinkInputThis object contains all the details needed to update a payment link.

UpdatePaymentLinkInput

Keytypedescription
accepted_payment_methodsAcceptedPaymentMethodsEnumThe payment methods that will be available to a payor when making a payment.
account_codeStringAccount Code that will be passed in to every transaction made with this payment link.
amountIntThe amount of the payment that the payor will be asked to pay or if amount_is_variable is set to the amount that will be the default amount.
amount_is_variableBooleanIf set to true the payor will be able to enter the amount they want to pay.
call_to_actionCallToActionTypeThe call to action that will be displayed on the button at the time of checkout.
currencyStringThe currency of the payment.
custom_success_messageStringThe message that will be displayed to the payor after they have successfully paid.
fee_modeFeeModeThe fee mode of the payments that will be made with the payment link.
link_idString!The id of the payment link that will be updated.
link_nameStringThe name you give to the payment link for internal tracking purposes.
max_amountIntThe maximum amount the payor can pay if amount_is_variable is set to true.
merchant_uidString!The merchant uid of the merchant that will be creating the payment link.
min_amountIntThe minimum amount the payor can pay if amount_is_variable is set to true.
payment_descriptionStringThe description of the payment that will be displayed to the customer.
payment_nameStringThe name of the payment that will be displayed to the customer. This will be passed in as the reference at the time of the transaction.
redirect_urlStringThe url that the payor will be redirected to after they have successfully paid.
require_phoneBooleanIf set to true the payor will be required to enter their phone number before making the payment.

Returns

{
"data": {
"updatePaymentLink": {
... // Payment Link Object
}
}
}