The request is used to verify funds. It is typically employed when merchants do not fulfill orders immediately.
Request
To make an authorization transaction, send a POST request to https://api.freepayment.online/beyag/transactions/authorizations with the following parameters:
Note
The request body must be wrapped in a top-level request{} object.
amount
required
integer Cost in minimal currency units, for example $32.45 must be sent as 3245.
currency
required
string A transaction currency in the ISO-4217 alpha-3 code format. For example, USD.
description
required
string (255) The order short description.
test
boolean true or false. The transaction will be a test one if it is true.
expired_at
string An expired time in ISO 8601 format. By default, infinite. Format: YYYY-MM-DDThh:mm:ssTZD, where YYYY – year (for example 2019), MM – month (for example 02), DD – day (for example 09), hh – hours (for example 18), mm – minutes (for example 20), ss – seconds (for example 45), TZD – time zone (+hh:mm или –hh:mm), for example +03:00 for Minks. If authorization is not made before this time is up it will turn to status expired
tracking_id
string An internal payment identifier (an order number or a customer number) assigned by the merchant. It can be used to find a payment in webhook notifications. If not submitted, it became similar to order_id value.
ip
string The IP address of the customer making a purchase at your shop.
language
string A language of your checkout page or customer. If the parameter is set and transaction notification emails to customers are enabled, Freepayment will dispatch those emails in language locale. English (en) is set by default. Possible values of language parameter.
notification_url
string A URL used for payment notifications. If it is not set, the system doesn't send notifications.
verification_url
string A URL where transaction verification request will be posted to. The verification request format equals to a transaction response format.
return_url
string A URL to return Customer when a transaction is completed.
iframe
boolean Set to true if you open payment options at your site in iFrame. An external payment method system will try to return iFrame matched layout.
conditionally required
object A section of the customer information. Check the description of the payment method to see if any of the section parameters are required.
string (40) The customer's billing ZIP or postal code. If country=US, zip format must be NNNNN or NNNNN-NNNN.
address
string (510) The customer's billing address.
phone
string (200) The customer's phone number.
device_id
string The customer's device ID.
taxpayer_id
string The customer's taxpayer ID.
object A section of parameters specific to the payment method that you plan to use.
type
required
string A type or a name of the payment method.
token
string A payment method token which has been received earlier in a transaction response.
conditionally required
object A section with additional transaction details. Check the description of the payment method to see if any of the section parameters are required.
contract
array An array consisting of elements:
recurring - Freepayment returns a payment method token to use it in subsequent charges without to ask customer to re-enter payment method details again.
receipt_text
array A text to add to an email notification to the customer. Submit it as an array of strings, for example, ["First line", "Second line"].
conditionally required
object A section of additional information about the customer. Check the description of the payment method to see if any of the section parameters are required.
id
string The customer's id. Check the chapter about the payment method to see if any of the section parameters are required.
If authorization request accepted successfully response will contain a JSON message with set of fields. After finishing authorization the same message will send as a notification to the URL from notification_url. Received JSON message (response) has the only key transaction with the object as follows:
object
uid
required
string A unique identifier of the transaction (uid).
type
required
string A transaction type.
status
required
string A transaction status.
amount
required
integer The authorized amount in minimal currency units as it was submitted in the request, for example 3245 stands for $32.45.
currency
required
string A transaction currency in the ISO-4217 alpha-3 code format. For example, USD.
description
required
string (255) The short description of the transaction as it was submitted in the request.
created_at
required
string A date and time when the transaction was created in the ISO 8601 format.
updated_at
required
string Time when transaction was updated in ISO 8601 format.
method_type
required
string The name of the payment method as it was submitted in the request.
receipt_url
required
string A transaction receipt URL.
message
string Message from system.
tracking_id
string The ID of your transaction or order. Can be multiple values separated with semicolons. For example, "cbe59142-90af-4aea-b5a5-5bf3f66cf3da;f7883cb9-0e26-43a7-beb7-4027cb55d1a6;4a6a89d5-6950-400f". If multiple values are sent in the request, the transaction search in the back office system can be performed by any of them.
test
boolean true or false. The transaction will be a test one if it is true
language
string Language of your checkout page or customer.
Pay attention that there are no input elements in the response for submitting form (<input type="submit" name="submit" value="Pay">). You need to add this input by yourself according to design and language preferences of your site.