Payment Service API › SMS Payment Link

SMS Payment Link

Generate a payment link and send it straight to the customer by SMS.

API reference menu

When to use this

Mid-call or mid-chat, fire an SMS to the customer's phone with a pay-by-link URL. Works on the same transaction flag as Links, with SMS dispatch baked in.

Endpoint

POST https://accounts.paytia.com/api/payment_service

Try it

Paste your sandbox key, edit any field, and hit Execute. Nothing is stored — the key travels to the Paytia proxy and the response comes straight back.

Try it
POST https://accounts.paytia.com/api/payment_service

Sandbox or live key — nothing is stored.

String: WEBHOOK TRANSACTION URL FOR PAYMENT STAGE (URL on which we will send payment gateway response to the third party)

String: WEBHOOK URL FOR PAYMENT STAGE (Specify the call back URL you want to receive webhook notifications to) (In the case of linktopay: this will be the linktopay_url you want the Link to pay response to be sent)

Decimal: A numeric value for the transaction gross charge stated to two decimal places

Number: The numeric ID number of the agent is up to 6 digits long, required with telephony payments. The length of this field is set by the Paytia platform so please check what your account is set to. By default, Paytia uses three-digit ID numbers for agents allowing 999 agent values to be utilised.

String: Paytia required value for Agent Name

String: Invoice Reference Number (this field is mapped and passed to the final payment gateway connector in ) for referencing the order. Note: on some payment gateways this is unique field meaning the payment gateway will reject repeat values that are not unique).

Integer: This value is used to switch the value passed in reference_number and reference_id so that 0 = show the reference_id field in the Paytia ACA user webform screen and send to reference_id to the PSP as the reference number field. 1 = show the reference_number value in the ACA screen and pass both reference_id and reference number to PSP.

String: use for accounting purposes. This is also posted onto the associated payment gateway where the payment gateway supports additional payment metadata fields.

String: First name of the card holder

String: Last name (surname) of the card holder

String: Billing address line 1, used in AVS check.

Two letter country code defined in ISO 3166-1

String: Billing city.

String: Billing street.

String: Billing country/state

String: Billing postal code, used in AVS check

String: Cardholder country code (in two alpha character ISO format)

String: Recipient's first names.

String: Recipient's last name.

String: Billing address line 1, used in AVS check.

String: Shipping city.

String: Shipping Postal code/Zipcode

String: Shipping country/state

String:Two-letter country code defined in ISO 3166-1

String: Three alpha character values (If null then the default currency will pick up from merchant account according to country set) Currenly currency is controlled only from Operating settings in the merchant portal https://demo.pay729.{domain_extension}/merchant/addon_license_country

String: ISO country code (2 alpha characters) (If null then the default language will be picked up from merchant country code set on the Paytia admin portal)

Numeric: Set the link expiry timer (integer value in seconds) 0 default value (link will not expire)

Integer: Enum (0 - 1) This controls linktopay url for payment 0 = will send linktoapy url and webhook response to webhook url 1 = return linktopay_url in response 0 is active by default

Stripe ONLY: This works when transaction_flag is set to 4 Action - 0 = not used 1 = Reserve payment link 2 = Capture card (TOKEN) 3 = Recurring payment schedule 4 = Capture (TOKEN) then charge an immediate amount

Integrer: Contols the sending of the message format Email vs SMS message delviery. 1 is the default setting 1 = Send email message format 2 = Send SMS message format

Integrer: Is Embedded URL - Used when posting to the Paytia URL endpoint api/payment_service. If you send value=1 in the is_embedded_url field Paytia will return the payment checkout page as an Iframe URL in the post response. Note: used with transaction_flag=8

Integer: Enum (0 - 2)This controls Paytia returning the form the agent will see showing/allowing the payment data to be captured 0 = It will not return Iframe url 1 = It will return Iframe url in response 2 = blank request accepted and will return Iframe url 0 is active by default Note: Set agent form to 0 if using payment links with a bot service where no agent is involved.

Integer: Enum (0 - 1) Lock the fields on the agent form so they cannot be edited 0 = unlocked 1 = locked

Numeric: This field control if instructing Paytia to send a link as an email to an email address you provide. 0 = disabled 1 = send using Paytia email service 2 = send using Paytia merchant customised email server settings 0 is the default value

String: Used to provide Paytia with the email address to send the link to the customer on If an email address is present and the send_email value is not set to 0 then Paytia will not return a web_payment_form URL

Integer: send_receipt requires a licence called "Receipt to the customer" to be active on your account. 0 = off (by default) 1 = on / send email receipt to the email_address value passed

String: A 'UNQUIQUE' ID value for the transaction. This is passed back with each webhook response so you can track the transaction flow.

