Inconsistent returned orders from the merchant API

Hi All,

I’m trying to build a system that logs revolut payments in a spreadsheet. In order to do this we need the fee amount, the full transaction amount, the settled amount, the customer email, the description etc so that we can make a useful and descriptive entry in the spreadsheet. We are set up to receive the ‘order completed’ webhook, then we retrieve that order from the merchant api. Big problem that support are saying they don’t have a solution for - I’ve noticed that when retrieving an order from the merchant API, the order looks very different depending on the payment method.

Retrieved order from a Visa debit (consumer card):

{
id: ‘xxx’,
token: ‘xxx’,
type: ‘payment’,
state: ‘completed’,
created_at: ‘xxx’,
updated_at: ‘xxx’,
amount: 360000,
currency: ‘GBP’,
refunded_amount: 0,
outstanding_amount: 0,
capture_mode: ‘automatic’,
description: ‘xxx’,
payments: [
{
id: ‘xxx’,
state: ‘captured’,
created_at: ‘xxx’,
updated_at: ‘xxx’,
token: ‘xxx’,
amount: 360000,
currency: ‘GBP’,
settled_amount: 356380,
settled_currency: ‘GBP’,
billing_address: [Object],
risk_level: ‘low’,
fees: [Array],
payment_method: [Object]
}
],
channel_data: {
invoice_id: ‘xxx’,
short_code: ‘xxx’
enforce_challenge: ‘automatic’,
customer: {
id: ‘xxx’,
email: ‘xxx@xxx.com’
}
}

Here’s the retrieved order from another customer who paid with a mastercard credit (this is strange because I’ve seen another order for a mastercard credit (corporation card) which retrieves the same set of data as above:

{
id: ‘xx’,
token: ‘xx’,
type: ‘payment’,
state: ‘completed’,
created_at: ‘xx’,
updated_at: ‘xx’,
amount: 94500,
currency: ‘GBP’,
outstanding_amount: 0,
capture_mode: ‘automatic’,
description: ‘xx’,
channel_data: {
invoice_id: ‘xxx’,
short_code: 'xxx
},
enforce_challenge: ‘automatic’,
customer: {
id: ‘xx’,
email: ‘xxx@xxx.com’,
phone: ‘xx’
}
}

So you can see the settled amount isn’t there which makes things difficult for my use case. It’s even worse with bank payments:

{
id: ‘xxx’,
token: ‘xxx’,
type: ‘payment’,
state: ‘completed’,
created_at: ‘xxx’,
updated_at: ‘xxx’,
amount: 46872,
currency: ‘GBP’,
outstanding_amount: 0,
capture_mode: ‘automatic’,
description: ‘xxx’,
channel_data: {
invoice_id: ‘xxx’,
short_code: ‘xxx’
},
enforce_challenge: ‘automatic’
}

Here we don’t even have the customer info. So you can see when I’m trying to fill out a spreadsheet consistently with all this information, I’m running into trouble. Can anyone shed any light on why this is happening or where I might be going wrong?

3 Likes

Hello, some response from the revolut team would be nice, even if just to say that you don’t support having all the information in each return

2 Likes

Hi coresash,

Apologies for the late response.

Indeed, this behavior is expected. fees and settled amount are not guaranteed to be sent back. However, you should always get customer data back if you sent a customer object during order creation regardless of the payment method.

Can you confirm you are using the following API to retrieve orders ? Retrieve an order | Revolut Docs

2 Likes

Hi Mohammed.

No worries. That’s a shame if it’s expected. Can you confirm if there’s any way to guarantee a way to get the fees and settled amount through some other means?

Also when you say they’re not guaranteed to send back, is there any payment method that would produce consistent results? Surely it can’t just be random?

Yes that is the API I’m using

Thanks for the response!

2 Likes

Hi coresash,

Its not random. the fees are calculated asynchronously and will not be available right away after the payment is done.

the settled amount should be available after the payment is settled which usually takes 24h

1 Like

Hi Mohammed,

Thanks, but I retrieved an order from around a week ago and I still don’t see the fees or the settled amount. Am I going about this the wrong way somehow?

1 Like

Hello @coresash :wave: ,

Sorry to hear about the issue you’re dealing with. For a more personalized support, please get in touch with us via the in-app chat. Appreciate your understanding. :pray:

SG | Community Team