Payments Rails Api connection(Timestamp)

Hi, I am using payment rails for payouts on an app. Trying to connector to the api. And Timestamp is required in the header. Any way to get a unix dynamically in there.
Thanks

Try:
Current date time - Arbitrary date/time:format as second
in Arbitrary date time set 01-01-1970

Thanks for replying. but it does not allow any dynamically value, Only type out text

You can use dynamic value. PLease share your API Connector setting or Workflow /Get API call settings

I meant for the share headers for all calls

You cannot use shared header. You will need to set each call header. I see that the API will requiered that you encode the header signature too. So you may need to use it anyway or create a plugin.

Great! idea. Yes it does, do you have any suggestion for that. i used Free HMAC-SHA256 Online Generator Tool | Devglan

Last time I did an Integration for an API like this, I choose to create a plugin.
Maybe there’s some plugin that can work to create the key, but I’ve never tested them.

https://docs.paymentrails.com/api/#making-a-request

hi Quick question, i got this to kinda work by making a plugin, and value returning is a string but i need text.

Any suggestions?
Thanks

Can you explain a little bit more?
String and text are the same for me. not sure what you mean by that

function(properties, context) {
var apiSecret = ‘secret’; // Your SSO key
var apiKey = ‘apikey’
var crypto = require(‘crypto’);
var timestamp = Math.round(new Date().getTime() / 1000);
var requestpath= properties.requestpath;
var method= properties.method;
var body= properties.body;

    const hmac = crypto.createHmac("sha256", `${apiSecret}`);
    hmac.update(`${timestamp}\n${method}\n${requestpath}\n${body}\n`);
    const signature = hmac.digest("hex");
    return signature;

}

Can you share other plugins settings?
I guess you choose a thing type but you should set the field to text type.

plugin name is test, return is called signature (text)

And where do you return the data? I don’t see this in your setting actually
Are you using a server side action?

yes server side

I think the problem is in your Java. I’m not a Java expert but I’m sure of it.