Integer: Enum (0 - 9) 0 = Phone - None required = immediate charge 1 = Phone - Capture - Tokenisation only (ensure you send 0.00 in amount) 2 = Phone - Pre-auth (Capture to pre-auth (reserve) and take an immediate payment) 3 = Phone - Pre-auth only (set a reserve on a card and return a transaction token) 4 = Link to Pay 5 = Phone - Recurring payment 6 = Bank to bank payments (to be added) 7 = Phone - Rolling reserve (Stripe only) 8 = Checkout payment type (used for "Checkout" in thirdparty/payment_service and API/payment_service) 9 = Bank outbound payment processing

Integrer: Turns on SMS sending 0 = Disabled (do not send SMS) 1 = send SMS message This is the default setting. 1 = Send SMS message

String: Country Phonecode - allows Paytia to insert the correct country dialling code for you i.e. GB will be inserted as +44 Please ensure you send the value as a two alpha character ISO format e.g. GB Note: used with transaction_flag=8

String: PhoneNumber - allows the passing of the customers preffered telephone number excluding the country code or the leading Zero digit. This will be shown with the country code you sent in. Note: used with transaction_flag=8

Integrer: Secure code generates a unique 4 digit numeric code agents share with customs who can then verify the message received's trust by matchin gthe secure code value received. 0 = disabled 1 = generate and send secure code

Decimal: A numeric value for the transaction gross charge stated to two decimal places. This is used to send a reserve (secondary) amount. If transaction_flag = 2 (Reserve/charge), reserve_amount can be set as amount to be reserved on a payment card, and the amount field will be the amount that needs to be charged immediately. If the transaction_flag = 3 (Reserve), the reserve_amountvalue only will be reserved on the card for payment capture later in a payment flow.

String: Stripe and Braintree ONLY This field control allows you to post the cus_ value (Stripe), or the CustomerID or a new ID value (Braintree)., representing the customer record the transaction should be placed for.

Briantree payment gateway ONLY 0 = Default (off) 1 = Use gateway_customer_id to create a new customer ID. If a 1 in passed this field, the system will first check if the customer ID passed in the gateway_customer_id field already exists on the payment gateway. If it does, an error message will be returned to prompt the user to enter a different customer ID. If the ID does not exist, a new customer record will be created on the payment gateway using the ID value specified customer in the gateway_customer_id field.

String: Allows a value to be passed for the customer's company name. This is displayed on the payment page the customer views to complete their payment.

Integer: Enum - Stripe ONLY (0 - 1) This setting controls the storage of the payment card after the payment has been completed. You will use this with Stripe if you want to delete vs retain the card on file. If the passed value is = 0 then the payment card is retained after the transaction completes. If the value passed is = 1 then the payment card is removed after completing the transaction.

Stripe and Braintree Gateways only 0 = default (pay with existing payment card on customer account) 1 = capture new payment card (pm_ value (Stripe) or customer ID (Braintree)) to process the payment

Integer: Enum (0 - 1) This controls Paytia capturing, storing, and returning the card expiry date after a telephone (MOTO) transactione. 0 = Do not store expiry date 1 = Capture, store and return the expiry date in te transaction outcome webhook 0 is active by default

curl
curl --location --request POST 'https://accounts.paytia.com/api/payment_service' \
  --header 'X-API-KEY: YOUR_API_KEY' \
  --form 'webhook_url_transaction={ADD YOUR WEBHOOK URL HERE}' \
  --form 'webhook_url={ADD YOUR WEBHOOK URL HERE}' \
  --form 'amount=0.00' \
  --form 'agent_id=0100' \
  --form 'agent_name=Agent Name' \
  --form 'reference_number=r{visible reference number}' \
  --form 'reference_flag=0' \
  --form 'account_number={Visible account number}' \
  --form 'firstname=Firstname' \
  --form 'lastname=Lastname' \
  --form 'billinghouseno=10' \
  --form 'billingcountry=GB' \
  --form 'billingcity=Billingcity' \
  --form 'billingstreet=Billingstreet' \
  --form 'billingstate=Billingstate' \
  --form 'billingpostcode={Postal Code}' \
  --form 'countrycode=GB' \
  --form 'shippingfirstname=Shippingfirstname' \
  --form 'shippinglastname=Shippinglastname' \
  --form 'shippinghouseno=10' \
  --form 'shippingcity=Southampton' \
  --form 'shippingpostcode={Postal Code}' \
  --form 'shippingstate=Hampshire' \
  --form 'shippingcountry=GB' \
  --form 'currency_code=GBP' \
  --form 'languagecode=EN' \
  --form 'link_expiry=300' \
  --form 'linktopay_url=1' \
  --form 'payment_link_type=0' \
  --form 'payment_link_via=2' \
  --form 'is_embedded_url=0' \
  --form 'web_agent_form=1' \
  --form 'web_agent_form_lock=0' \
  --form 'email_send=1' \
  --form 'email_address=demo+billing-customer@paytia.com' \
  --form 'send_receipt=1' \
  --form 'reference_id={unique reference number}' \
  --form 'transaction_flag=4' \
  --form 'sms_send=1' \
  --form 'country_phonecode=GB' \
  --form 'phone_number={Customer'\''s mobile number excluding lead zero}' \
  --form 'secure_code=1' \
  --form 'reserve_amount=0.00' \
  --form 'gateway_customer_id={on PSP customer ID value}' \
  --form 'gateway_customer_control=1' \
  --form 'company_name=company_name' \
  --form 'payment_method_detach=0' \
  --form 'payment_method=1' \
  --form 'store_expiry=1'
