TR EN


Send Payment Request [recurring/normal]



- Send payment request is useful to ask customers via email or sms about their payments by sending them payment link.
- Payment Request link is unique with token so that by click on it, it shows predefined payment page, ready to just enter the card information and pay.
- There are two kinds of payment request, one is recurring payment request, another is just normal request. - Total requested money can be defined in creating time, or it can be selected by assign payment item to this request. - Recurring payment request can be daily, monthly and annually. - There is ability to decide about repetition number and start date.


Request parameters
merchant: required
merchant name which you created in your Payfull account.

type: required
Transaction type should be Set.

set_param: required
The name of parameter you like to save, so it should be Request.

language: required
Response message language can be en / tr

client_ip: required
The client IP who uses the application which sends the request to the API.

title: required
Payment Request Title

recipient: required
Array of all recipients emails, this array should be converted to json format before send it

start_date: required
Request Start Date

end_date: required
Request End Date

changeable_quantity: required
Customer can change the quantity?

predefined_payment: required
Total requested amount will be taken by choose predefined payment item

payment_item: optional
Payment item ID for this request, if predefined_payment = 1 then this parameters is required.

payment_free_amount: optional
Total requested money, if predefined_payment = 0 then this parameters is required.

payment_free_title: optional
Title on the item [product] you are asking money for it, if predefined_payment = 0 then this parameters is required.

quantity: required
Item [product] quantity.

currency: required
Currency can be TRY/USD/EUR/GBP

kdv: required
KDV can be 0% / 1% / 8% / 18%

via_email_sms: required
Payment Request can be send by 0:email / 1:sms / 2:email+sms

email_text: optional
Email message text, if via_email_sms = 0 or 2 then this parameters is required.
There are couple of tags help you add important information automatically in the message text.
  • [email or name-surname]: recipient email if he is not registered, or his fullname
  • [PRDATE]: create date
  • [PRNAME]: Sender name
  • [TOTAL]: Total requested money
  • [LASTPAYMENTDATE]: due date

sms_text: optional
SMS message text, if via_email_sms = 1 or 2 then this parameters is required.
There are couple of tags help you add important information automatically in the message text.
  • [email or name-surname]: recipient email if he is not registered, or his fullname
  • [PRDATE]: create date
  • [PRNAME]: Sender name
  • [TOTAL]: Total requested money
  • [LASTPAYMENTDATE]: due date
  • [LINK]: Checkout link for this request

request_type: required
Request type can be normal or recurring

request_action_type: optional
Recurring Payment Request can be manual or auto, if request_type = recurring then this parameters is required.

request_period: optional
Recurring Payment Request period can be 1:day / 2:week / 3:month / 4:year, if request_type = recurring then this parameters is required.

repetition_count: optional
Recurring Payment Request repetition number, if request_type = recurring then this parameters is required.

hash: required
Generated hash code on the caller side

To generate the hash code please follow the steps below:
  • - Arrange the parameters alphabetically from A to Z
  • - Create a parameters string which has the length for each parameters with its value side by side
  • - Create the sha256 hash code from the parameters string and pass the merchant password as Shared secret key
  • - Add the hash code to the request parameters


Sample request


merchant: api_merch
type: Set
set_param: Request
language: tr
client_ip: 192.168.1.1
title: payment title here
recipient: {[recipientA@hotmail.com, recipientB@hotmail.com]}
start_date: 01-09-2016',
end_date: 01-01-2030'
changeable_quantity: 0
predefined_payment: 0
payment_item: 0
payment_free_amount: 12.25
payment_free_title: Item Title here
quantity: 1
currency: TRY
kdv: 1
via_email_sms: 0
email_text: email text come here
sms_text: sms text come here
request_type: recurring
request_action_type: auto
request_period: 1
repetition_count: 2
hash: 14339MjuG01015018



Sample Response


{
"status":1,
"ErrorMSG":"",
"ErrorCode":"00",
"data":{"approved":true}
}


PHP Example