Problem accessing payment data via API
rafamaran
HOBBYOP

a year ago

I am using the API https://backboard.railway.app/graphql/v2 and I want to retrieve the payment details (billingDetails - currentBalance and availableCredits).

I am getting a 400 error with traceId 7894488731113956953.

The API is working correctly when I fetch only the name and email (query {me{name email}})

Solved

7 Replies

brody
EMPLOYEE

a year ago

This thread has been marked as public for community involvement, as it does not contain any sensitive or personal information. Any further activity in this thread will be visible to everyone.

Status changed to Open brody about 1 year ago


brody
EMPLOYEE

a year ago

Hello,

A 400 error means your query or input variables are malformed, what is your current query and input variables?


rafamaran
HOBBYOP

a year ago

Hi, brody!

query {

me {

name

email

billingDetails {

currentBalance

availableCredits

}

}

}


brody
EMPLOYEE

a year ago

Where are you seeing billingDetails ?

https://railway.com/graphiql


rafamaran
HOBBYOP

a year ago

brody, do you have an example query for this?


brody
EMPLOYEE

a year ago

Credits Available is returned in the customerForUser query.

Current Usage is calculated on the frontend from the data returned in the allProjectUsage query.

You can go to your usage page, open dev tools, and refresh the page to see the API calls made.


rafamaran
HOBBYOP

a year ago

opening a development tool I managed to solve it... thanks, brody!! ;-)


brody
EMPLOYEE

a year ago

No problem! glad I could be of assistance!


Status changed to Solved brody about 1 year ago


Loading...