Creates a transaction that is associated with a provided CustomerUID.
At most one of api_only_options
and hosted_options
should be set. Including api_only_options
will cause a transaction to be created for which images will be provided directly to the Berbix API, as opposed to using a web or mobile client SDK. If (and only if) the api_only_options
are set, the first_step
property will be present in the response. Including hosted_options
will result in a hosted transaction being created.
Returns a short-lived access_token
to fetch transaction metadata and a short-lived client_token
to initialize the Berbix Verify flow. The endpoint also returns a long-lived refresh_token
to regenerate the other tokens which should be stored in your application database alongside the associated user ID used for the CustomerUID.
Requires basic auth using API Secret
as username with no password.
The creation of test transactions is subject to rate-limiting based on the number of test transactions completed in the last 4 hours.
API Library Usage
var transactionTokens = client.createTransaction({
customerUid: "interal_customer_uid", // ID for the user in internal database
templateKey: "<<template_key>>", // Template key for this transaction
})
$transactionTokens = $client->createTransaction(array(
'customerUid' => "interal_customer_uid", // ID for the user in internal database
'templateKey' => "<<template_key>>", // Template key for this transaction
));
var transactionTokens = client.createTransaction({
"customer_uid": "interal_customer_uid", // ID for the user in internal database
"template_key": "<<template_key>>", // Template key for this transaction
})
transaction_tokens = client.create_transaction(
customer_uid: 'internal_customer_uid', # ID for the user in client database
template_key: '<<template_key>>', # Template key for this transaction
)
CreateHostedTransactionRequest request = new CreateHostedTransactionRequest();
request.customerUid = "interal_customer_uid"; // ID for the user in internal database
request.templateKey = "<<template_key>>"; // Template key for this transaction
CreateHostedTransactionResponse response = berbixClient.createHostedTransaction(request);
tokens, err := client.CreateTransaction(&CreateTransactionOptions{
CustomerUID: "internal_customer_uid", # ID for the user in client database
TemplateKey: "<<template_key>>", # Template key for this transaction,
})