Generate payment links through the PayPhone Api

The payment link is a very useful tool to increase the sales of your business and encourage customers to pay in a simple and fast way. The integration with the Api allows a more direct control over the transactions giving the facility to set maximum dates of use or limit its consumption to one time. With the use of the Api you can generate personalized links, for example, for a school you can generate a link for each student and have a direct control over the payments of tuition or pensions.

As with our other technological solutions, in order to implement the service you must meet certain requirements that we divide into two categories: Commercial Requirements y Development Requirements.

Business Requirements:

  • The shop that is going to receive the payments has to be registered in PayPhone as an enabled shop. To initiate the registration as a store you can do the following click here.
  • With the shop active and ready to transact, you must create a user of the type "developer". At this article we teach you how to create your user.

Development Requirements:

  • To generate links with the api you have to configure our platform so that your website connects correctly to PayPhone. Before starting you must prepare the platform for your application. Go to click here (Remember that the type of application is WEB).
  • Finally, you must obtain your authentication token, with which you can identify yourself to our services and add the respective security to the process. At this article the way to obtain the token is found.

(If you are a public company please contact to certify the process before going into production).

With the requirements ready, you must make a POST call indicating in the header your token of type "Authorization" with content "Bearer TUTOKEN". The call must be to the url:

In the body of the call you must send a Json object with the following parameters:

"amount": integer, // Total amount receivable from customer
"tax": integer, // Total tax to be charged, Only used when the billing type is VAT or Mixed.
"amountWithTax": integer, // Total amount taxed, excluding tax. Only used with 0% or Mixed rate
"amountWithoutTax": integer, // Total amount that does not record tax, Only used when the billing type is VAT or Mixed.
"service": integer, // Service amount.
"tip": integer, // Tip
"currency": "string", // Currency type, example "USD".
"reference": "string", // Payment reference, 10 characters max.
"clientTransactionId": "string", // Identifier you give to the transaction, max 16 characters.
"storeId": "string", // Store identifier, delivered by PayPhone.
"additionalData": "string", // Additional parameter for transaction control.
"oneTime": boolean, // True if the link is used only once, false if used multiple times.
"expireIn": integer // Number of hours for the link to expire.

Enter the swagger and you will be able to see its consultation and response model. Note: here you can see how to use the swagger.  

The amount, amountwithouttax, amountwithtax, service, tip and tax fields must be multiplied by 100, i.e. 1 dollar = 100.

Go to click here to see our error catalog you can check the Api responses.

Optional parameters that you do not use can be omitted. Remember that the Api can only be consumed up to 20 times per minute.

Leave A Comment?