Response
No response yet. Paste your key, tweak the values, and click Execute.

Fields

Full field-by-field reference below. Required vs optional varies by flow — the try-it explorer above starts with sensible defaults.

FieldTypeDescription
webhook_url_transactiontextString: WEBHOOK TRANSACTION URL FOR PAYMENT STAGE (URL on which we will send payment gateway response to the third party)
webhook_urltextString: WEBHOOK URL FOR PAYMENT STAGE (Specify the call back URL you want to receive webhook notifications to) (In the case of linktopay: this will be the linktopay_url you want the Link to pay response to be sent)
amounttextDecimal: A numeric value for the transaction gross charge stated to two decimal places
agent_idtextNumber: The numeric ID number of the agent is up to 6 digits long, required with telephony payments. The length of this field is set by the Paytia platform so please check what your account is set to. By default, Paytia uses three-digit ID numbers for agents allowing 999 agent values to be utilised.
agent_nametextString: Paytia required value for Agent Name
reference_numbertextString: Invoice Reference Number (this field is mapped and passed to the final payment gateway connector in ) for referencing the order. Note: on some payment gateways this is unique field meaning the payment gateway will reject repeat values that are not unique).
reference_flagselectInteger: This value is used to switch the value passed in reference_number and reference_id so that 0 = show the reference_id field in the Paytia ACA user webform screen and send to reference_id to the PSP as the reference number field. 1 = show the reference_number value in the ACA screen and pass both reference_id and reference number to PSP.
account_numbertextString: use for accounting purposes. This is also posted onto the associated payment gateway where the payment gateway supports additional payment metadata fields.
firstnametextString: First name of the card holder
lastnametextString: Last name (surname) of the card holder
billinghousenotextString: Billing address line 1, used in AVS check.
billingcountrytextTwo letter country code defined in ISO 3166-1
billingcitytextString: Billing city.
billingstreettextString: Billing street.
billingstatetextString: Billing country/state
billingpostcodetextString: Billing postal code, used in AVS check
countrycodetextString: Cardholder country code (in two alpha character ISO format)
shippingfirstnametextString: Recipient's first names.
shippinglastnametextString: Recipient's last name.
shippinghousenotextString: Billing address line 1, used in AVS check.
shippingcitytextString: Shipping city.
shippingpostcodetextString: Shipping Postal code/Zipcode
shippingstatetextString: Shipping country/state
shippingcountrytextString:Two-letter country code defined in ISO 3166-1
currency_codetextString: Three alpha character values (If null then the default currency will pick up from merchant account according to country set) Currenly currency is controlled only from Operating settings in the merchant portal https://demo.pay729.{domain_extension}/merchant/addon_license_country
languagecodetextString: ISO country code (2 alpha characters) (If null then the default language will be picked up from merchant country code set on the Paytia admin portal)
link_expirytextNumeric: Set the link expiry timer (integer value in seconds) 0 default value (link will not expire)
linktopay_urlselectInteger: Enum (0 - 1) This controls linktopay url for payment 0 = will send linktoapy url and webhook response to webhook url 1 = return linktopay_url in response 0 is active by default
payment_link_typeselectStripe ONLY: This works when transaction_flag is set to 4 Action - 0 = not used 1 = Reserve payment link 2 = Capture card (TOKEN) 3 = Recurring payment schedule 4 = Capture (TOKEN) then charge an immediate amount
payment_link_viaselectIntegrer: Contols the sending of the message format Email vs SMS message delviery. 1 is the default setting 1 = Send email message format 2 = Send SMS message format
is_embedded_urlselectIntegrer: Is Embedded URL - Used when posting to the Paytia URL endpoint api/payment_service. If you send value=1 in the is_embedded_url field Paytia will return the payment checkout page as an Iframe URL in the post response. Note: used with transaction_flag=8
web_agent_formselectInteger: Enum (0 - 2)This controls Paytia returning the form the agent will see showing/allowing the payment data to be captured 0 = It will not return Iframe url 1 = It will return Iframe url in response 2 = blank request accepted and will return Iframe url 0 is active by default Note: Set agent form to 0 if using payment links with a bot service where no agent is involved.
web_agent_form_lockselectInteger: Enum (0 - 1) Lock the fields on the agent form so they cannot be edited 0 = unlocked 1 = locked
email_sendselectNumeric: This field control if instructing Paytia to send a link as an email to an email address you provide. 0 = disabled 1 = send using Paytia email service 2 = send using Paytia merchant customised email server settings 0 is the default value
email_addresstextString: Used to provide Paytia with the email address to send the link to the customer on If an email address is present and the send_email value is not set to 0 then Paytia will not return a web_payment_form URL
send_receiptselectInteger: send_receipt requires a licence called "Receipt to the customer" to be active on your account. 0 = off (by default) 1 = on / send email receipt to the email_address value passed
reference_idtextString: A 'UNQUIQUE' ID value for the transaction. This is passed back with each webhook response so you can track the transaction flow.
transaction_flagselectInteger: Enum (0 - 9) 0 = Phone - None required = immediate charge 1 = Phone - Capture - Tokenisation only (ensure you send 0.00 in amount) 2 = Phone - Pre-auth (Capture to pre-auth (reserve) and take an immediate payment) 3 = Phone - Pre-auth only (set a reserve on a card and return a transaction token) 4 = Link to Pay 5 = Phone - Recurring payment 6 = Bank to bank payments (to be added) 7 = Phone - Rolling reserve (Stripe only) 8 = Checkout payment type (used for "Checkout" in thirdparty/payment_service and API/payment_service) 9 = Bank outbound payment processing
sms_sendselectIntegrer: Turns on SMS sending 0 = Disabled (do not send SMS) 1 = send SMS message This is the default setting. 1 = Send SMS message
country_phonecodetextString: Country Phonecode - allows Paytia to insert the correct country dialling code for you i.e. GB will be inserted as +44 Please ensure you send the value as a two alpha character ISO format e.g. GB Note: used with transaction_flag=8
phone_numbertextString: PhoneNumber - allows the passing of the customers preffered telephone number excluding the country code or the leading Zero digit. This will be shown with the country code you sent in. Note: used with transaction_flag=8
secure_codeselectIntegrer: Secure code generates a unique 4 digit numeric code agents share with customs who can then verify the message received's trust by matchin gthe secure code value received. 0 = disabled 1 = generate and send secure code
reserve_amounttextDecimal: A numeric value for the transaction gross charge stated to two decimal places. This is used to send a reserve (secondary) amount. If transaction_flag = 2 (Reserve/charge), reserve_amount can be set as amount to be reserved on a payment card, and the amount field will be the amount that needs to be charged immediately. If the transaction_flag = 3 (Reserve), the reserve_amountvalue only will be reserved on the card for payment capture later in a payment flow.
gateway_customer_idtextString: Stripe and Braintree ONLY This field control allows you to post the cus_ value (Stripe), or the CustomerID or a new ID value (Braintree)., representing the customer record the transaction should be placed for.
gateway_customer_controltextBriantree payment gateway ONLY 0 = Default (off) 1 = Use gateway_customer_id to create a new customer ID. If a 1 in passed this field, the system will first check if the customer ID passed in the gateway_customer_id field already exists on the payment gateway. If it does, an error message will be returned to prompt the user to enter a different customer ID. If the ID does not exist, a new customer record will be created on the payment gateway using the ID value specified customer in the gateway_customer_id field.
company_nametextString: Allows a value to be passed for the customer's company name. This is displayed on the payment page the customer views to complete their payment.
payment_method_detachselectInteger: Enum - Stripe ONLY (0 - 1) This setting controls the storage of the payment card after the payment has been completed. You will use this with Stripe if you want to delete vs retain the card on file. If the passed value is = 0 then the payment card is retained after the transaction completes. If the value passed is = 1 then the payment card is removed after completing the transaction.
payment_methodselectStripe and Braintree Gateways only 0 = default (pay with existing payment card on customer account) 1 = capture new payment card (pm_ value (Stripe) or customer ID (Braintree)) to process the payment
store_expiryselectInteger: Enum (0 - 1) This controls Paytia capturing, storing, and returning the card expiry date after a telephone (MOTO) transactione. 0 = Do not store expiry date 1 = Capture, store and return the expiry date in te transaction outcome webhook 0 is active by default

Next

Ready to build with Paytia?

The docs are open. Keys are gated — drop us a line and we'll issue sandbox credentials so you can try every flow against a real endpoint.