In an effort to simplify redirect, The new Secure Hosted Pages (SHP) is very different from the old version. The new SHP mirrors Secure Hosted Checkout (SHC) fairly closely, making it easier to transition between the two solutions.
SHP session: https://uat.ca.api.payfacto.cloud/secure-hosted-checkout/v1/links
SHP page: https://uat.ca.api.payfacto.cloud/secure-hosted-checkout/v1/browser/hosted-pages?link={linkId}
SHP session: https://ca.api.payfacto.cloud/secure-hosted-checkout/v1/links
SHP page: https://ca.api.payfacto.cloud/secure-hosted-checkout/v1/browser/hosted-pages?link={linkId}
The required field for the new payload is much simpler than the old payload. Only the following payload parameter is mandatory:
An example of this would be:
{ transactionType: "VERIFY" }
amount
how to display the amount field.
Valid values are disabled, editable and hidden
avs
how to display the AVS fields.
Valid values are address, both, and postal
description
add a description of the link.
Maximum length is 60 characters
email
display the e-mail field.
Default is false
expires
the date and time the page will expire in ISO-8601 format (YYYY-MM-DDTHH:MM:SS)
invoice
how to display the invoice field.
Valid values are disabled, editable, and hidden
invoiceNumber
the invoice number of the request.
Maximum length is 25 characters
language
the language the page should be displayed in.
Valid values are en and fr.
English (en) is the default value.
purchaseAmount
the amount of the purchase denominated in minor currency values (i.e $1 = 100)
sendEmail
send an email to the customer with the link.
The default is false
uses
The number of times a link can be used.
The default is 1.
successUrl
where to redirect the customer after a successful payment
declineUrl
where to redirect the customer after an unsuccessful payment

{
"header": "POST",
"headers": {
"Authorization": "Basic {API key}",
"Content-Type": "application/json; charset=utf-8",
"Accept": "application/json"
},
"body": "{ \"transactionType\": \"PURCHASE\"}"
}