API · processPayment

API v1
POST /api/v1/processPayment

What it does#

Returns the URL of the payment form for a purchase.

Authentication#

Requires the API bearer token in the Authorization header — see authentication.

Parameters#

redirectstringrequerido#

Site where you wait for the transaction response, for example mywebsite.com. It must support the GET method. Example response to the redirect: mywebsite.com?code=1&description=Transaction%20is%20approved.&auth=123456&order=TPYS-881WROIBQA1405468&tpt=4300&crd=&tilopay-transaction=4300&OrderHash=b02927cb...&returnData=Tilopay-dataReturn123456789&form_update=ok. When code = 1 the transaction is approved; anything else is declined. OrderHash is a unique string per transaction: to use it on the merchant side, write to sac@tilopay.com for instructions.

keystringrequerido#

Key associated with the customer. It is obtained in Admin · Tilopay Checkout.

amountstringrequerido#

Purchase amount.

currencystringrequerido#

Purchase currency in ISO format, for example USD, CRC, GTQ.

orderNumberstringrequerido#

Order number, it can be alphanumeric.

capturestringrequerido#

Capture and authorize: 1 yes, 0 no.

billToFirstNamestringrequerido#

First name.

billToLastNamestringrequerido#

Last names.

billToAddressstringrequerido#

Address.

billToAddress2stringrequerido#

Address 2.

billToCitystringrequerido#

City.

billToStatestringrequerido#

State in ISO format, for example CR-SJ (San José, Costa Rica) or US-CA (California, USA).

billToZipPostCodestringrequerido#

Post code.

billToCountrystringrequerido#

Country in ISO Alpha-2 code, for example CR (Costa Rica), US (USA) or GT (Guatemala).

billToTelephonestringrequerido#

Telephone.

billToEmailstringrequerido#

Buyer email.

shipToFirstNamestringrequerido#

First name.

shipToLastNamestringrequerido#

Last names.

shipToAddressstringrequerido#

Address.

shipToAddress2stringrequerido#

Address 2.

shipToCitystringrequerido#

City.

shipToStatestringrequerido#

State in ISO format, for example CR-SJ (San José, Costa Rica) or US-CA (California, USA).

shipToZipPostCodestringrequerido#

Post code.

shipToCountrystringrequerido#

Country in ISO Alpha-2 code, for example CR (Costa Rica), US (USA) or GT (Guatemala).

shipToTelephonestringrequerido#

Telephone.

subscriptionstringrequerido#

1 to force the customer to save the card in Tilopay, 0 not to.

platformstringrequerido#

Name of the platform where the transaction is generated.

returnDatastring#

Value that Tilopay returns in the final response. Sending a base 64 string is recommended.

hashVersionstring#

Only used when implementing hash verification. Possible values [V1, V2]; V1 by default.

token_versionstring#

Send as value "v2".

Request example#

The <...> values are placeholders: replace them with your own credentials and data.

{
  "redirect": "https://www.urlToRedirect.com",
  "key": "<api_key>",
  "amount": "1.00",
  "currency": "USD",
  "orderNumber": "1212122",
  "capture": "1",
  "billToFirstName": "DEMO",
  "billToLastName": "DEMO",
  "billToAddress": "San Jose",
  "billToAddress2": "Catedral",
  "billToCity": "JS",
  "billToState": "SJ",
  "billToZipPostCode": "10061",
  "billToCountry": "CR",
  "billToTelephone": "88888888",
  "billToEmail": "cliente@ejemplo.com",
  "shipToFirstName": "DEMO",
  "shipToLastName": "DEMO",
  "shipToAddress": "San Jose",
  "shipToAddress2": "Catedral",
  "shipToCity": "JS",
  "shipToState": "SJ",
  "shipToZipPostCode": "10061",
  "shipToCountry": "CR",
  "shipToTelephone": "88888888",
  "subscription": "0",
  "platform": "api",
  "returnData": "dXNlcl9pZD0xMg==",
  "hashVersion": "V2",
  "token_version": "v2"
}

Response#

{
  "type": "100",
  "html": "Use url redirect",
  "url": "https://secure.tilopay.com/htmls/1212122_574572148file.html"
}

To interpret a response that is not a success, see how to read an error response.

Last verified: 2026-08-29 · Owner: equipo-integraciones

View as raw Markdown