Order update

Notify Raylo for an update to the order

GraphQL query

After the merchant receives a checkout decision report with a success outcome, the merchant can notify Raylo for updates to the order.

  • The <ESCAPED_QUERY> must contain the following GraphQL query:

mutation($merchantId: ID!, $payload: String!) {
  updateMerchantOrder(merchantId: $merchantId, payload: $payload) {
    success
    errors {
      code
      field
      message
    }
  }
}
  • Please refer to the JWT structure section for more details about how to the generate the <JWT>

  • The order update:

    • is successful if the response has true on the value of the success field.

    • is not successful if the response response has false on the value of the success field and contains a list of errors.

JWT structure

The <JWT> must contain the encoded and signed content required to create the checkout. Read more information about encoding and signing in Authenticated requests.

The content (before being encoded and signed) should have the following JSON format:

Field details

Field
Type
Description

iss

String

Required. This should contain the merchant ID, which will be provided to the merchant ahead of time

iat

Integer

Required. This should be the timestamp when the payload is generated following the UNIX epoc time format

data

Required. Refer to the Data type for more info on its structure.

Data type

Field
Type
Description

merchantReference

String

Required. Merchant reference for the checkout

state

String

Required. Possible values: fulfilled or cancelled

stateChangedAt

String

Required. This contains the timestamp when the state changed following the ISO8601 format.

  • When the state is fulfilled, this timestamp should contain when the order was dispatched

  • When the state is cancelled, this timestamp should contain the cancellation time

fulfillment

  • Omit when the state is cancelled

  • Required only when the state is fulfilled

  • Refer to the Fulfillment type for more details on its structure

Fulfillment type

Field
Type
Description

courierName

String

Required. Name of courier delivering the order

courierReference

String

Required. Tracking reference for the courier delivering the order

courierTrackingUrl

String

Required. URL to track the progress of the delivery

items

Required. Refer to the item type for more details on its structure

Item type

Field
Type
Description

variant

Required. Refer to the Variant type for more info on its structure.

assetDetails

Optional. Details of the physical asset. Refer to the Asset details type for more info on its structure.

Variant type

Field
Type
Description

reference

String

Required. Merchant reference, sometimes called an SKU, that identifies uniquely the variant.

Asset details type

Field
Type
Description

imei

String

Optional. The IMEI of the dispatched asset. The value must have the correct format.

serial

String

Optional. The manufacturer's serial for the dispatched asset.

Last updated

Was this helpful?