Visa API

Visa API

API Endpoints
https://visa-api.fly.dev/graphql
Version

2.0.1

Queries

getOrder

Response

Returns a GetOrderResponse!

Arguments
Name Description
input - GetOrderInput!

Example

Query
query getOrder($input: GetOrderInput!) {
  getOrder(input: $input) {
    order {
      ...OrderDtoFragment
    }
    price {
      ...MoneyDtoFragment
    }
  }
}
Variables
{"input": GetOrderInput}
Response
{
  "data": {
    "getOrder": {
      "order": OrderDto,
      "price": MoneyDto
    }
  }
}

Mutations

createTransaction

Response

Returns a CreateTransactionResponse!

Arguments
Name Description
input - CreateTransactionInput!

Example

Query
mutation createTransaction($input: CreateTransactionInput!) {
  createTransaction(input: $input) {
    uuid
    redirectUrl
  }
}
Variables
{"input": CreateTransactionInput}
Response
{
  "data": {
    "createTransaction": {
      "uuid": "xyz789",
      "redirectUrl": "xyz789"
    }
  }
}

storeOrder

Response

Returns a CreateOrderResponse!

Arguments
Name Description
input - StoreOrderInput!

Example

Query
mutation storeOrder($input: StoreOrderInput!) {
  storeOrder(input: $input) {
    order {
      ...OrderDtoFragment
    }
  }
}
Variables
{"input": StoreOrderInput}
Response
{"data": {"storeOrder": {"order": OrderDto}}}

Types

Boolean

Description

The Boolean scalar type represents true or false.

Example
true

CreateOrderResponse

Fields
Field Name Description
order - OrderDto!
Example
{"order": OrderDto}

CreateTransactionInput

Fields
Input Field Description
orderUuid - String!
method - String!
methodData - JSON
redirectUrl - String!
Example
{
  "orderUuid": "xyz789",
  "method": "xyz789",
  "methodData": {},
  "redirectUrl": "xyz789"
}

CreateTransactionResponse

Fields
Field Name Description
uuid - String!
redirectUrl - String!
Example
{
  "uuid": "xyz789",
  "redirectUrl": "abc123"
}

Float

Description

The Float scalar type represents signed double-precision fractional values as specified by IEEE 754.

Example
987.65

GetOrderInput

Fields
Input Field Description
uuid - String!
Example
{"uuid": "abc123"}

GetOrderResponse

Fields
Field Name Description
order - OrderDto!
price - MoneyDto!
Example
{
  "order": OrderDto,
  "price": MoneyDto
}

JSON

Description

The JSON scalar type represents JSON values as specified by ECMA-404.

Example
{}

MoneyDto

Fields
Field Name Description
currencyCode - String!
amount - Float!
Example
{"currencyCode": "xyz789", "amount": 987.65}

OrderDto

Fields
Field Name Description
uuid - String!
status - OrderStatus!
data - JSON!
Example
{
  "uuid": "abc123",
  "status": "DRAFT",
  "data": {}
}

OrderStatus

Description

A list of possible order statuses

Values
Enum Value Description

DRAFT

PREPARED

PAID

PROCESSING

PROCESSED

CANCELLED

COMPLETED

ISSUES

Example
"DRAFT"

StoreOrderInput

Fields
Input Field Description
uuid - String
countryIsoCode - String!
data - JSON!
Example
{
  "uuid": "abc123",
  "countryIsoCode": "abc123",
  "data": {}
}

String

Description

The String scalar type represents textual data, represented as UTF-8 character sequences. The String type is most often used by GraphQL to represent free-form human-readable text.

Example
"abc123"