curl --request GET \
--url https://api.staging.payrails.io/merchant/workflows/{workflowCode}/executions/{executionId}/history \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.staging.payrails.io/merchant/workflows/{workflowCode}/executions/{executionId}/history"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api.staging.payrails.io/merchant/workflows/{workflowCode}/executions/{executionId}/history', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.staging.payrails.io/merchant/workflows/{workflowCode}/executions/{executionId}/history",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://api.staging.payrails.io/merchant/workflows/{workflowCode}/executions/{executionId}/history"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("Authorization", "Bearer <token>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://api.staging.payrails.io/merchant/workflows/{workflowCode}/executions/{executionId}/history")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.staging.payrails.io/merchant/workflows/{workflowCode}/executions/{executionId}/history")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["Authorization"] = 'Bearer <token>'
response = http.request(request)
puts response.read_body{
"events": [
{
"notificationEvent": {
"id": "b8fe6271-5d71-4d28-b8e8-89e64acc0c49",
"workflowCode": "payment-acceptance",
"workflowExecutionId": "8a780068-bf6b-4ba1-9b24-d32606b2fc19",
"workflowExecutionEventId": "42dc198e-fee0-45e9-aaa6-765036a15ade",
"workspaceId": "7f9f1882-a103-408d-ac96-46a7021e537a",
"createdAt": "2022-02-03T14:38:40.557Z",
"updatedAt": "2022-02-03T14:38:40.557Z",
"status": "delivered",
"body": "{\"action\":\"authorize\",\"actionId\":\"71f9cfed-1583-4483-b5d8-49af91749d85\",\"amount\":{\"currency\":\"EUR\",\"value\":\"22.50\"},\"execution\":{\"id\":\"8a780068-bf6b-4ba1-9b24-d32606b2fc19\",\"holderId\":\"fe8397fc-3301-4ffa-b0bc-b7f83e835a64\",\"holderReference\":\"84c51416-e06c-4dff-a76f-72fd66f3182d\",\"merchantReference\":\"679b48ed-ae78-48ae-b19a-460b52c2354d\"}}"
},
"event": "executionActionCompleted",
"time": "2022-04-22T17:53:36.814Z",
"details": {
"action": "authorize",
"actionId": "1aa0ef20-36cb-4485-b60e-0526c3699014",
"execution": {
"workflowCode": "d5454c2f-ae5e-44f3-8edf-f6dad64f005f",
"id": "c5454c2f-ae5e-44f3-8edf-e6dad64f006f",
"merchantReference": "order_3573894940903",
"holderReference": "customer123",
"meta": {
"order": {
"reference": "order_3573894940903"
},
"customer": {
"reference": "1231905323475",
"country": {
"code": "DE"
}
},
"clientContext": {
"ipAddress": "217.110.239.132",
"osType": "ios"
}
}
},
"success": true,
"amount": {
"value": "12.50",
"currency": "EUR"
},
"paymentComposition": [
{
"operationType": "Authorize",
"amount": {
"currency": "EUR",
"value": "24.00"
},
"integrationType": "api",
"operationResult": "Success",
"operationProviderReference": "provider-reference-example",
"providerId": "5eb08624-ecce-4cbc-9a8a-61d484172815",
"provider": {
"id": "5eb08624-ecce-4cbc-9a8a-61d484172815",
"name": "checkout",
"displayName": "Checkout.com",
"type": "Payment",
"status": "active",
"configSchema": "{\"required\":[\"accountDetails\",\"credentials\"],\"definitions\":{\"PspCheckoutAccountDetails\":{\"required\":[\"processingChannelId\"],\"properties\":{\"processingChannelId\":{\"title\":\"Processing channel ID\",\"minLength\":1,\"pattern\":\"^pc_.+$\",\"type\":\"string\"}},\"type\":\"object\"},\"PspCheckoutCredentials\":{\"required\":[\"clientId\",\"clientSecret\"],\"properties\":{\"clientId\":{\"title\":\"Client ID\",\"description\":\"Client ID used to authenticate requests to the Checkout API\",\"minLength\":1,\"type\":\"string\"},\"clientSecret\":{\"title\":\"Client Secret\",\"description\":\"Client Secret used to authenticate requests to the Checkout API\",\"minLength\":1,\"type\":\"string\",\"format\":\"secret\"},\"hmacKeys\":{\"title\":\"HMAC keys\",\"description\":\"HMAC keys used to authenticate notifications from the Checkout API\",\"pattern\":\"^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$\",\"items\":{\"type\":\"string\"},\"type\":\"array\",\"format\":\"secret\"}},\"type\":\"object\"}},\"properties\":{\"accountDetails\":{\"$ref\":\"#/definitions/PspCheckoutAccountDetails\",\"title\":\"Account details\"},\"credentials\":{\"$ref\":\"#/definitions/PspCheckoutCredentials\",\"title\":\"Checkout credentials\"}},\"type\":\"object\"}",
"createdAt": "2021-01-05T10:20:00.000Z",
"updatedAt": "2022-06-14T11:50:00.000Z"
},
"providerConfigId": "a0ad4cd3-f243-4f1a-b294-f7c3df701b10",
"paymentId": "c9e1a8ea-a0de-42bd-bcfd-46d3f437b5fe",
"paymentInstrumentId": "a4a7ed2d-bdcc-46a3-a9f2-701b5d7924b0",
"storeInstrument": true,
"paymentMethodCode": "card",
"accountFundingTransaction": true,
"authorizationCode": "X055258",
"acquirerReference": "1233524535345",
"providerReference": "1027724325777",
"retrievalReference": "8657867867867",
"acquirerAccountCode": "MI21",
"acquirerCountryCode": "NL",
"acquirerMID": "50TP",
"avsResultCode": "Y",
"cvvResultCode": "M",
"success": true,
"workspaceId": "7f9f1882-a103-408d-ac96-46a7021e537a",
"paymentInstrument": {
"tokens": [
{
"type": "psp",
"reference": "provider-token",
"meta": {
"holderReference": "provider-customer-reference"
}
}
],
"id": "b8fe6271-5d71-4d28-b8e8-89e64acc0c49",
"holderId": "788c7c09-a490-4603-915a-e2a957a6cca1",
"createdAt": "2022-04-22T17:53:36.814Z",
"updatedAt": "2022-04-22T17:53:36.814Z",
"paymentMethod": "card",
"displayName": "Visa **** 1111",
"description": "Personal card.",
"merchantReference": "ref_C47C47",
"fingerprint": "739abff0-406a-4d32-8cfb-701e12be5848",
"status": "created",
"futureUsage": "CardOnFile",
"networkTransactionReference": "987654321234567",
"data": {
"network": "visa",
"bin": "416598",
"binLookup": {
"bin": "416598",
"network": "visa",
"localNetwork": "bancontact",
"issuer": "Revolut",
"issuerCountry": {
"code": "LT",
"name": "Lithuania",
"iso3": "LTU"
},
"segment": "infinite",
"type": "debit",
"typeDetails": "personal"
},
"suffix": "1111",
"expiryMonth": "10",
"expiryYear": "2026",
"holderName": "John Doe",
"billingAddress": {
"country": {
"code": "DE",
"name": "Germany"
},
"postalCode": "10117"
}
}
},
"captureMode": "Instant"
}
]
},
"workspaceId": "0bd0f200-fcff-4f63-8b16-0f692d62bd2f",
"eventTrigger": "api"
},
{
"event": "ruleEngineExecuted",
"time": "2022-02-03T14:34:44.857Z",
"details": {
"action": "determineProviderOptions",
"context": {
"meta": {
"order": {
"reference": "******"
},
"customer": {
"reference": "******"
},
"clientContext": {
"ipAddress": "******"
}
}
},
"rulesets": [
{
"id": "670e7a35-c282-469f-b77f-336b75bcbe55",
"version": 1,
"createdAt": "2022-11-02T12:27:22.73972022Z",
"trigger": {
"on": "determineProviderOptions",
"filter": {
"providerConfigID": "5eb08624-ecce-4cbc-9a8a-61d484172815"
}
},
"rules": [
{
"condition": {
"field": "customer.country.code",
"operator": "=",
"value": "DE"
},
"action": {
"type": "setPriority",
"params": {
"priority": 1
}
}
}
],
"defaultAction": {
"type": "skip"
},
"workspaceId": "7f9f1882-a103-408d-ac96-46a7021e537a"
}
],
"evaluations": [
{
"chosenRule": {
"condition": {
"field": "customer.country.code",
"operator": "=",
"value": "DE"
},
"action": {
"type": "setPriority",
"params": {
"priority": 1
}
}
},
"action": {
"type": "setPriority",
"params": {
"priority": 1
}
},
"ruleEvaluationResults": [
{
"rule": {
"condition": {
"field": "customer.country.code",
"operator": "=",
"value": "DE"
},
"action": {
"type": "setPriority",
"params": {
"priority": 1
}
}
},
"result": true
}
],
"entity": {
"id": "d9479775-3926-44af-9fcc-1c83ff4dcad6",
"providerId": "01039f19-d151-48b4-86aa-b36e68323e4e",
"createdAt": "2022-04-22T17:53:36.814Z",
"config": {
"accountDetails": {
"processingChannelId": "pc_0a70d769-9c20-416e-a436-4a323ce7eabf"
},
"credentials": {
"clientId": "ack_3b2105ac-0190-4e18-a46c-d79ff97a39bc",
"clientSecret": "secret://**********************************************************************************XYZA",
"hmacKeys": [
"secret://********************************67X9"
]
}
},
"accountName": "TestAccountName",
"configSchema": "{\"required\":[\"accountDetails\",\"credentials\"],\"definitions\":{\"PspCheckoutAccountDetails\":{\"required\":[\"processingChannelId\"],\"properties\":{\"processingChannelId\":{\"title\":\"Processing channel ID\",\"minLength\":1,\"pattern\":\"^pc_.+$\",\"type\":\"string\"}},\"type\":\"object\"},\"PspCheckoutCredentials\":{\"required\":[\"clientId\",\"clientSecret\"],\"properties\":{\"clientId\":{\"title\":\"Client ID\",\"description\":\"Client ID used to authenticate requests to the Checkout API\",\"minLength\":1,\"type\":\"string\"},\"clientSecret\":{\"title\":\"Client Secret\",\"description\":\"Client Secret used to authenticate requests to the Checkout API\",\"minLength\":1,\"type\":\"string\",\"format\":\"secret\"},\"hmacKeys\":{\"title\":\"HMAC keys\",\"description\":\"HMAC keys used to authenticate notifications from the Checkout API\",\"pattern\":\"^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$\",\"items\":{\"type\":\"string\"},\"type\":\"array\",\"format\":\"secret\"}},\"type\":\"object\"}},\"properties\":{\"accountDetails\":{\"$ref\":\"#/definitions/PspCheckoutAccountDetails\",\"title\":\"Account details\"},\"credentials\":{\"$ref\":\"#/definitions/PspCheckoutCredentials\",\"title\":\"Checkout credentials\"}},\"type\":\"object\"}",
"accountDisplayName": "TestAccountDisplayName",
"workspaces": [
"7f9f1882-a103-408d-ac96-46a7021e537a",
"70025496-f2a8-4211-b852-32261cbd8cde"
],
"notificationUrl": "https://yourcompany-api-pub.staging.payrails.io/public/notification/provider/testpsp/accountName/TestPSP"
}
}
]
},
"workspaceId": "0bd0f200-fcff-4f63-8b16-0f692d62bd2f",
"eventTrigger": "action"
},
{
"event": "ruleEngineExecuted",
"time": "2022-02-03T14:34:43.557Z",
"details": {
"action": "determinePaymentOptions",
"context": {
"meta": {
"order": {
"reference": "******"
},
"customer": {
"reference": "******"
},
"clientContext": {
"ipAddress": "******"
}
}
},
"rulesets": [
{
"id": "670e7a35-c282-469f-b77f-336b75bcbe55",
"version": 1,
"createdAt": "2022-11-02T12:27:22.73972022Z",
"trigger": {
"on": "determinePaymentOptions",
"filter": {
"paymentMethodCode": "card"
}
},
"workspaceId": "7f9f1882-a103-408d-ac96-46a7021e537a",
"rules": [
{
"condition": {
"left": {
"field": "customer.country.code",
"operator": "IS ONE OF",
"value": [
"AR",
"CL"
]
},
"operator": "AND",
"right": {
"field": "clientContext.osType",
"operator": "=",
"value": "ios"
}
},
"action": {
"type": "setPriority",
"params": {
"priority": 1
}
}
},
{
"condition": {
"field": "clientContext.osType",
"operator": "=",
"value": "web"
},
"action": {
"type": "setPriority",
"params": {
"priority": 2
}
}
}
],
"defaultAction": {
"type": "skip"
}
}
],
"evaluations": [
{
"chosenRule": {
"condition": {
"left": {
"field": "customer.country.code",
"operator": "IS ONE OF",
"value": [
"AR",
"CL"
]
},
"operator": "AND",
"right": {
"field": "clientContext.osType",
"operator": "=",
"value": "ios"
}
},
"action": {
"type": "setPriority",
"params": {
"priority": 1
}
}
},
"action": {
"type": "setPriority",
"params": {
"priority": 1
}
},
"ruleEvaluationResults": [
{
"rule": {
"condition": {
"left": {
"field": "customer.country.code",
"operator": "IS ONE OF",
"value": [
"AR",
"CL"
]
},
"operator": "AND",
"right": {
"field": "clientContext.osType",
"operator": "=",
"value": "ios"
}
},
"action": {
"type": "setPriority",
"params": {
"priority": 1
}
}
},
"result": true
},
{
"rule": {
"condition": {
"field": "clientContext.osType",
"operator": "=",
"value": "web"
},
"action": {
"type": "setPriority",
"params": {
"priority": 2
}
}
},
"result": false
}
],
"entity": {
"paymentMethodCode": "card",
"integrationType": "api",
"description": "Card.",
"paymentInstruments": [
{
"id": "b8fe6271-5d71-4d28-b8e8-89e64acc0c49",
"holderId": "788c7c09-a490-4603-915a-e2a957a6cca1",
"createdAt": "2022-04-22T17:53:36.814Z",
"updatedAt": "2022-04-22T17:53:36.814Z",
"paymentMethod": "card",
"displayName": "Visa **** 1111",
"description": "Personal card.",
"merchantReference": "ref_C47C47",
"fingerprint": "739abff0-406a-4d32-8cfb-701e12be5848",
"status": "created",
"futureUsage": "CardOnFile",
"networkTransactionReference": "987654321234567",
"data": {
"network": "visa",
"bin": "411111",
"suffix": "1111",
"expiryMonth": "10",
"expiryYear": "2026",
"holderName": "John Doe",
"billingAddress": {
"country": {
"code": "DE",
"name": "Germany"
},
"postalCode": "10117"
}
}
}
]
}
}
]
},
"workspaceId": "0bd0f200-fcff-4f63-8b16-0f692d62bd2f",
"eventTrigger": "action"
},
{
"event": "executionActionRequested",
"time": "2022-02-03T14:34:42.557Z",
"details": {
"action": "authorize",
"actionId": "9fce7f2c-faac-4b10-8a24-c146687f9e97",
"request": {
"amount": {
"value": "12.50",
"currency": "EUR"
},
"returnInfo": {
"success": "https://mysuccessurl.com",
"error": "https://myerrorurl.com",
"pending": "https://mypendingurl.com"
},
"paymentComposition": [
{
"paymentInstrumentId": "384279fe-fee4-441d-9836-d2ef663551ad",
"paymentMethodCode": "card",
"integrationType": "api",
"amount": {
"value": "12.50",
"currency": "EUR"
}
}
],
"meta": {
"customer": {
"reference": "******"
}
}
},
"response": {
"name": "authorize",
"actionId": "1aa0ef20-36cb-4485-b60e-0526c3699014",
"executedAt": "2022-04-22T17:53:36.814Z",
"links": {
"execution": "https://api.staging.payrails.io/merchant/workflows/100ade99-ef8d-43de-8a35-4d31dbdb37d0/executions/99e2f33a-2d17-4c98-8242-6bf5a4a08016",
"consumerWait": "https://api.staging.payrails.io/public/redirect/merchant/example-merchant/100ade99-ef8d-43de-8a35-4d31dbdb37d0/99e2f33a-2d17-4c98-8242-6bf5a4a08016/dGVtcG9yYXJ5LWF1dGgK",
"capture": {
"method": "POST",
"href": "https://api.staging.payrails.io/merchant/workflows/100ade99-ef8d-43de-8a35-4d31dbdb37d0/executions/99e2f33a-2d17-4c98-8242-6bf5a4a08016/capture"
},
"cancel": {
"method": "POST",
"href": "https://api.staging.payrails.io/merchant/workflows/100ade99-ef8d-43de-8a35-4d31dbdb37d0/executions/99e2f33a-2d17-4c98-8242-6bf5a4a08016/cancel"
}
}
}
},
"workspaceId": "0bd0f200-fcff-4f63-8b16-0f692d62bd2f",
"eventTrigger": "api"
},
{
"event": "executionActionRequested",
"time": "2022-02-03T14:34:41.557Z",
"details": {
"action": "authorize",
"actionId": "54c05fd4-c054-4b59-a829-4eb76f33f4ea",
"request": {
"amount": {
"value": "12.50",
"currency": "EUR"
},
"returnInfo": {
"success": "https://mysuccessurl.com",
"error": "https://myerrorurl.com",
"pending": "https://mypendingurl.com"
},
"paymentComposition": [
{
"paymentInstrumentId": "384279fe-fee4-441d-9836-d2ef663551ad",
"paymentMethodCode": "card",
"integrationType": "api",
"amount": {
"value": "12.50",
"currency": "EUR"
}
}
],
"meta": {
"customer": {
"reference": "******"
}
}
},
"response": {
"errors": [
{
"id": "a24bc325-3929-4d9d-9c08-b3aa532685b7",
"code": "Service Not Available",
"detail": "The requested operation is unavailable at the moment."
}
]
}
},
"workspaceId": "0bd0f200-fcff-4f63-8b16-0f692d62bd2f",
"eventTrigger": "api"
},
{
"event": "executionCreated",
"time": "2022-02-03T14:34:39.557Z",
"details": {
"request": {
"merchantReference": "order_3573894940903",
"holderReference": "customer_836361394",
"meta": {
"order": {
"reference": "******"
},
"customer": {
"reference": "******"
},
"clientContext": {
"ipAddress": "******"
}
},
"initialActions": [
{
"action": "lookup",
"method": "POST",
"body": {
"amount": {
"value": "12.50",
"currency": "EUR"
},
"meta": {
"customer": {
"reference": "******"
},
"clientContext": {
"ipAddress": "******"
}
}
}
}
]
},
"response": {
"id": "5d0e7a85-c982-499f-bb7f-296b75bcbe10",
"status": [
{
"code": "created",
"time": "2022-02-03T14:38:41.557Z"
}
],
"createdAt": "2022-02-03T14:38:40.557Z",
"merchantReference": "order_3573894940903",
"holderId": "9d113e2a-35a0-40e1-828b-35a18ac35b41",
"holderReference": "customer123",
"workflow": {
"version": 3,
"code": "payment-acceptance"
},
"meta": {
"order": {
"reference": "******"
},
"customer": {
"reference": "******"
},
"clientContext": {
"ipAddress": "******"
}
},
"links": {
"self": "https://api.staging.payrails.io/merchant/workflows/100ade99-ef8d-43de-8a35-4d31dbdb37d0/executions/99e2f33a-2d17-4c98-8242-6bf5a4a08016",
"lookup": {
"method": "POST",
"href": "https://api.staging.payrails.io/merchant/workflows/100ade99-ef8d-43de-8a35-4d31dbdb37d0/executions/99e2f33a-2d17-4c98-8242-6bf5a4a08016/lookup"
}
},
"initialResults": [
{
"httpCode": 200,
"body": {
"name": "lookup",
"actionId": "1aa0ef20-36cb-4485-b60e-0526c3699014",
"executedAt": "2022-02-03T14:38:40.557Z",
"data": {
"paymentCompositionOptions": [
{
"paymentMethodCode": "card",
"integrationType": "api",
"description": "Card.",
"paymentInstruments": [
{
"id": "b8fe6271-5d71-4d28-b8e8-89e64acc0c49",
"holderId": "788c7c09-a490-4603-915a-e2a957a6cca1",
"createdAt": "2022-04-22T17:53:36.814Z",
"updatedAt": "2022-04-22T17:53:36.814Z",
"paymentMethod": "card",
"displayName": "Visa **** 1111",
"description": "Personal card.",
"merchantReference": "ref_C47C47",
"fingerprint": "739abff0-406a-4d32-8cfb-701e12be5848",
"status": "created",
"futureUsage": "CardOnFile",
"networkTransactionReference": "987654321234567",
"data": {
"network": "visa",
"bin": "411111",
"suffix": "1111",
"expiryMonth": "10",
"expiryYear": "2026",
"holderName": "John Doe",
"billingAddress": {
"country": {
"code": "DE",
"name": "Germany"
},
"postalCode": "10117"
}
}
}
]
}
]
},
"links": {
"execution": {
"href": "https://api.staging.payrails.io/merchant/workflows/100ade99-ef8d-43de-8a35-4d31dbdb37d0/executions/99e2f33a-2d17-4c98-8242-6bf5a4a08016"
},
"authorize": {
"method": "POST",
"href": "https://api.staging.payrails.io/merchant/workflows/100ade99-ef8d-43de-8a35-4d31dbdb37d0/executions/99e2f33a-2d17-4c98-8242-6bf5a4a08016/authorize"
},
"startPaymentSession": {
"method": "POST",
"href": "https://api.staging.payrails.io/merchant/workflows/100ade99-ef8d-43de-8a35-4d31dbdb37d0/executions/99e2f33a-2d17-4c98-8242-6bf5a4a08016/startPaymentSession"
}
}
}
}
],
"workspaceId": "7f9f1882-a103-408d-ac96-46a7021e537a"
}
},
"workspaceId": "0bd0f200-fcff-4f63-8b16-0f692d62bd2f",
"eventTrigger": "api"
},
{
"event": "executionActionRequested",
"time": "2022-02-03T14:34:42.557Z",
"details": {
"action": "lookup",
"request": {
"amount": {
"value": "12.50",
"currency": "EUR"
},
"meta": {
"customer": {
"reference": "******"
},
"clientContext": {
"ipAddress": "******"
}
}
},
"response": {
"name": "lookup",
"actionId": "1aa0ef20-36cb-4485-b60e-0526c3699014",
"executedAt": "2022-02-03T14:38:40.557Z",
"data": {
"paymentCompositionOptions": [
{
"paymentMethodCode": "card",
"integrationType": "api",
"description": "Card.",
"paymentInstruments": [
{
"id": "b8fe6271-5d71-4d28-b8e8-89e64acc0c49",
"holderId": "788c7c09-a490-4603-915a-e2a957a6cca1",
"createdAt": "2022-04-22T17:53:36.814Z",
"updatedAt": "2022-04-22T17:53:36.814Z",
"paymentMethod": "card",
"displayName": "Visa **** 1111",
"description": "Personal card.",
"merchantReference": "ref_C47C47",
"fingerprint": "739abff0-406a-4d32-8cfb-701e12be5848",
"status": "created",
"futureUsage": "CardOnFile",
"networkTransactionReference": "987654321234567",
"data": {
"network": "visa",
"bin": "411111",
"suffix": "1111",
"expiryMonth": "10",
"expiryYear": "2026",
"holderName": "John Doe",
"billingAddress": {
"country": {
"code": "DE",
"name": "Germany"
},
"postalCode": "10117"
}
}
}
],
"clientConfig": {
"displayName": "Card",
"supportsSaveInstrument": true,
"flow": "direct"
}
},
{
"paymentMethodCode": "bankAccount",
"integrationType": "api",
"description": "Bank Account.",
"paymentInstruments": [
{
"id": "b8fe6271-5d71-4d28-b8e8-89e64acc0c49",
"holderId": "788c7c09-a490-4603-915a-e2a957a6cca1",
"createdAt": "2022-04-22T17:53:36.814Z",
"updatedAt": "2022-04-22T17:53:36.814Z",
"paymentMethod": "bankAccount",
"description": "Personal bank account.",
"merchantReference": "ref_C47C47",
"fingerprint": "739abff0-406a-4d32-8cfb-701e12be5848",
"status": "created",
"data": {
"holder": {
"firstName": "John",
"lastName": "Doe",
"companyName": "ABC Corp",
"address": {
"streetName": "Example St",
"streetNumber": "123",
"postalCode": "12345",
"city": "Anytown",
"stateOrProvince": "CA",
"country": "US"
},
"email": "john.doe@example.com",
"dob": "1990-01-15",
"country": {
"code": "US",
"name": "United States"
},
"city": "New York",
"type": "personal"
},
"bank": {
"name": "Example Bank",
"branchCode": "1234",
"code": "56789",
"address": {
"streetName": "Bank St",
"streetNumber": "5",
"postalCode": "98765",
"city": "Banktown",
"stateOrProvince": "NY",
"country": "US"
},
"swiftCode": "EXABUS33XXX",
"country": {
"code": "US",
"name": "United States"
}
},
"account": {
"number": "1234567890",
"iban": "US123456789012345678901234567890",
"currency": "USD",
"type": "savings"
}
}
}
],
"clientConfig": {
"displayName": "Bank Account",
"supportsSaveInstrument": true,
"flow": "direct",
"instrumentDataSchema": {
"id": "b8fe6271-5d71-4d28-b8e8-89e64acc0c49",
"holderId": "788c7c09-a490-4603-915a-e2a957a6cca1",
"createdAt": "2022-04-22T17:53:36.814Z",
"updatedAt": "2022-04-22T17:53:36.814Z",
"paymentMethod": "bankAccount",
"description": "Personal bank account.",
"merchantReference": "ref_C47C47",
"fingerprint": "739abff0-406a-4d32-8cfb-701e12be5848",
"status": "created",
"data": {
"holder": {
"firstName": "John",
"lastName": "Doe",
"companyName": "ABC Corp",
"address": {
"streetName": "Example St",
"streetNumber": "123",
"postalCode": "12345",
"city": "Anytown",
"stateOrProvince": "CA",
"country": "US"
},
"email": "john.doe@example.com",
"dob": "1990-01-15",
"country": {
"code": "US",
"name": "United States"
},
"city": "New York",
"type": "personal"
},
"bank": {
"name": "Example Bank",
"branchCode": "1234",
"code": "56789",
"address": {
"streetName": "Bank St",
"streetNumber": "5",
"postalCode": "98765",
"city": "Banktown",
"stateOrProvince": "NY",
"country": "US"
},
"swiftCode": "EXABUS33XXX",
"country": {
"code": "US",
"name": "United States"
}
},
"account": {
"number": "1234567890",
"iban": "US123456789012345678901234567890",
"currency": "USD",
"type": "savings"
}
}
}
}
}
]
},
"links": {
"execution": "https://api.staging.payrails.io/merchant/workflows/100ade99-ef8d-43de-8a35-4d31dbdb37d0/executions/99e2f33a-2d17-4c98-8242-6bf5a4a08016",
"authorize": {
"method": "POST",
"href": "https://api.staging.payrails.io/merchant/workflows/100ade99-ef8d-43de-8a35-4d31dbdb37d0/executions/99e2f33a-2d17-4c98-8242-6bf5a4a08016/authorize"
}
}
}
},
"workspaceId": "0bd0f200-fcff-4f63-8b16-0f692d62bd2f",
"eventTrigger": "api"
},
{
"event": "ruleEngineExecuted",
"time": "2022-02-03T14:34:43.557Z",
"details": {
"action": "determinePaymentOptions",
"context": {
"meta": {
"order": {
"reference": "******"
},
"customer": {
"reference": "******"
},
"clientContext": {
"ipAddress": "******"
}
}
},
"rulesets": [
{
"id": "670e7a35-c282-469f-b77f-336b75bcbe55",
"version": 1,
"createdAt": "2022-11-02T12:27:22.73972022Z",
"trigger": {
"on": "determinePaymentOptions",
"filter": {
"paymentMethodCode": "card"
}
},
"workspaceId": "7f9f1882-a103-408d-ac96-46a7021e537a",
"rules": [
{
"condition": {
"left": {
"field": "customer.country.code",
"operator": "IS ONE OF",
"value": [
"AR",
"CL"
]
},
"operator": "AND",
"right": {
"field": "clientContext.osType",
"operator": "=",
"value": "ios"
}
},
"action": {
"type": "setPriority",
"params": {
"priority": 1
}
}
},
{
"condition": {
"field": "clientContext.osType",
"operator": "=",
"value": "web"
},
"action": {
"type": "setPriority",
"params": {
"priority": 2
}
}
}
],
"defaultAction": {
"type": "skip"
}
}
],
"evaluations": [
{
"chosenRule": {
"condition": {
"left": {
"field": "customer.country.code",
"operator": "IS ONE OF",
"value": [
"AR",
"CL"
]
},
"operator": "AND",
"right": {
"field": "clientContext.osType",
"operator": "=",
"value": "ios"
}
},
"action": {
"type": "setPriority",
"params": {
"priority": 1
}
}
},
"action": {
"type": "setPriority",
"params": {
"priority": 1
}
},
"ruleEvaluationResults": [
{
"rule": {
"condition": {
"left": {
"field": "customer.country.code",
"operator": "IS ONE OF",
"value": [
"AR",
"CL"
]
},
"operator": "AND",
"right": {
"field": "clientContext.osType",
"operator": "=",
"value": "ios"
}
},
"action": {
"type": "setPriority",
"params": {
"priority": 1
}
}
},
"result": true
},
{
"rule": {
"condition": {
"field": "clientContext.osType",
"operator": "=",
"value": "web"
},
"action": {
"type": "setPriority",
"params": {
"priority": 2
}
}
},
"result": false
}
],
"entity": {
"paymentMethodCode": "card",
"integrationType": "api",
"description": "Card.",
"paymentInstruments": [
{
"id": "b8fe6271-5d71-4d28-b8e8-89e64acc0c49",
"holderId": "788c7c09-a490-4603-915a-e2a957a6cca1",
"createdAt": "2022-04-22T17:53:36.814Z",
"updatedAt": "2022-04-22T17:53:36.814Z",
"paymentMethod": "card",
"displayName": "Visa **** 1111",
"description": "Personal card.",
"merchantReference": "ref_C47C47",
"fingerprint": "739abff0-406a-4d32-8cfb-701e12be5848",
"status": "created",
"futureUsage": "CardOnFile",
"networkTransactionReference": "987654321234567",
"data": {
"network": "visa",
"bin": "411111",
"suffix": "1111",
"expiryMonth": "10",
"expiryYear": "2026",
"holderName": "John Doe",
"billingAddress": {
"country": {
"code": "DE",
"name": "Germany"
},
"postalCode": "10117"
}
}
}
]
}
}
]
},
"workspaceId": "0bd0f200-fcff-4f63-8b16-0f692d62bd2f",
"eventTrigger": "action"
},
{
"notificationEvent": {
"id": "b8fe6271-5d71-4d28-b8e8-89e64acc0c49",
"workflowCode": "payment-acceptance",
"workflowExecutionId": "8a780068-bf6b-4ba1-9b24-d32606b2fc19",
"workflowExecutionEventId": "42dc198e-fee0-45e9-aaa6-765036a15ade",
"workspaceId": "7f9f1882-a103-408d-ac96-46a7021e537a",
"createdAt": "2022-02-03T14:38:40.557Z",
"updatedAt": "2022-02-03T14:38:40.557Z",
"status": "delivered",
"body": "{\"action\":\"authorize\",\"actionId\":\"71f9cfed-1583-4483-b5d8-49af91749d85\",\"amount\":{\"currency\":\"EUR\",\"value\":\"22.50\"},\"execution\":{\"id\":\"8a780068-bf6b-4ba1-9b24-d32606b2fc19\",\"holderId\":\"fe8397fc-3301-4ffa-b0bc-b7f83e835a64\",\"holderReference\":\"84c51416-e06c-4dff-a76f-72fd66f3182d\",\"merchantReference\":\"679b48ed-ae78-48ae-b19a-460b52c2354d\"}}"
},
"event": "networkOffersEnrollmentCompleted",
"time": "2022-04-22T17:53:36.814Z",
"details": {
"actionId": "1aa0ef20-36cb-4485-b60e-0526c3699014",
"execution": {
"workflowCode": "d5454c2f-ae5e-44f3-8edf-f6dad64f005f",
"id": "c5454c2f-ae5e-44f3-8edf-e6dad64f006f",
"merchantReference": "order_3573894940903",
"holderReference": "customer123",
"meta": {
"order": {
"reference": "order_3573894940903"
},
"customer": {
"reference": "1231905323475",
"country": {
"code": "DE"
}
},
"clientContext": {
"ipAddress": "217.110.239.132",
"osType": "ios"
}
}
},
"success": true,
"paymentComposition": [
{
"integrationType": "api",
"paymentMethodCode": "card",
"success": true,
"operationResult": "Success",
"operationProviderReference": "provider-reference-example",
"providerId": "5eb08656-ecce-4c3c-9a8a-61d484172322",
"providerConfigId": "5eb08656-ecce-4c3c-9a8a-61d484172322",
"paymentInstrumentId": "a3a7e52d-bdcc-46a3-a9f2-702b5d7925b0",
"storeInstrument": true,
"paymentInstrument": {
"id": "b8fe6271-5d71-4d28-b8e8-89e64acc0c49",
"holderId": "788c7c09-a490-4603-915a-e2a957a6cca1",
"createdAt": "2022-04-22T17:53:36.814Z",
"updatedAt": "2022-04-22T17:53:36.814Z",
"paymentMethod": "card",
"displayName": "Visa **** 1111",
"description": "Personal card.",
"merchantReference": "ref_C47C47",
"fingerprint": "739abff0-406a-4d32-8cfb-701e12be5848",
"status": "created",
"futureUsage": "CardOnFile",
"networkTransactionReference": "987654321234567",
"data": {
"network": "visa",
"bin": "411111",
"suffix": "1111",
"expiryMonth": "10",
"expiryYear": "2026",
"holderName": "John Doe",
"billingAddress": {
"country": {
"code": "DE",
"name": "Germany"
},
"postalCode": "10117"
}
},
"tokens": [
{
"type": "networkOffers",
"reference": "network-offers-token",
"meta": {
"holderReference": "network-offers-customer-reference"
}
}
]
}
}
]
},
"workspaceId": "0bd0f200-fcff-4f63-8b16-0f692d62bd2f",
"eventTrigger": "api"
},
{
"notificationEvent": {
"id": "b8fe6271-5d71-4d28-b8e8-89e64acc0c49",
"workflowCode": "payment-acceptance",
"workflowExecutionId": "8a780068-bf6b-4ba1-9b24-d32606b2fc19",
"workflowExecutionEventId": "42dc198e-fee0-45e9-aaa6-765036a15ade",
"workspaceId": "7f9f1882-a103-408d-ac96-46a7021e537a",
"createdAt": "2022-02-03T14:38:40.557Z",
"updatedAt": "2022-02-03T14:38:40.557Z",
"status": "delivered",
"body": "{\"action\":\"authorize\",\"actionId\":\"71f9cfed-1583-4483-b5d8-49af91749d85\",\"amount\":{\"currency\":\"EUR\",\"value\":\"22.50\"},\"execution\":{\"id\":\"8a780068-bf6b-4ba1-9b24-d32606b2fc19\",\"holderId\":\"fe8397fc-3301-4ffa-b0bc-b7f83e835a64\",\"holderReference\":\"84c51416-e06c-4dff-a76f-72fd66f3182d\",\"merchantReference\":\"679b48ed-ae78-48ae-b19a-460b52c2354d\"}}"
},
"event": "executionActionUpdated",
"time": "2022-04-22T17:53:36.814Z",
"details": {
"action": "authorize",
"actionId": "1aa0ef20-36cb-4485-b60e-0526c3699014",
"execution": {
"workflowCode": "d5454c2f-ae5e-44f3-8edf-f6dad64f005f",
"id": "c5454c2f-ae5e-44f3-8edf-e6dad64f006f",
"merchantReference": "order_3573894940903",
"holderReference": "customer123",
"meta": {
"order": {
"reference": "order_3573894940903"
},
"customer": {
"reference": "1231905323475",
"country": {
"code": "DE"
}
},
"clientContext": {
"ipAddress": "217.110.239.132",
"osType": "ios"
}
}
},
"success": true,
"amount": {
"value": "12.50",
"currency": "EUR"
},
"paymentComposition": [
{
"operationType": "Authorize",
"amount": {
"currency": "EUR",
"value": "24.00"
},
"integrationType": "api",
"operationResult": "Success",
"operationProviderReference": "provider-reference-example",
"providerId": "5eb08624-ecce-4cbc-9a8a-61d484172815",
"provider": {
"id": "5eb08624-ecce-4cbc-9a8a-61d484172815",
"name": "checkout",
"displayName": "Checkout.com",
"type": "Payment",
"status": "active",
"configSchema": "{\"required\":[\"accountDetails\",\"credentials\"],\"definitions\":{\"PspCheckoutAccountDetails\":{\"required\":[\"processingChannelId\"],\"properties\":{\"processingChannelId\":{\"title\":\"Processing channel ID\",\"minLength\":1,\"pattern\":\"^pc_.+$\",\"type\":\"string\"}},\"type\":\"object\"},\"PspCheckoutCredentials\":{\"required\":[\"clientId\",\"clientSecret\"],\"properties\":{\"clientId\":{\"title\":\"Client ID\",\"description\":\"Client ID used to authenticate requests to the Checkout API\",\"minLength\":1,\"type\":\"string\"},\"clientSecret\":{\"title\":\"Client Secret\",\"description\":\"Client Secret used to authenticate requests to the Checkout API\",\"minLength\":1,\"type\":\"string\",\"format\":\"secret\"},\"hmacKeys\":{\"title\":\"HMAC keys\",\"description\":\"HMAC keys used to authenticate notifications from the Checkout API\",\"pattern\":\"^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$\",\"items\":{\"type\":\"string\"},\"type\":\"array\",\"format\":\"secret\"}},\"type\":\"object\"}},\"properties\":{\"accountDetails\":{\"$ref\":\"#/definitions/PspCheckoutAccountDetails\",\"title\":\"Account details\"},\"credentials\":{\"$ref\":\"#/definitions/PspCheckoutCredentials\",\"title\":\"Checkout credentials\"}},\"type\":\"object\"}",
"createdAt": "2021-01-05T10:20:00.000Z",
"updatedAt": "2022-06-14T11:50:00.000Z"
},
"providerConfigId": "a0ad4cd3-f243-4f1a-b294-f7c3df701b10",
"paymentId": "c9e1a8ea-a0de-42bd-bcfd-46d3f437b5fe",
"paymentInstrumentId": "a4a7ed2d-bdcc-46a3-a9f2-701b5d7924b0",
"storeInstrument": true,
"paymentMethodCode": "card",
"accountFundingTransaction": true,
"authorizationCode": "X055258",
"acquirerReference": "1233524535345",
"providerReference": "1027724325777",
"retrievalReference": "8657867867867",
"acquirerAccountCode": "MI21",
"acquirerCountryCode": "NL",
"acquirerMID": "50TP",
"avsResultCode": "Y",
"cvvResultCode": "M",
"success": true,
"workspaceId": "7f9f1882-a103-408d-ac96-46a7021e537a",
"paymentInstrument": {
"tokens": [
{
"type": "psp",
"reference": "provider-token",
"meta": {
"holderReference": "provider-customer-reference"
}
}
],
"id": "b8fe6271-5d71-4d28-b8e8-89e64acc0c49",
"holderId": "788c7c09-a490-4603-915a-e2a957a6cca1",
"createdAt": "2022-04-22T17:53:36.814Z",
"updatedAt": "2022-04-22T17:53:36.814Z",
"paymentMethod": "card",
"displayName": "Visa **** 1111",
"description": "Personal card.",
"merchantReference": "ref_C47C47",
"fingerprint": "739abff0-406a-4d32-8cfb-701e12be5848",
"status": "created",
"futureUsage": "CardOnFile",
"networkTransactionReference": "987654321234567",
"data": {
"network": "visa",
"bin": "416598",
"binLookup": {
"bin": "416598",
"network": "visa",
"localNetwork": "bancontact",
"issuer": "Revolut",
"issuerCountry": {
"code": "LT",
"name": "Lithuania",
"iso3": "LTU"
},
"segment": "infinite",
"type": "debit",
"typeDetails": "personal"
},
"suffix": "1111",
"expiryMonth": "10",
"expiryYear": "2026",
"holderName": "John Doe",
"billingAddress": {
"country": {
"code": "DE",
"name": "Germany"
},
"postalCode": "10117"
}
}
},
"captureMode": "Instant"
}
]
},
"workspaceId": "0bd0f200-fcff-4f63-8b16-0f692d62bd2f",
"eventTrigger": "api"
},
{
"notificationEvent": {
"id": "b8fe6271-5d71-4d28-b8e8-89e64acc0c49",
"workflowCode": "payment-acceptance",
"workflowExecutionId": "8a780068-bf6b-4ba1-9b24-d32606b2fc19",
"workflowExecutionEventId": "42dc198e-fee0-45e9-aaa6-765036a15ade",
"workspaceId": "7f9f1882-a103-408d-ac96-46a7021e537a",
"createdAt": "2022-02-03T14:38:40.557Z",
"updatedAt": "2022-02-03T14:38:40.557Z",
"status": "delivered",
"body": "{\"action\":\"authorize\",\"actionId\":\"71f9cfed-1583-4483-b5d8-49af91749d85\",\"amount\":{\"currency\":\"EUR\",\"value\":\"22.50\"},\"execution\":{\"id\":\"8a780068-bf6b-4ba1-9b24-d32606b2fc19\",\"holderId\":\"fe8397fc-3301-4ffa-b0bc-b7f83e835a64\",\"holderReference\":\"84c51416-e06c-4dff-a76f-72fd66f3182d\",\"merchantReference\":\"679b48ed-ae78-48ae-b19a-460b52c2354d\"}}"
},
"event": "executionActionPending",
"time": "2022-04-22T17:53:36.814Z",
"details": {
"action": "authorize",
"actionId": "1aa0ef20-36cb-4485-b60e-0526c3699014",
"execution": {
"workflowCode": "d5454c2f-ae5e-44f3-8edf-f6dad64f005f",
"id": "c5454c2f-ae5e-44f3-8edf-e6dad64f006f",
"merchantReference": "order_3573894940903",
"holderReference": "customer123",
"requiredAction": {
"type": "redirect",
"subType": "client",
"href": "https://api.sandbox.checkout.com",
"method": "GET"
},
"meta": {
"order": {
"reference": "order_3573894940903"
},
"customer": {
"reference": "1231905323475",
"country": {
"code": "DE"
}
},
"clientContext": {
"ipAddress": "217.110.239.132",
"osType": "ios"
}
}
},
"amount": {
"value": "12.50",
"currency": "EUR"
},
"paymentComposition": [
{
"amount": {
"currency": "EUR",
"value": "24.00"
},
"integrationType": "api",
"operationType": "Authorize",
"operationResult": "Pending",
"operationProviderReference": "provider-reference-example",
"providerId": "5eb08624-ecce-4cbc-9a8a-61d484172815",
"provider": {
"id": "5eb08624-ecce-4cbc-9a8a-61d484172815",
"name": "checkout",
"displayName": "Checkout.com",
"type": "Payment",
"status": "active",
"configSchema": "{\"required\":[\"accountDetails\",\"credentials\"],\"definitions\":{\"PspCheckoutAccountDetails\":{\"required\":[\"processingChannelId\"],\"properties\":{\"processingChannelId\":{\"title\":\"Processing channel ID\",\"minLength\":1,\"pattern\":\"^pc_.+$\",\"type\":\"string\"}},\"type\":\"object\"},\"PspCheckoutCredentials\":{\"required\":[\"clientId\",\"clientSecret\"],\"properties\":{\"clientId\":{\"title\":\"Client ID\",\"description\":\"Client ID used to authenticate requests to the Checkout API\",\"minLength\":1,\"type\":\"string\"},\"clientSecret\":{\"title\":\"Client Secret\",\"description\":\"Client Secret used to authenticate requests to the Checkout API\",\"minLength\":1,\"type\":\"string\",\"format\":\"secret\"},\"hmacKeys\":{\"title\":\"HMAC keys\",\"description\":\"HMAC keys used to authenticate notifications from the Checkout API\",\"pattern\":\"^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$\",\"items\":{\"type\":\"string\"},\"type\":\"array\",\"format\":\"secret\"}},\"type\":\"object\"}},\"properties\":{\"accountDetails\":{\"$ref\":\"#/definitions/PspCheckoutAccountDetails\",\"title\":\"Account details\"},\"credentials\":{\"$ref\":\"#/definitions/PspCheckoutCredentials\",\"title\":\"Checkout credentials\"}},\"type\":\"object\"}",
"createdAt": "2021-01-05T10:20:00.000Z",
"updatedAt": "2022-06-14T11:50:00.000Z"
},
"providerConfigId": "a0ad4cd3-f243-4f1a-b294-f7c3df701b10",
"paymentId": "c9e1a8ea-a0de-42bd-bcfd-46d3f437b5fe",
"paymentInstrumentId": "a4a7ed2d-bdcc-46a3-a9f2-701b5d7924b0",
"storeInstrument": true,
"paymentMethodCode": "card",
"providerReference": "1027724325777",
"workspaceId": "7f9f1882-a103-408d-ac96-46a7021e537a",
"success": true,
"paymentInstrument": {
"id": "b8fe6271-5d71-4d28-b8e8-89e64acc0c49",
"holderId": "788c7c09-a490-4603-915a-e2a957a6cca1",
"createdAt": "2022-04-22T17:53:36.814Z",
"updatedAt": "2022-04-22T17:53:36.814Z",
"paymentMethod": "card",
"displayName": "Visa **** 1111",
"description": "Personal card.",
"merchantReference": "ref_C47C47",
"fingerprint": "739abff0-406a-4d32-8cfb-701e12be5848",
"status": "created",
"futureUsage": "CardOnFile",
"networkTransactionReference": "987654321234567",
"data": {
"network": "visa",
"bin": "416598",
"binLookup": {
"bin": "416598",
"network": "visa",
"localNetwork": "bancontact",
"issuer": "Revolut",
"issuerCountry": {
"code": "LT",
"name": "Lithuania",
"iso3": "LTU"
},
"segment": "infinite",
"type": "debit",
"typeDetails": "personal"
},
"suffix": "1111",
"expiryMonth": "10",
"expiryYear": "2026",
"holderName": "John Doe",
"billingAddress": {
"country": {
"code": "DE",
"name": "Germany"
},
"postalCode": "10117"
}
}
}
}
]
},
"workspaceId": "0bd0f200-fcff-4f63-8b16-0f692d62bd2f",
"eventTrigger": "api"
}
]
}{
"errors": [
{
"id": "a24bc325-3929-4d9d-9c08-b3aa532685b7",
"code": "request.unauthorized",
"detail": "The request lacks necessary credentials to perform the specified action",
"docUrl": "https://docs.payrails.com/docs/resources/error-codes#requestunauthorized"
}
]
}{
"errors": [
{
"id": "e7db22b3-914e-4975-928e-9edfb0885bea",
"code": "request.forbidden",
"detail": "The request credentials lack the required permissions to perform the specified action",
"docUrl": "https://docs.payrails.com/docs/resources/error-codes#requestforbidden"
}
]
}{
"errors": [
{
"id": "a24bc325-3929-4d9d-9c08-b3aa532685b7",
"code": "request.not-found",
"detail": "The requested resource was not found",
"docUrl": "https://docs.payrails.com/docs/resources/error-codes#requestnot-found"
}
]
}{
"errors": [
{
"id": "a24bc325-3929-4d9d-9c08-b3aa532685b7",
"code": "request.rate-limit",
"detail": "Too many requests",
"docUrl": "https://docs.payrails.com/docs/resources/error-codes#requestrate-limit"
}
]
}Search & list events
Search & list a workflow execution event history.
curl --request GET \
--url https://api.staging.payrails.io/merchant/workflows/{workflowCode}/executions/{executionId}/history \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.staging.payrails.io/merchant/workflows/{workflowCode}/executions/{executionId}/history"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api.staging.payrails.io/merchant/workflows/{workflowCode}/executions/{executionId}/history', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.staging.payrails.io/merchant/workflows/{workflowCode}/executions/{executionId}/history",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://api.staging.payrails.io/merchant/workflows/{workflowCode}/executions/{executionId}/history"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("Authorization", "Bearer <token>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://api.staging.payrails.io/merchant/workflows/{workflowCode}/executions/{executionId}/history")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.staging.payrails.io/merchant/workflows/{workflowCode}/executions/{executionId}/history")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["Authorization"] = 'Bearer <token>'
response = http.request(request)
puts response.read_body{
"events": [
{
"notificationEvent": {
"id": "b8fe6271-5d71-4d28-b8e8-89e64acc0c49",
"workflowCode": "payment-acceptance",
"workflowExecutionId": "8a780068-bf6b-4ba1-9b24-d32606b2fc19",
"workflowExecutionEventId": "42dc198e-fee0-45e9-aaa6-765036a15ade",
"workspaceId": "7f9f1882-a103-408d-ac96-46a7021e537a",
"createdAt": "2022-02-03T14:38:40.557Z",
"updatedAt": "2022-02-03T14:38:40.557Z",
"status": "delivered",
"body": "{\"action\":\"authorize\",\"actionId\":\"71f9cfed-1583-4483-b5d8-49af91749d85\",\"amount\":{\"currency\":\"EUR\",\"value\":\"22.50\"},\"execution\":{\"id\":\"8a780068-bf6b-4ba1-9b24-d32606b2fc19\",\"holderId\":\"fe8397fc-3301-4ffa-b0bc-b7f83e835a64\",\"holderReference\":\"84c51416-e06c-4dff-a76f-72fd66f3182d\",\"merchantReference\":\"679b48ed-ae78-48ae-b19a-460b52c2354d\"}}"
},
"event": "executionActionCompleted",
"time": "2022-04-22T17:53:36.814Z",
"details": {
"action": "authorize",
"actionId": "1aa0ef20-36cb-4485-b60e-0526c3699014",
"execution": {
"workflowCode": "d5454c2f-ae5e-44f3-8edf-f6dad64f005f",
"id": "c5454c2f-ae5e-44f3-8edf-e6dad64f006f",
"merchantReference": "order_3573894940903",
"holderReference": "customer123",
"meta": {
"order": {
"reference": "order_3573894940903"
},
"customer": {
"reference": "1231905323475",
"country": {
"code": "DE"
}
},
"clientContext": {
"ipAddress": "217.110.239.132",
"osType": "ios"
}
}
},
"success": true,
"amount": {
"value": "12.50",
"currency": "EUR"
},
"paymentComposition": [
{
"operationType": "Authorize",
"amount": {
"currency": "EUR",
"value": "24.00"
},
"integrationType": "api",
"operationResult": "Success",
"operationProviderReference": "provider-reference-example",
"providerId": "5eb08624-ecce-4cbc-9a8a-61d484172815",
"provider": {
"id": "5eb08624-ecce-4cbc-9a8a-61d484172815",
"name": "checkout",
"displayName": "Checkout.com",
"type": "Payment",
"status": "active",
"configSchema": "{\"required\":[\"accountDetails\",\"credentials\"],\"definitions\":{\"PspCheckoutAccountDetails\":{\"required\":[\"processingChannelId\"],\"properties\":{\"processingChannelId\":{\"title\":\"Processing channel ID\",\"minLength\":1,\"pattern\":\"^pc_.+$\",\"type\":\"string\"}},\"type\":\"object\"},\"PspCheckoutCredentials\":{\"required\":[\"clientId\",\"clientSecret\"],\"properties\":{\"clientId\":{\"title\":\"Client ID\",\"description\":\"Client ID used to authenticate requests to the Checkout API\",\"minLength\":1,\"type\":\"string\"},\"clientSecret\":{\"title\":\"Client Secret\",\"description\":\"Client Secret used to authenticate requests to the Checkout API\",\"minLength\":1,\"type\":\"string\",\"format\":\"secret\"},\"hmacKeys\":{\"title\":\"HMAC keys\",\"description\":\"HMAC keys used to authenticate notifications from the Checkout API\",\"pattern\":\"^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$\",\"items\":{\"type\":\"string\"},\"type\":\"array\",\"format\":\"secret\"}},\"type\":\"object\"}},\"properties\":{\"accountDetails\":{\"$ref\":\"#/definitions/PspCheckoutAccountDetails\",\"title\":\"Account details\"},\"credentials\":{\"$ref\":\"#/definitions/PspCheckoutCredentials\",\"title\":\"Checkout credentials\"}},\"type\":\"object\"}",
"createdAt": "2021-01-05T10:20:00.000Z",
"updatedAt": "2022-06-14T11:50:00.000Z"
},
"providerConfigId": "a0ad4cd3-f243-4f1a-b294-f7c3df701b10",
"paymentId": "c9e1a8ea-a0de-42bd-bcfd-46d3f437b5fe",
"paymentInstrumentId": "a4a7ed2d-bdcc-46a3-a9f2-701b5d7924b0",
"storeInstrument": true,
"paymentMethodCode": "card",
"accountFundingTransaction": true,
"authorizationCode": "X055258",
"acquirerReference": "1233524535345",
"providerReference": "1027724325777",
"retrievalReference": "8657867867867",
"acquirerAccountCode": "MI21",
"acquirerCountryCode": "NL",
"acquirerMID": "50TP",
"avsResultCode": "Y",
"cvvResultCode": "M",
"success": true,
"workspaceId": "7f9f1882-a103-408d-ac96-46a7021e537a",
"paymentInstrument": {
"tokens": [
{
"type": "psp",
"reference": "provider-token",
"meta": {
"holderReference": "provider-customer-reference"
}
}
],
"id": "b8fe6271-5d71-4d28-b8e8-89e64acc0c49",
"holderId": "788c7c09-a490-4603-915a-e2a957a6cca1",
"createdAt": "2022-04-22T17:53:36.814Z",
"updatedAt": "2022-04-22T17:53:36.814Z",
"paymentMethod": "card",
"displayName": "Visa **** 1111",
"description": "Personal card.",
"merchantReference": "ref_C47C47",
"fingerprint": "739abff0-406a-4d32-8cfb-701e12be5848",
"status": "created",
"futureUsage": "CardOnFile",
"networkTransactionReference": "987654321234567",
"data": {
"network": "visa",
"bin": "416598",
"binLookup": {
"bin": "416598",
"network": "visa",
"localNetwork": "bancontact",
"issuer": "Revolut",
"issuerCountry": {
"code": "LT",
"name": "Lithuania",
"iso3": "LTU"
},
"segment": "infinite",
"type": "debit",
"typeDetails": "personal"
},
"suffix": "1111",
"expiryMonth": "10",
"expiryYear": "2026",
"holderName": "John Doe",
"billingAddress": {
"country": {
"code": "DE",
"name": "Germany"
},
"postalCode": "10117"
}
}
},
"captureMode": "Instant"
}
]
},
"workspaceId": "0bd0f200-fcff-4f63-8b16-0f692d62bd2f",
"eventTrigger": "api"
},
{
"event": "ruleEngineExecuted",
"time": "2022-02-03T14:34:44.857Z",
"details": {
"action": "determineProviderOptions",
"context": {
"meta": {
"order": {
"reference": "******"
},
"customer": {
"reference": "******"
},
"clientContext": {
"ipAddress": "******"
}
}
},
"rulesets": [
{
"id": "670e7a35-c282-469f-b77f-336b75bcbe55",
"version": 1,
"createdAt": "2022-11-02T12:27:22.73972022Z",
"trigger": {
"on": "determineProviderOptions",
"filter": {
"providerConfigID": "5eb08624-ecce-4cbc-9a8a-61d484172815"
}
},
"rules": [
{
"condition": {
"field": "customer.country.code",
"operator": "=",
"value": "DE"
},
"action": {
"type": "setPriority",
"params": {
"priority": 1
}
}
}
],
"defaultAction": {
"type": "skip"
},
"workspaceId": "7f9f1882-a103-408d-ac96-46a7021e537a"
}
],
"evaluations": [
{
"chosenRule": {
"condition": {
"field": "customer.country.code",
"operator": "=",
"value": "DE"
},
"action": {
"type": "setPriority",
"params": {
"priority": 1
}
}
},
"action": {
"type": "setPriority",
"params": {
"priority": 1
}
},
"ruleEvaluationResults": [
{
"rule": {
"condition": {
"field": "customer.country.code",
"operator": "=",
"value": "DE"
},
"action": {
"type": "setPriority",
"params": {
"priority": 1
}
}
},
"result": true
}
],
"entity": {
"id": "d9479775-3926-44af-9fcc-1c83ff4dcad6",
"providerId": "01039f19-d151-48b4-86aa-b36e68323e4e",
"createdAt": "2022-04-22T17:53:36.814Z",
"config": {
"accountDetails": {
"processingChannelId": "pc_0a70d769-9c20-416e-a436-4a323ce7eabf"
},
"credentials": {
"clientId": "ack_3b2105ac-0190-4e18-a46c-d79ff97a39bc",
"clientSecret": "secret://**********************************************************************************XYZA",
"hmacKeys": [
"secret://********************************67X9"
]
}
},
"accountName": "TestAccountName",
"configSchema": "{\"required\":[\"accountDetails\",\"credentials\"],\"definitions\":{\"PspCheckoutAccountDetails\":{\"required\":[\"processingChannelId\"],\"properties\":{\"processingChannelId\":{\"title\":\"Processing channel ID\",\"minLength\":1,\"pattern\":\"^pc_.+$\",\"type\":\"string\"}},\"type\":\"object\"},\"PspCheckoutCredentials\":{\"required\":[\"clientId\",\"clientSecret\"],\"properties\":{\"clientId\":{\"title\":\"Client ID\",\"description\":\"Client ID used to authenticate requests to the Checkout API\",\"minLength\":1,\"type\":\"string\"},\"clientSecret\":{\"title\":\"Client Secret\",\"description\":\"Client Secret used to authenticate requests to the Checkout API\",\"minLength\":1,\"type\":\"string\",\"format\":\"secret\"},\"hmacKeys\":{\"title\":\"HMAC keys\",\"description\":\"HMAC keys used to authenticate notifications from the Checkout API\",\"pattern\":\"^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$\",\"items\":{\"type\":\"string\"},\"type\":\"array\",\"format\":\"secret\"}},\"type\":\"object\"}},\"properties\":{\"accountDetails\":{\"$ref\":\"#/definitions/PspCheckoutAccountDetails\",\"title\":\"Account details\"},\"credentials\":{\"$ref\":\"#/definitions/PspCheckoutCredentials\",\"title\":\"Checkout credentials\"}},\"type\":\"object\"}",
"accountDisplayName": "TestAccountDisplayName",
"workspaces": [
"7f9f1882-a103-408d-ac96-46a7021e537a",
"70025496-f2a8-4211-b852-32261cbd8cde"
],
"notificationUrl": "https://yourcompany-api-pub.staging.payrails.io/public/notification/provider/testpsp/accountName/TestPSP"
}
}
]
},
"workspaceId": "0bd0f200-fcff-4f63-8b16-0f692d62bd2f",
"eventTrigger": "action"
},
{
"event": "ruleEngineExecuted",
"time": "2022-02-03T14:34:43.557Z",
"details": {
"action": "determinePaymentOptions",
"context": {
"meta": {
"order": {
"reference": "******"
},
"customer": {
"reference": "******"
},
"clientContext": {
"ipAddress": "******"
}
}
},
"rulesets": [
{
"id": "670e7a35-c282-469f-b77f-336b75bcbe55",
"version": 1,
"createdAt": "2022-11-02T12:27:22.73972022Z",
"trigger": {
"on": "determinePaymentOptions",
"filter": {
"paymentMethodCode": "card"
}
},
"workspaceId": "7f9f1882-a103-408d-ac96-46a7021e537a",
"rules": [
{
"condition": {
"left": {
"field": "customer.country.code",
"operator": "IS ONE OF",
"value": [
"AR",
"CL"
]
},
"operator": "AND",
"right": {
"field": "clientContext.osType",
"operator": "=",
"value": "ios"
}
},
"action": {
"type": "setPriority",
"params": {
"priority": 1
}
}
},
{
"condition": {
"field": "clientContext.osType",
"operator": "=",
"value": "web"
},
"action": {
"type": "setPriority",
"params": {
"priority": 2
}
}
}
],
"defaultAction": {
"type": "skip"
}
}
],
"evaluations": [
{
"chosenRule": {
"condition": {
"left": {
"field": "customer.country.code",
"operator": "IS ONE OF",
"value": [
"AR",
"CL"
]
},
"operator": "AND",
"right": {
"field": "clientContext.osType",
"operator": "=",
"value": "ios"
}
},
"action": {
"type": "setPriority",
"params": {
"priority": 1
}
}
},
"action": {
"type": "setPriority",
"params": {
"priority": 1
}
},
"ruleEvaluationResults": [
{
"rule": {
"condition": {
"left": {
"field": "customer.country.code",
"operator": "IS ONE OF",
"value": [
"AR",
"CL"
]
},
"operator": "AND",
"right": {
"field": "clientContext.osType",
"operator": "=",
"value": "ios"
}
},
"action": {
"type": "setPriority",
"params": {
"priority": 1
}
}
},
"result": true
},
{
"rule": {
"condition": {
"field": "clientContext.osType",
"operator": "=",
"value": "web"
},
"action": {
"type": "setPriority",
"params": {
"priority": 2
}
}
},
"result": false
}
],
"entity": {
"paymentMethodCode": "card",
"integrationType": "api",
"description": "Card.",
"paymentInstruments": [
{
"id": "b8fe6271-5d71-4d28-b8e8-89e64acc0c49",
"holderId": "788c7c09-a490-4603-915a-e2a957a6cca1",
"createdAt": "2022-04-22T17:53:36.814Z",
"updatedAt": "2022-04-22T17:53:36.814Z",
"paymentMethod": "card",
"displayName": "Visa **** 1111",
"description": "Personal card.",
"merchantReference": "ref_C47C47",
"fingerprint": "739abff0-406a-4d32-8cfb-701e12be5848",
"status": "created",
"futureUsage": "CardOnFile",
"networkTransactionReference": "987654321234567",
"data": {
"network": "visa",
"bin": "411111",
"suffix": "1111",
"expiryMonth": "10",
"expiryYear": "2026",
"holderName": "John Doe",
"billingAddress": {
"country": {
"code": "DE",
"name": "Germany"
},
"postalCode": "10117"
}
}
}
]
}
}
]
},
"workspaceId": "0bd0f200-fcff-4f63-8b16-0f692d62bd2f",
"eventTrigger": "action"
},
{
"event": "executionActionRequested",
"time": "2022-02-03T14:34:42.557Z",
"details": {
"action": "authorize",
"actionId": "9fce7f2c-faac-4b10-8a24-c146687f9e97",
"request": {
"amount": {
"value": "12.50",
"currency": "EUR"
},
"returnInfo": {
"success": "https://mysuccessurl.com",
"error": "https://myerrorurl.com",
"pending": "https://mypendingurl.com"
},
"paymentComposition": [
{
"paymentInstrumentId": "384279fe-fee4-441d-9836-d2ef663551ad",
"paymentMethodCode": "card",
"integrationType": "api",
"amount": {
"value": "12.50",
"currency": "EUR"
}
}
],
"meta": {
"customer": {
"reference": "******"
}
}
},
"response": {
"name": "authorize",
"actionId": "1aa0ef20-36cb-4485-b60e-0526c3699014",
"executedAt": "2022-04-22T17:53:36.814Z",
"links": {
"execution": "https://api.staging.payrails.io/merchant/workflows/100ade99-ef8d-43de-8a35-4d31dbdb37d0/executions/99e2f33a-2d17-4c98-8242-6bf5a4a08016",
"consumerWait": "https://api.staging.payrails.io/public/redirect/merchant/example-merchant/100ade99-ef8d-43de-8a35-4d31dbdb37d0/99e2f33a-2d17-4c98-8242-6bf5a4a08016/dGVtcG9yYXJ5LWF1dGgK",
"capture": {
"method": "POST",
"href": "https://api.staging.payrails.io/merchant/workflows/100ade99-ef8d-43de-8a35-4d31dbdb37d0/executions/99e2f33a-2d17-4c98-8242-6bf5a4a08016/capture"
},
"cancel": {
"method": "POST",
"href": "https://api.staging.payrails.io/merchant/workflows/100ade99-ef8d-43de-8a35-4d31dbdb37d0/executions/99e2f33a-2d17-4c98-8242-6bf5a4a08016/cancel"
}
}
}
},
"workspaceId": "0bd0f200-fcff-4f63-8b16-0f692d62bd2f",
"eventTrigger": "api"
},
{
"event": "executionActionRequested",
"time": "2022-02-03T14:34:41.557Z",
"details": {
"action": "authorize",
"actionId": "54c05fd4-c054-4b59-a829-4eb76f33f4ea",
"request": {
"amount": {
"value": "12.50",
"currency": "EUR"
},
"returnInfo": {
"success": "https://mysuccessurl.com",
"error": "https://myerrorurl.com",
"pending": "https://mypendingurl.com"
},
"paymentComposition": [
{
"paymentInstrumentId": "384279fe-fee4-441d-9836-d2ef663551ad",
"paymentMethodCode": "card",
"integrationType": "api",
"amount": {
"value": "12.50",
"currency": "EUR"
}
}
],
"meta": {
"customer": {
"reference": "******"
}
}
},
"response": {
"errors": [
{
"id": "a24bc325-3929-4d9d-9c08-b3aa532685b7",
"code": "Service Not Available",
"detail": "The requested operation is unavailable at the moment."
}
]
}
},
"workspaceId": "0bd0f200-fcff-4f63-8b16-0f692d62bd2f",
"eventTrigger": "api"
},
{
"event": "executionCreated",
"time": "2022-02-03T14:34:39.557Z",
"details": {
"request": {
"merchantReference": "order_3573894940903",
"holderReference": "customer_836361394",
"meta": {
"order": {
"reference": "******"
},
"customer": {
"reference": "******"
},
"clientContext": {
"ipAddress": "******"
}
},
"initialActions": [
{
"action": "lookup",
"method": "POST",
"body": {
"amount": {
"value": "12.50",
"currency": "EUR"
},
"meta": {
"customer": {
"reference": "******"
},
"clientContext": {
"ipAddress": "******"
}
}
}
}
]
},
"response": {
"id": "5d0e7a85-c982-499f-bb7f-296b75bcbe10",
"status": [
{
"code": "created",
"time": "2022-02-03T14:38:41.557Z"
}
],
"createdAt": "2022-02-03T14:38:40.557Z",
"merchantReference": "order_3573894940903",
"holderId": "9d113e2a-35a0-40e1-828b-35a18ac35b41",
"holderReference": "customer123",
"workflow": {
"version": 3,
"code": "payment-acceptance"
},
"meta": {
"order": {
"reference": "******"
},
"customer": {
"reference": "******"
},
"clientContext": {
"ipAddress": "******"
}
},
"links": {
"self": "https://api.staging.payrails.io/merchant/workflows/100ade99-ef8d-43de-8a35-4d31dbdb37d0/executions/99e2f33a-2d17-4c98-8242-6bf5a4a08016",
"lookup": {
"method": "POST",
"href": "https://api.staging.payrails.io/merchant/workflows/100ade99-ef8d-43de-8a35-4d31dbdb37d0/executions/99e2f33a-2d17-4c98-8242-6bf5a4a08016/lookup"
}
},
"initialResults": [
{
"httpCode": 200,
"body": {
"name": "lookup",
"actionId": "1aa0ef20-36cb-4485-b60e-0526c3699014",
"executedAt": "2022-02-03T14:38:40.557Z",
"data": {
"paymentCompositionOptions": [
{
"paymentMethodCode": "card",
"integrationType": "api",
"description": "Card.",
"paymentInstruments": [
{
"id": "b8fe6271-5d71-4d28-b8e8-89e64acc0c49",
"holderId": "788c7c09-a490-4603-915a-e2a957a6cca1",
"createdAt": "2022-04-22T17:53:36.814Z",
"updatedAt": "2022-04-22T17:53:36.814Z",
"paymentMethod": "card",
"displayName": "Visa **** 1111",
"description": "Personal card.",
"merchantReference": "ref_C47C47",
"fingerprint": "739abff0-406a-4d32-8cfb-701e12be5848",
"status": "created",
"futureUsage": "CardOnFile",
"networkTransactionReference": "987654321234567",
"data": {
"network": "visa",
"bin": "411111",
"suffix": "1111",
"expiryMonth": "10",
"expiryYear": "2026",
"holderName": "John Doe",
"billingAddress": {
"country": {
"code": "DE",
"name": "Germany"
},
"postalCode": "10117"
}
}
}
]
}
]
},
"links": {
"execution": {
"href": "https://api.staging.payrails.io/merchant/workflows/100ade99-ef8d-43de-8a35-4d31dbdb37d0/executions/99e2f33a-2d17-4c98-8242-6bf5a4a08016"
},
"authorize": {
"method": "POST",
"href": "https://api.staging.payrails.io/merchant/workflows/100ade99-ef8d-43de-8a35-4d31dbdb37d0/executions/99e2f33a-2d17-4c98-8242-6bf5a4a08016/authorize"
},
"startPaymentSession": {
"method": "POST",
"href": "https://api.staging.payrails.io/merchant/workflows/100ade99-ef8d-43de-8a35-4d31dbdb37d0/executions/99e2f33a-2d17-4c98-8242-6bf5a4a08016/startPaymentSession"
}
}
}
}
],
"workspaceId": "7f9f1882-a103-408d-ac96-46a7021e537a"
}
},
"workspaceId": "0bd0f200-fcff-4f63-8b16-0f692d62bd2f",
"eventTrigger": "api"
},
{
"event": "executionActionRequested",
"time": "2022-02-03T14:34:42.557Z",
"details": {
"action": "lookup",
"request": {
"amount": {
"value": "12.50",
"currency": "EUR"
},
"meta": {
"customer": {
"reference": "******"
},
"clientContext": {
"ipAddress": "******"
}
}
},
"response": {
"name": "lookup",
"actionId": "1aa0ef20-36cb-4485-b60e-0526c3699014",
"executedAt": "2022-02-03T14:38:40.557Z",
"data": {
"paymentCompositionOptions": [
{
"paymentMethodCode": "card",
"integrationType": "api",
"description": "Card.",
"paymentInstruments": [
{
"id": "b8fe6271-5d71-4d28-b8e8-89e64acc0c49",
"holderId": "788c7c09-a490-4603-915a-e2a957a6cca1",
"createdAt": "2022-04-22T17:53:36.814Z",
"updatedAt": "2022-04-22T17:53:36.814Z",
"paymentMethod": "card",
"displayName": "Visa **** 1111",
"description": "Personal card.",
"merchantReference": "ref_C47C47",
"fingerprint": "739abff0-406a-4d32-8cfb-701e12be5848",
"status": "created",
"futureUsage": "CardOnFile",
"networkTransactionReference": "987654321234567",
"data": {
"network": "visa",
"bin": "411111",
"suffix": "1111",
"expiryMonth": "10",
"expiryYear": "2026",
"holderName": "John Doe",
"billingAddress": {
"country": {
"code": "DE",
"name": "Germany"
},
"postalCode": "10117"
}
}
}
],
"clientConfig": {
"displayName": "Card",
"supportsSaveInstrument": true,
"flow": "direct"
}
},
{
"paymentMethodCode": "bankAccount",
"integrationType": "api",
"description": "Bank Account.",
"paymentInstruments": [
{
"id": "b8fe6271-5d71-4d28-b8e8-89e64acc0c49",
"holderId": "788c7c09-a490-4603-915a-e2a957a6cca1",
"createdAt": "2022-04-22T17:53:36.814Z",
"updatedAt": "2022-04-22T17:53:36.814Z",
"paymentMethod": "bankAccount",
"description": "Personal bank account.",
"merchantReference": "ref_C47C47",
"fingerprint": "739abff0-406a-4d32-8cfb-701e12be5848",
"status": "created",
"data": {
"holder": {
"firstName": "John",
"lastName": "Doe",
"companyName": "ABC Corp",
"address": {
"streetName": "Example St",
"streetNumber": "123",
"postalCode": "12345",
"city": "Anytown",
"stateOrProvince": "CA",
"country": "US"
},
"email": "john.doe@example.com",
"dob": "1990-01-15",
"country": {
"code": "US",
"name": "United States"
},
"city": "New York",
"type": "personal"
},
"bank": {
"name": "Example Bank",
"branchCode": "1234",
"code": "56789",
"address": {
"streetName": "Bank St",
"streetNumber": "5",
"postalCode": "98765",
"city": "Banktown",
"stateOrProvince": "NY",
"country": "US"
},
"swiftCode": "EXABUS33XXX",
"country": {
"code": "US",
"name": "United States"
}
},
"account": {
"number": "1234567890",
"iban": "US123456789012345678901234567890",
"currency": "USD",
"type": "savings"
}
}
}
],
"clientConfig": {
"displayName": "Bank Account",
"supportsSaveInstrument": true,
"flow": "direct",
"instrumentDataSchema": {
"id": "b8fe6271-5d71-4d28-b8e8-89e64acc0c49",
"holderId": "788c7c09-a490-4603-915a-e2a957a6cca1",
"createdAt": "2022-04-22T17:53:36.814Z",
"updatedAt": "2022-04-22T17:53:36.814Z",
"paymentMethod": "bankAccount",
"description": "Personal bank account.",
"merchantReference": "ref_C47C47",
"fingerprint": "739abff0-406a-4d32-8cfb-701e12be5848",
"status": "created",
"data": {
"holder": {
"firstName": "John",
"lastName": "Doe",
"companyName": "ABC Corp",
"address": {
"streetName": "Example St",
"streetNumber": "123",
"postalCode": "12345",
"city": "Anytown",
"stateOrProvince": "CA",
"country": "US"
},
"email": "john.doe@example.com",
"dob": "1990-01-15",
"country": {
"code": "US",
"name": "United States"
},
"city": "New York",
"type": "personal"
},
"bank": {
"name": "Example Bank",
"branchCode": "1234",
"code": "56789",
"address": {
"streetName": "Bank St",
"streetNumber": "5",
"postalCode": "98765",
"city": "Banktown",
"stateOrProvince": "NY",
"country": "US"
},
"swiftCode": "EXABUS33XXX",
"country": {
"code": "US",
"name": "United States"
}
},
"account": {
"number": "1234567890",
"iban": "US123456789012345678901234567890",
"currency": "USD",
"type": "savings"
}
}
}
}
}
]
},
"links": {
"execution": "https://api.staging.payrails.io/merchant/workflows/100ade99-ef8d-43de-8a35-4d31dbdb37d0/executions/99e2f33a-2d17-4c98-8242-6bf5a4a08016",
"authorize": {
"method": "POST",
"href": "https://api.staging.payrails.io/merchant/workflows/100ade99-ef8d-43de-8a35-4d31dbdb37d0/executions/99e2f33a-2d17-4c98-8242-6bf5a4a08016/authorize"
}
}
}
},
"workspaceId": "0bd0f200-fcff-4f63-8b16-0f692d62bd2f",
"eventTrigger": "api"
},
{
"event": "ruleEngineExecuted",
"time": "2022-02-03T14:34:43.557Z",
"details": {
"action": "determinePaymentOptions",
"context": {
"meta": {
"order": {
"reference": "******"
},
"customer": {
"reference": "******"
},
"clientContext": {
"ipAddress": "******"
}
}
},
"rulesets": [
{
"id": "670e7a35-c282-469f-b77f-336b75bcbe55",
"version": 1,
"createdAt": "2022-11-02T12:27:22.73972022Z",
"trigger": {
"on": "determinePaymentOptions",
"filter": {
"paymentMethodCode": "card"
}
},
"workspaceId": "7f9f1882-a103-408d-ac96-46a7021e537a",
"rules": [
{
"condition": {
"left": {
"field": "customer.country.code",
"operator": "IS ONE OF",
"value": [
"AR",
"CL"
]
},
"operator": "AND",
"right": {
"field": "clientContext.osType",
"operator": "=",
"value": "ios"
}
},
"action": {
"type": "setPriority",
"params": {
"priority": 1
}
}
},
{
"condition": {
"field": "clientContext.osType",
"operator": "=",
"value": "web"
},
"action": {
"type": "setPriority",
"params": {
"priority": 2
}
}
}
],
"defaultAction": {
"type": "skip"
}
}
],
"evaluations": [
{
"chosenRule": {
"condition": {
"left": {
"field": "customer.country.code",
"operator": "IS ONE OF",
"value": [
"AR",
"CL"
]
},
"operator": "AND",
"right": {
"field": "clientContext.osType",
"operator": "=",
"value": "ios"
}
},
"action": {
"type": "setPriority",
"params": {
"priority": 1
}
}
},
"action": {
"type": "setPriority",
"params": {
"priority": 1
}
},
"ruleEvaluationResults": [
{
"rule": {
"condition": {
"left": {
"field": "customer.country.code",
"operator": "IS ONE OF",
"value": [
"AR",
"CL"
]
},
"operator": "AND",
"right": {
"field": "clientContext.osType",
"operator": "=",
"value": "ios"
}
},
"action": {
"type": "setPriority",
"params": {
"priority": 1
}
}
},
"result": true
},
{
"rule": {
"condition": {
"field": "clientContext.osType",
"operator": "=",
"value": "web"
},
"action": {
"type": "setPriority",
"params": {
"priority": 2
}
}
},
"result": false
}
],
"entity": {
"paymentMethodCode": "card",
"integrationType": "api",
"description": "Card.",
"paymentInstruments": [
{
"id": "b8fe6271-5d71-4d28-b8e8-89e64acc0c49",
"holderId": "788c7c09-a490-4603-915a-e2a957a6cca1",
"createdAt": "2022-04-22T17:53:36.814Z",
"updatedAt": "2022-04-22T17:53:36.814Z",
"paymentMethod": "card",
"displayName": "Visa **** 1111",
"description": "Personal card.",
"merchantReference": "ref_C47C47",
"fingerprint": "739abff0-406a-4d32-8cfb-701e12be5848",
"status": "created",
"futureUsage": "CardOnFile",
"networkTransactionReference": "987654321234567",
"data": {
"network": "visa",
"bin": "411111",
"suffix": "1111",
"expiryMonth": "10",
"expiryYear": "2026",
"holderName": "John Doe",
"billingAddress": {
"country": {
"code": "DE",
"name": "Germany"
},
"postalCode": "10117"
}
}
}
]
}
}
]
},
"workspaceId": "0bd0f200-fcff-4f63-8b16-0f692d62bd2f",
"eventTrigger": "action"
},
{
"notificationEvent": {
"id": "b8fe6271-5d71-4d28-b8e8-89e64acc0c49",
"workflowCode": "payment-acceptance",
"workflowExecutionId": "8a780068-bf6b-4ba1-9b24-d32606b2fc19",
"workflowExecutionEventId": "42dc198e-fee0-45e9-aaa6-765036a15ade",
"workspaceId": "7f9f1882-a103-408d-ac96-46a7021e537a",
"createdAt": "2022-02-03T14:38:40.557Z",
"updatedAt": "2022-02-03T14:38:40.557Z",
"status": "delivered",
"body": "{\"action\":\"authorize\",\"actionId\":\"71f9cfed-1583-4483-b5d8-49af91749d85\",\"amount\":{\"currency\":\"EUR\",\"value\":\"22.50\"},\"execution\":{\"id\":\"8a780068-bf6b-4ba1-9b24-d32606b2fc19\",\"holderId\":\"fe8397fc-3301-4ffa-b0bc-b7f83e835a64\",\"holderReference\":\"84c51416-e06c-4dff-a76f-72fd66f3182d\",\"merchantReference\":\"679b48ed-ae78-48ae-b19a-460b52c2354d\"}}"
},
"event": "networkOffersEnrollmentCompleted",
"time": "2022-04-22T17:53:36.814Z",
"details": {
"actionId": "1aa0ef20-36cb-4485-b60e-0526c3699014",
"execution": {
"workflowCode": "d5454c2f-ae5e-44f3-8edf-f6dad64f005f",
"id": "c5454c2f-ae5e-44f3-8edf-e6dad64f006f",
"merchantReference": "order_3573894940903",
"holderReference": "customer123",
"meta": {
"order": {
"reference": "order_3573894940903"
},
"customer": {
"reference": "1231905323475",
"country": {
"code": "DE"
}
},
"clientContext": {
"ipAddress": "217.110.239.132",
"osType": "ios"
}
}
},
"success": true,
"paymentComposition": [
{
"integrationType": "api",
"paymentMethodCode": "card",
"success": true,
"operationResult": "Success",
"operationProviderReference": "provider-reference-example",
"providerId": "5eb08656-ecce-4c3c-9a8a-61d484172322",
"providerConfigId": "5eb08656-ecce-4c3c-9a8a-61d484172322",
"paymentInstrumentId": "a3a7e52d-bdcc-46a3-a9f2-702b5d7925b0",
"storeInstrument": true,
"paymentInstrument": {
"id": "b8fe6271-5d71-4d28-b8e8-89e64acc0c49",
"holderId": "788c7c09-a490-4603-915a-e2a957a6cca1",
"createdAt": "2022-04-22T17:53:36.814Z",
"updatedAt": "2022-04-22T17:53:36.814Z",
"paymentMethod": "card",
"displayName": "Visa **** 1111",
"description": "Personal card.",
"merchantReference": "ref_C47C47",
"fingerprint": "739abff0-406a-4d32-8cfb-701e12be5848",
"status": "created",
"futureUsage": "CardOnFile",
"networkTransactionReference": "987654321234567",
"data": {
"network": "visa",
"bin": "411111",
"suffix": "1111",
"expiryMonth": "10",
"expiryYear": "2026",
"holderName": "John Doe",
"billingAddress": {
"country": {
"code": "DE",
"name": "Germany"
},
"postalCode": "10117"
}
},
"tokens": [
{
"type": "networkOffers",
"reference": "network-offers-token",
"meta": {
"holderReference": "network-offers-customer-reference"
}
}
]
}
}
]
},
"workspaceId": "0bd0f200-fcff-4f63-8b16-0f692d62bd2f",
"eventTrigger": "api"
},
{
"notificationEvent": {
"id": "b8fe6271-5d71-4d28-b8e8-89e64acc0c49",
"workflowCode": "payment-acceptance",
"workflowExecutionId": "8a780068-bf6b-4ba1-9b24-d32606b2fc19",
"workflowExecutionEventId": "42dc198e-fee0-45e9-aaa6-765036a15ade",
"workspaceId": "7f9f1882-a103-408d-ac96-46a7021e537a",
"createdAt": "2022-02-03T14:38:40.557Z",
"updatedAt": "2022-02-03T14:38:40.557Z",
"status": "delivered",
"body": "{\"action\":\"authorize\",\"actionId\":\"71f9cfed-1583-4483-b5d8-49af91749d85\",\"amount\":{\"currency\":\"EUR\",\"value\":\"22.50\"},\"execution\":{\"id\":\"8a780068-bf6b-4ba1-9b24-d32606b2fc19\",\"holderId\":\"fe8397fc-3301-4ffa-b0bc-b7f83e835a64\",\"holderReference\":\"84c51416-e06c-4dff-a76f-72fd66f3182d\",\"merchantReference\":\"679b48ed-ae78-48ae-b19a-460b52c2354d\"}}"
},
"event": "executionActionUpdated",
"time": "2022-04-22T17:53:36.814Z",
"details": {
"action": "authorize",
"actionId": "1aa0ef20-36cb-4485-b60e-0526c3699014",
"execution": {
"workflowCode": "d5454c2f-ae5e-44f3-8edf-f6dad64f005f",
"id": "c5454c2f-ae5e-44f3-8edf-e6dad64f006f",
"merchantReference": "order_3573894940903",
"holderReference": "customer123",
"meta": {
"order": {
"reference": "order_3573894940903"
},
"customer": {
"reference": "1231905323475",
"country": {
"code": "DE"
}
},
"clientContext": {
"ipAddress": "217.110.239.132",
"osType": "ios"
}
}
},
"success": true,
"amount": {
"value": "12.50",
"currency": "EUR"
},
"paymentComposition": [
{
"operationType": "Authorize",
"amount": {
"currency": "EUR",
"value": "24.00"
},
"integrationType": "api",
"operationResult": "Success",
"operationProviderReference": "provider-reference-example",
"providerId": "5eb08624-ecce-4cbc-9a8a-61d484172815",
"provider": {
"id": "5eb08624-ecce-4cbc-9a8a-61d484172815",
"name": "checkout",
"displayName": "Checkout.com",
"type": "Payment",
"status": "active",
"configSchema": "{\"required\":[\"accountDetails\",\"credentials\"],\"definitions\":{\"PspCheckoutAccountDetails\":{\"required\":[\"processingChannelId\"],\"properties\":{\"processingChannelId\":{\"title\":\"Processing channel ID\",\"minLength\":1,\"pattern\":\"^pc_.+$\",\"type\":\"string\"}},\"type\":\"object\"},\"PspCheckoutCredentials\":{\"required\":[\"clientId\",\"clientSecret\"],\"properties\":{\"clientId\":{\"title\":\"Client ID\",\"description\":\"Client ID used to authenticate requests to the Checkout API\",\"minLength\":1,\"type\":\"string\"},\"clientSecret\":{\"title\":\"Client Secret\",\"description\":\"Client Secret used to authenticate requests to the Checkout API\",\"minLength\":1,\"type\":\"string\",\"format\":\"secret\"},\"hmacKeys\":{\"title\":\"HMAC keys\",\"description\":\"HMAC keys used to authenticate notifications from the Checkout API\",\"pattern\":\"^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$\",\"items\":{\"type\":\"string\"},\"type\":\"array\",\"format\":\"secret\"}},\"type\":\"object\"}},\"properties\":{\"accountDetails\":{\"$ref\":\"#/definitions/PspCheckoutAccountDetails\",\"title\":\"Account details\"},\"credentials\":{\"$ref\":\"#/definitions/PspCheckoutCredentials\",\"title\":\"Checkout credentials\"}},\"type\":\"object\"}",
"createdAt": "2021-01-05T10:20:00.000Z",
"updatedAt": "2022-06-14T11:50:00.000Z"
},
"providerConfigId": "a0ad4cd3-f243-4f1a-b294-f7c3df701b10",
"paymentId": "c9e1a8ea-a0de-42bd-bcfd-46d3f437b5fe",
"paymentInstrumentId": "a4a7ed2d-bdcc-46a3-a9f2-701b5d7924b0",
"storeInstrument": true,
"paymentMethodCode": "card",
"accountFundingTransaction": true,
"authorizationCode": "X055258",
"acquirerReference": "1233524535345",
"providerReference": "1027724325777",
"retrievalReference": "8657867867867",
"acquirerAccountCode": "MI21",
"acquirerCountryCode": "NL",
"acquirerMID": "50TP",
"avsResultCode": "Y",
"cvvResultCode": "M",
"success": true,
"workspaceId": "7f9f1882-a103-408d-ac96-46a7021e537a",
"paymentInstrument": {
"tokens": [
{
"type": "psp",
"reference": "provider-token",
"meta": {
"holderReference": "provider-customer-reference"
}
}
],
"id": "b8fe6271-5d71-4d28-b8e8-89e64acc0c49",
"holderId": "788c7c09-a490-4603-915a-e2a957a6cca1",
"createdAt": "2022-04-22T17:53:36.814Z",
"updatedAt": "2022-04-22T17:53:36.814Z",
"paymentMethod": "card",
"displayName": "Visa **** 1111",
"description": "Personal card.",
"merchantReference": "ref_C47C47",
"fingerprint": "739abff0-406a-4d32-8cfb-701e12be5848",
"status": "created",
"futureUsage": "CardOnFile",
"networkTransactionReference": "987654321234567",
"data": {
"network": "visa",
"bin": "416598",
"binLookup": {
"bin": "416598",
"network": "visa",
"localNetwork": "bancontact",
"issuer": "Revolut",
"issuerCountry": {
"code": "LT",
"name": "Lithuania",
"iso3": "LTU"
},
"segment": "infinite",
"type": "debit",
"typeDetails": "personal"
},
"suffix": "1111",
"expiryMonth": "10",
"expiryYear": "2026",
"holderName": "John Doe",
"billingAddress": {
"country": {
"code": "DE",
"name": "Germany"
},
"postalCode": "10117"
}
}
},
"captureMode": "Instant"
}
]
},
"workspaceId": "0bd0f200-fcff-4f63-8b16-0f692d62bd2f",
"eventTrigger": "api"
},
{
"notificationEvent": {
"id": "b8fe6271-5d71-4d28-b8e8-89e64acc0c49",
"workflowCode": "payment-acceptance",
"workflowExecutionId": "8a780068-bf6b-4ba1-9b24-d32606b2fc19",
"workflowExecutionEventId": "42dc198e-fee0-45e9-aaa6-765036a15ade",
"workspaceId": "7f9f1882-a103-408d-ac96-46a7021e537a",
"createdAt": "2022-02-03T14:38:40.557Z",
"updatedAt": "2022-02-03T14:38:40.557Z",
"status": "delivered",
"body": "{\"action\":\"authorize\",\"actionId\":\"71f9cfed-1583-4483-b5d8-49af91749d85\",\"amount\":{\"currency\":\"EUR\",\"value\":\"22.50\"},\"execution\":{\"id\":\"8a780068-bf6b-4ba1-9b24-d32606b2fc19\",\"holderId\":\"fe8397fc-3301-4ffa-b0bc-b7f83e835a64\",\"holderReference\":\"84c51416-e06c-4dff-a76f-72fd66f3182d\",\"merchantReference\":\"679b48ed-ae78-48ae-b19a-460b52c2354d\"}}"
},
"event": "executionActionPending",
"time": "2022-04-22T17:53:36.814Z",
"details": {
"action": "authorize",
"actionId": "1aa0ef20-36cb-4485-b60e-0526c3699014",
"execution": {
"workflowCode": "d5454c2f-ae5e-44f3-8edf-f6dad64f005f",
"id": "c5454c2f-ae5e-44f3-8edf-e6dad64f006f",
"merchantReference": "order_3573894940903",
"holderReference": "customer123",
"requiredAction": {
"type": "redirect",
"subType": "client",
"href": "https://api.sandbox.checkout.com",
"method": "GET"
},
"meta": {
"order": {
"reference": "order_3573894940903"
},
"customer": {
"reference": "1231905323475",
"country": {
"code": "DE"
}
},
"clientContext": {
"ipAddress": "217.110.239.132",
"osType": "ios"
}
}
},
"amount": {
"value": "12.50",
"currency": "EUR"
},
"paymentComposition": [
{
"amount": {
"currency": "EUR",
"value": "24.00"
},
"integrationType": "api",
"operationType": "Authorize",
"operationResult": "Pending",
"operationProviderReference": "provider-reference-example",
"providerId": "5eb08624-ecce-4cbc-9a8a-61d484172815",
"provider": {
"id": "5eb08624-ecce-4cbc-9a8a-61d484172815",
"name": "checkout",
"displayName": "Checkout.com",
"type": "Payment",
"status": "active",
"configSchema": "{\"required\":[\"accountDetails\",\"credentials\"],\"definitions\":{\"PspCheckoutAccountDetails\":{\"required\":[\"processingChannelId\"],\"properties\":{\"processingChannelId\":{\"title\":\"Processing channel ID\",\"minLength\":1,\"pattern\":\"^pc_.+$\",\"type\":\"string\"}},\"type\":\"object\"},\"PspCheckoutCredentials\":{\"required\":[\"clientId\",\"clientSecret\"],\"properties\":{\"clientId\":{\"title\":\"Client ID\",\"description\":\"Client ID used to authenticate requests to the Checkout API\",\"minLength\":1,\"type\":\"string\"},\"clientSecret\":{\"title\":\"Client Secret\",\"description\":\"Client Secret used to authenticate requests to the Checkout API\",\"minLength\":1,\"type\":\"string\",\"format\":\"secret\"},\"hmacKeys\":{\"title\":\"HMAC keys\",\"description\":\"HMAC keys used to authenticate notifications from the Checkout API\",\"pattern\":\"^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$\",\"items\":{\"type\":\"string\"},\"type\":\"array\",\"format\":\"secret\"}},\"type\":\"object\"}},\"properties\":{\"accountDetails\":{\"$ref\":\"#/definitions/PspCheckoutAccountDetails\",\"title\":\"Account details\"},\"credentials\":{\"$ref\":\"#/definitions/PspCheckoutCredentials\",\"title\":\"Checkout credentials\"}},\"type\":\"object\"}",
"createdAt": "2021-01-05T10:20:00.000Z",
"updatedAt": "2022-06-14T11:50:00.000Z"
},
"providerConfigId": "a0ad4cd3-f243-4f1a-b294-f7c3df701b10",
"paymentId": "c9e1a8ea-a0de-42bd-bcfd-46d3f437b5fe",
"paymentInstrumentId": "a4a7ed2d-bdcc-46a3-a9f2-701b5d7924b0",
"storeInstrument": true,
"paymentMethodCode": "card",
"providerReference": "1027724325777",
"workspaceId": "7f9f1882-a103-408d-ac96-46a7021e537a",
"success": true,
"paymentInstrument": {
"id": "b8fe6271-5d71-4d28-b8e8-89e64acc0c49",
"holderId": "788c7c09-a490-4603-915a-e2a957a6cca1",
"createdAt": "2022-04-22T17:53:36.814Z",
"updatedAt": "2022-04-22T17:53:36.814Z",
"paymentMethod": "card",
"displayName": "Visa **** 1111",
"description": "Personal card.",
"merchantReference": "ref_C47C47",
"fingerprint": "739abff0-406a-4d32-8cfb-701e12be5848",
"status": "created",
"futureUsage": "CardOnFile",
"networkTransactionReference": "987654321234567",
"data": {
"network": "visa",
"bin": "416598",
"binLookup": {
"bin": "416598",
"network": "visa",
"localNetwork": "bancontact",
"issuer": "Revolut",
"issuerCountry": {
"code": "LT",
"name": "Lithuania",
"iso3": "LTU"
},
"segment": "infinite",
"type": "debit",
"typeDetails": "personal"
},
"suffix": "1111",
"expiryMonth": "10",
"expiryYear": "2026",
"holderName": "John Doe",
"billingAddress": {
"country": {
"code": "DE",
"name": "Germany"
},
"postalCode": "10117"
}
}
}
}
]
},
"workspaceId": "0bd0f200-fcff-4f63-8b16-0f692d62bd2f",
"eventTrigger": "api"
}
]
}{
"errors": [
{
"id": "a24bc325-3929-4d9d-9c08-b3aa532685b7",
"code": "request.unauthorized",
"detail": "The request lacks necessary credentials to perform the specified action",
"docUrl": "https://docs.payrails.com/docs/resources/error-codes#requestunauthorized"
}
]
}{
"errors": [
{
"id": "e7db22b3-914e-4975-928e-9edfb0885bea",
"code": "request.forbidden",
"detail": "The request credentials lack the required permissions to perform the specified action",
"docUrl": "https://docs.payrails.com/docs/resources/error-codes#requestforbidden"
}
]
}{
"errors": [
{
"id": "a24bc325-3929-4d9d-9c08-b3aa532685b7",
"code": "request.not-found",
"detail": "The requested resource was not found",
"docUrl": "https://docs.payrails.com/docs/resources/error-codes#requestnot-found"
}
]
}{
"errors": [
{
"id": "a24bc325-3929-4d9d-9c08-b3aa532685b7",
"code": "request.rate-limit",
"detail": "Too many requests",
"docUrl": "https://docs.payrails.com/docs/resources/error-codes#requestrate-limit"
}
]
}Authorizations
You can use an OAuth2 JWT bearer token in the Authorization header of your API requests for supported endpoints: Authorization: Bearer <YOUR_JWT_HERE>.
These tokens are valid for 10 minutes and can be requested via the access token endpoint endpoint.
Path Parameters
Path parameter to specify the workflow code. Machine-friendly code of Workflow.
^[a-z][-A-Za-z0-9]*$Identifier of the resource in Payrails.
Query Parameters
Filter for the type of event. Name of the event.
executionCreated, executionActionRequested, executionActionCompleted, ruleEngineExecuted, networkOffersEnrollmentCompleted, executionActionScheduled, executionActionUnscheduled, executionActionUpdated, executionActionPending, executionActionStepScheduled, executionActionStepUnscheduled, executionActionStepRequested, executionActionStepStarted, executionActionStepPaused, executionActionStepResumed, executionActionStepCompleted, executionActionStepUpdated, executionTriggerStepCalled, executionConditionStepEvaluated Filter for the type of action. Type of action.
lookup, startPaymentSession, authorize, capture, confirm, cancel, refund Filter for the unique action execution identifier originally returned in the synchronous action response.
Filter for the status of the associated notification event. Value of Notification event status enumeration.
delivered, deliveryFailed, pending Filter for the type of error code produced for execution event.
Response
OK.
Hide child attributes
Hide child attributes
Name of the event.
executionCreated, executionActionRequested, executionActionCompleted, ruleEngineExecuted, networkOffersEnrollmentCompleted, executionActionScheduled, executionActionUnscheduled, executionActionUpdated, executionActionPending, executionActionStepScheduled, executionActionStepUnscheduled, executionActionStepRequested, executionActionStepStarted, executionActionStepPaused, executionActionStepResumed, executionActionStepCompleted, executionActionStepUpdated, executionTriggerStepCalled, executionConditionStepEvaluated When this execution was started.
Details for an executionCreated event.
- executionCreated
- executionActionRequested
- executionActionCompleted
- executionActionCompleted
- ruleEngineExecuted
- networkOffersEnrollmentCompleted
- executionActionScheduled
- executionActionUnscheduled
- executionActionUpdated
- executionActionUpdated
- executionActionPending
- executionActionStepScheduled
- executionActionStepUnscheduled
- executionActionStepRequested
- executionActionStepStarted
- executionActionStepPaused
- executionActionStepResumed
- executionActionStepCompleted
- executionActionStepUpdated
- executionTriggerStepCalled
- executionConditionStepEvaluated
Hide child attributes
Hide child attributes
Hide child attributes
Hide child attributes
Merchant-provided reference for the Execution. Commonly, the identifier of the order on the Merchant's system.
Merchant-provided reference for the execution counterparty, i.e. the paying consumer.
References in which workspace the execution will be created.
Merchant-provided configuration data for a particular execution, overriding values for the workflow.
Hide child attributes
Hide child attributes
Mode of capture for the payments involved in the execution. * Instant - Authorize and capture payments in one step. * Delayed - Authorize payments initially, capture the money after a delay configured with captureDelay. * Manual - Authorize payments initially, capture the money manually via Payrails' API or portal.
Instant, Delayed, Manual If captureMode is Delayed, this field can be used to configure the scheduled time when to capture the money. The format should be based on the ISO 8601 standard.
Mode of cancel for the payments involved in the execution. * Delayed - Authorize payments initially, cancel the authorization after a delay configured with cancelDelay. * Manual - Authorize payments initially, cancel the authorization manually via Payrails' API or portal.
Delayed, Manual If cancelMode is Delayed, this field can be used to configure the scheduled time when to cancel the authorization. The format should be based on the ISO 8601 standard.
Version of a Workflow Configuration.
Metadata for the context of an execution. Includes Payrails-defined structures for most common fields used in workflows, but can also be extended by merchant or provider-specific fields. For more information, visit our Meta Fields guide. See Meta for every field.
ID of the Apple Pay configuration to use for this request. When provided, Apple Pay will be enabled as a payment method.
Actions to execute after the creation of the execution. Initial actions are performed sequentially, and results reported in corresponding items of initialResults irrespective of errors in earlier actions.
- Initial Lookup action.
- Initial Start Payment Session action.
- Initial Payment Authorize action.
Hide child attributes
Hide child attributes
Execute an initial lookup action.
lookup POST Hide child attributes
Hide child attributes
Hide child attributes
Hide child attributes
Decimal amount of the major currency unit. Can be any precision.
[0-9]+(\.[0-9]+)?"12.50"
ISO 3-letter currency code.
^[A-Z]{3}$"EUR"
Metadata for the context of an execution. Includes Payrails-defined structures for most common fields used in workflows, but can also be extended by merchant or provider-specific fields. For more information, visit our Meta Fields guide. See Meta for every field.
Hide child attributes
Hide child attributes
ID of this execution.
Business-case dependent set of status tags of this execution. The order of statuses does not matter and should not be used for any logic.
Hide child attributes
Hide child attributes
Business-case dependent status code.
When this execution status was set.
The reason why the status was set, absent if the status isn't an error status.
Hide child attributes
Hide child attributes
Unique identifier of the error. Please use this value when reporting an issue to our team, so we can help you faster.
Human-readable description about the error, its cause, and resolution.
Link to the specific documentation about this particular code.
Metadata providing more details about the reason of the error. The structure of this object varies according to the code.
When this execution was started.
Merchant-provided reference for the Execution. Commonly, the identifier of the order on the Merchant's system.
"order_15415"
Merchant-provided reference for the transaction counterparty, i.e. the paying consumer.
Unique identifier of the Holder in Payrails.
Amount of the execution. Only present if an amount has been set on the execution via an action (lookup, authorize, etc.).
Metadata for the context of an execution. Includes Payrails-defined structures for most common fields used in workflows, but can also be extended by merchant or provider-specific fields. For more information, visit our Meta Fields guide. See Meta for every field.
Results of the initialActions specified during execution creation.
Indexes of this array correspond one to one with those from initialActions,
each initial action reports their result here.
Hide child attributes
Hide child attributes
The HTTP code returned by the action invocation.
- Initial Lookup action result.
- Initial Start Payment Session action result.
- Initial Payment Authorize action result.
Hide child attributes
Hide child attributes
Lookup the available payment methods and instruments.
lookup Unique identifier for this action execution. If its processing is done asynchronously, you will receive a notification with the same actionId.
Date and time when execution of the Action was started.
Links to the next possible actions that can be taken.
Hide child attributes
Hide child attributes
URL to fetch the current execution state.
URL to authorize the current execution.
URL to start a payment session.
Lookup action results.
Hide child attributes
Hide child attributes
List of Payment Methods and Payment Instruments that can be used to complete the execution.
Hide child attributes
Hide child attributes
Code of the integration type for using the payment method in the provider.
api, hpp, inperson Description of the Payment Method.
Code of the payment method selected to perform the payment.
alexBankMa7fazty, amazonPay, applePay, audi2pay, alfa, alipay, bankTransfer, card, 2c2p, capitecPay, cibSmartWallet, easypaisa, etisalatCash, fawryMobileWallet, fawryPay, googlePay, jazzCash, mercadoPago, monoDirectDebit, nbePhoneCash, orangeCash, oPayWallet, pagaWallet, payflex, payjustnow, payPal, pix, konnect, qnbEWallet, wafaCashWallet, weCash, genericRedirect, eftPro, upi, cashFreeWallet, paytmMWallet, netBanking, meezaWallet, vodafoneCash, alipayQRCode, sepaDirectDebit, dcb, bankAccount, modo, ach, payzoneCash, revolutPay, lean, tabby, boleto, oxxo, spei, promptPay, qris, momoVN, vietQR, konbini, touchNGo, gCash, maya, pse, pagoEfectivo, napas, duitNowQR, grabPay, shopeePay, nequi, picPay, ovo, trueMoney, iDeal, bancontact, khipu, razerGold, webPay, smartPix, venmo, klarnaPayLater, klarnaPayNow, klarnaPayOverTime, knet, scalapay, bizum Provider code for which the payment composition option is available.
Provider-specific data needed by to use the payment method for a payment.
List of stored Payment Instruments for this Method that belong to the specified holder. By default, only includes the ones with status Created or Enabled.
Hide child attributes
Hide child attributes
Id of the instrument.
Date and time when the Instrument was created in Payrails.
When the Instrument was last updated.
Unique identifier of the Holder in Payrails.
Represents the payment method type.
alexBankMa7fazty, applePay, audi2pay, bankAccount, card, 2c2p, vietQR, cibSmartWallet, easypaisa, etisalatCash, fawryMobileWallet, fawryPay, googlePay, jazzCash, nbePhoneCash, orangeCash, payPal, qnbEWallet, weCash, genericRedirect, alfa, konnect, eftPro, netBanking, upi, cashFreeWallet, paytmWallet, phonePe, iDeal, bancontact, klarnaPayLater, klarnaPayNow, klarnaPayOverTime, scalapay Status of the instrument.
created, deleted, enabled, disabled, transient Instrument name suitable for display.
Description of the instrument.
True if this instrument is set as default for the holder.
Merchant-provided reference for the instrument.
System-wide unique identifier of the Instrument. If two Holders have the same instrument stored, this value will be the same for both, but the instrument and token IDs will be different. Cannot be used for payments, should only be used for analytics and fraud prevention.
Represents the future usage to define the payment flows that the stored instrument will be used for.
Subscription, CardOnFile, UnscheduledCardOnFile Identifier of the initial payment made with this instrument on the Networks, e.g. Mastercard Trace ID or Visa Transaction ID.
Mastercard Transaction Link Identifier (TLID) of the transaction series this instrument belongs to. Returned by the card network on the initial cardholder-initiated transaction and required on economically related merchant-initiated transactions, such as recurring payments and installments, when the series spans payment providers.
Type-specific information about the instrument.
- Card
- BankAccount
- PayPal
- GooglePay
- ApplePay
- DCB
- MBWay
Hide child attributes
Hide child attributes
Network of the instrument.
unspecified, visa, visadankort, mastercard, amex, diners, discover, unionpay, unionpayuzcard, maestro, maestrobancontact, hipercard, jcb, jcblankapay, argencard, aura, belkart, bpfuelcard, cabal, carnet, cirrus, chjonesfuelcard, uzcard, codensa, dankort, dinacard, duet, ebt, eftpos, elo, euroshellfuelcard, gecapital, bc, hrgstore, humo, lankapay, lukoilfuelcard, bancontact, meeza, newday, mir, ourocard, pagobancomat, paypak, paypal, phhfuelcard, prostir, rupay, sbercard, sodexo, starrewards, cencosud, naranja, troy, uatp, ukfuelcard, verve, voyager, vpay, wex, cmi, atm, bankcard, localbrand, loyalty, privatelabel, fuelcard, redfuelcard, redliquidfuelcard First 6-8 digits of the Card number. Also known as IIN (Issuer Identification Number).
6 - 8"416598"
Last digits of the Card number.
4Network of the instrument.
unspecified, visa, visadankort, mastercard, amex, diners, discover, unionpay, unionpayuzcard, maestro, maestrobancontact, hipercard, jcb, jcblankapay, argencard, aura, belkart, bpfuelcard, cabal, carnet, cirrus, chjonesfuelcard, uzcard, codensa, dankort, dinacard, duet, ebt, eftpos, elo, euroshellfuelcard, gecapital, bc, hrgstore, humo, lankapay, lukoilfuelcard, bancontact, meeza, newday, mir, ourocard, pagobancomat, paypak, paypal, phhfuelcard, prostir, rupay, sbercard, sodexo, starrewards, cencosud, naranja, troy, uatp, ukfuelcard, verve, voyager, vpay, wex, cmi, atm, bankcard, localbrand, loyalty, privatelabel, fuelcard, redfuelcard, redliquidfuelcard Information about an issuer by the given BIN (or IIN).
Hide child attributes
Hide child attributes
First 6-8 digits of the Card number. Also known as IIN (Issuer Identification Number).
6 - 8"416598"
Network of the instrument.
unspecified, visa, visadankort, mastercard, amex, diners, discover, unionpay, unionpayuzcard, maestro, maestrobancontact, hipercard, jcb, jcblankapay, argencard, aura, belkart, bpfuelcard, cabal, carnet, cirrus, chjonesfuelcard, uzcard, codensa, dankort, dinacard, duet, ebt, eftpos, elo, euroshellfuelcard, gecapital, bc, hrgstore, humo, lankapay, lukoilfuelcard, bancontact, meeza, newday, mir, ourocard, pagobancomat, paypak, paypal, phhfuelcard, prostir, rupay, sbercard, sodexo, starrewards, cencosud, naranja, troy, uatp, ukfuelcard, verve, voyager, vpay, wex, cmi, atm, bankcard, localbrand, loyalty, privatelabel, fuelcard, redfuelcard, redliquidfuelcard Card local network that supports the card, e.g. CartesBancaires, Dankort, Mada, Bancontact.
bancontact, cartesbancaires, dankort, mada Name of the bank or institution that issued the card.
Country of the bank or institution that issued the card.
Hide child attributes
Hide child attributes
ISO 3166-1 alpha-2 country code.
^[A-Z]{2}$ISO 3-letter country code. Returned by Payrails, but not interpreted in requests.
^[A-Z]{3}$The English name of the country. Returned by Payrails, but not interpreted in requests.
Segment of the card, e.g. gold, black, business.
Type of the card, e.g. credit, debit, prepaid, gift.
More information about the card type, e.g. personal, commercial.
Indicates whether the card credential represents a network token rather than a primary account number (PAN).
Indicates whether the card is enrolled in a Flexible Credential or Flex Card program supported by the network - e.g. Visa Flexible Credential, Mastercard FlexCard.
Billing Address of the instrument.
Hide child attributes
Hide child attributes
The name of the street of a postal address.
The number on the door, building, or room.
Additional addressing information, 2nd line of postal address.
The name of the suburb or area within a city.
The name of the city of a postal address.
The postal code.
The name of the state a postal address is in.
The country where the address is in.
Hide child attributes
Hide child attributes
ISO 3166-1 alpha-2 country code.
^[A-Z]{2}$ISO 3-letter country code. Returned by Payrails, but not interpreted in requests.
^[A-Z]{3}$The English name of the country. Returned by Payrails, but not interpreted in requests.
Latitude of the address in the GPS coordinate system.
Longitude of the address in the GPS coordinate system.
The phone to contact in the address (can be different that the customer's).
Hide child attributes
Hide child attributes
The local number of the phone, such that countryCode + number can be dialed.
^[0-9]+$International prefix of the phone, if known separately.
^\+?[0-9]+$Name of the address, e.g. home, work.
Name of the person to whom the address belongs to.
Last name of the person to whom the address belongs to.
Email of the person to whom the address belongs to.
Expiry month of the Card.
2Expiry year of the Card.
4Name of the owner of the Card.
Payer-provided tax identification number (e.g. CPF in Brazil) collected on the instrument.
List of tokens inside the instrument. Not included by default, includeTokens query parameter must be used.
Hide child attributes
Hide child attributes
Id of the token in Payrails.
Date and time when the Token was created in Payrails.
When the Token was last updated.
Id of the payment instrument the token belongs to.
Status of the token.
created, enabled, disabled, deleted Type of the token.
network, vault, psp, networkOffers, networkGateway Id of the provider the token belongs to.
Unique identifier of the token in the provider's system.
Id of the configuration in the provider the token belongs to.
Any merchant or provider-specific data that should be stored for context in the token.
Contains information related to the payment method and integration type.
Hide child attributes
Hide child attributes
The payment method name.
Returns true if the payment method supports storing a payment instrument.
Returns true if the merchant wants to collect billing information during checkout and if this information is supported by the payment methods.
Enum with values direct and redirect, direct is set only when a payment method does not require redirecting the end user to a provider page to proceed with authorization.
Specific configuration needed for the payment method.
Schema for the payment method.
Returns true if the payment method supports paying in installments.
Installment plans keyed by ISO 3166-1 alpha-2 country. Empty when no plans are available for this card and amount.
Hide child attributes
Hide child attributes
Hide child attributes
Hide child attributes
Number of installments. Sent back as installments.count at authorize.
6
Amount paid per installment.
20
Total paid across all installments, including financing cost. May exceed the transaction amount.
120
Ready-to-render description of the plan. Always present for live plans.
"6 cuotas de S/ 20.000,00 (S/ 120.000,00)"
Financing rate as a percentage. 0 is a genuine interest-free offer; absent means no rate was supplied.
32.14
Discount as a percentage. Absent and 0 differ, as for installmentRate.
Marks the plan the provider suggests emphasising.
The card issuer applies the financing cost, so totalAmount is indicative.
Financing rates a market requires be displayed, e.g. CFT and TEA. Values keep the provider's formatting.
Hide child attributes
Hide child attributes
Name of the rate.
"CFT"
Rate as the provider expressed it.
"169,00%"
Conditions the plan imposes beyond the normal card flow. Ignore unrecognised values and hide the plan.
threeDSecure, cardVerificationCode Opaque plan handle. Echo it back at authorize when present; never parse or display it.
{
"BR": [
{ "count": 2, "amount": 60 },
{ "count": 6, "amount": 20 }
]
}
Unique identifier of a workspace in Payrails.
Workspace ID that that this execution belongs to.
Links to the next possible actions that can be taken.
Hide child attributes
Hide child attributes
Link related information.
Hide child attributes
Hide child attributes
HTTP method that should be used to call the href.
GET, POST, PUT, PATCH, DELETE A prerequisite action, which needs to be executed prior calling the provided link.
Details of the next possible actions that can be taken.
Hide child attributes
Hide child attributes
Type of the required action.
redirect, confirm, review, wait Sub type of the required action.
merchant, client, internal Details of the required action.
URL to complete the required action.
HTTP method that should be used to call the href.
GET, POST, PUT, PATCH, DELETE Details for the client to indicate how an action needs to be performed.
Hide child attributes
Hide child attributes
Indicates the visibility of the action when being performed on the client.
hidden Details of a prerequisite action, which needs to be executed prior calling the provided link.
Action the customer needs to take to move the Execution state. A link with the same name should be used to continue.
3ds, confirm Workspace ID that the event belongs to.
Specify what triggered the event. * api - Event was triggered through an API request. * action - Event was triggered as a result of another action. * external - Event was triggered outside of Payrails.
api, action, external Hide child attributes
Hide child attributes
Unique identifier of the Workflow Execution that this notification event belongs to.
Workflow code.
Unique identifier of the Workflow Execution Event that this notification event belongs to.
Unique identifier of the Workspace that this notification event belongs to.
Value of Notification event status enumeration.
delivered, deliveryFailed, pending Date of creation of the Notification.
Last update of the Notification.
Unique identifier of the Notification event.
Original body request object sent.